FAQ

'The NTK Project' what is it exactly?

About NTK architecture.

Who are people concerned by The NTK Project?

What are NTK prerequisites?

How to install and configure NTK?

How to make a NTK Project application?

What does mean core layer,ntkdll layer and ntkrad layer?

Where can I find The NTK Project documentation?

What's the difference between Free-Training, Pro, and Premium version?



'The NTK Project' what is it exactly?

You can find the full NTK description HERE...

upBack to top



NTK Architecture Diagram.

diagram

upBack to top



Who are people concerned by The NTK Project?

They are mainly developers coming from xBase background like:

- Clipper, [x]Harbour, dBase, FoxDos, Arago dbXL or any other (text mode) xBase RDBMS, who are needing to develop modern 32 bit-GUI applications or willing to migrate their old MS-Dos programs...

- Clip-4-Win programmers who are wanting to continue programming in a very similar way they did these last ten years, but now, in a Win32 environment...

- FiveWin users wanting to experiment a close Win32 GUI under xHarbour...

- HWGUI, MiniGUI or Other open source users deciding to combine the best of their favorite library, both with the power of NTKCore and NTKDll layers...


But not only, here are some other good reasons to use NTK Project for xHarbour:

- If you're fed up with slowness of bloated classic programming environments of the actual market, usually requiring tons of (always missing) DLLs, without speaking of those that take 600 MB of free disk space just to install, ...

- If you're tired of cool modern languages that could be great if only they were supplied with a true compiler!

- If you want to make faster apps, but you don't want, or have no time to learn C,...

- If you need 32 bit GUI applications able to have very short access times on (single or network) large databases, ...

- If your are looking for a low-cost 'per user' license network RDBMS,...

- If your are looking for a productive, high speed, and handy tool capable to let you manipulate small or large databases and generate powerful GUI interfaces in very few lines of code, ...

- If, if, ... STOP!


Do not hesitate anymore, join us into the fabulous world of NTK Project for xHarbour

You will quickly be able to offer your clients, compiled applications (unique & self-contained EXE) capable to access databases as a standalone program, in a local network environment or even using an n-Tier technology, without any fees per additional license...

Indeed, as Clipper in the good old days, [x]Harbour is today unlimited in terms of networking 'per user' license, unlike many other (expensive) commercial RDBMS. Plus, NTK gives your [x]Harbour programs the GUI you are expecting...

upBack to top



What are NTK prerequisites?

At this stage NTK project is only available for xHarbour using Borland CPP. So, before to built our first NTK GUI program, it is necessary to correctly configure the programming environment. To do so, the following sections propose a quick and useful help guide.

To be clear and accurate:

- NTK Project is a third party library working for and with xHarbour RDBMS.

- NTK Project and xHarbour require a C compiler to produce executable applications.

- Without a GUI library like 'The NTK Project', xHarbour can only create Win32 Console (Text mode) executables.

- For the moment, NTK Project doesn't support other C compiler than Borland CPP.

So those three products have to be downloaded, installed and correctly configured to work properly together, as expected.

As said in the above, Borland CPP compiler is required. DON'T WORRY - Using The NTK Project, you'll never have to deal with it. The C compiler is just invoked in a transparent way, during compilation and linkage phases, to transform all your .PRG files into a unique .EXE (executable) file.

For further details, have a look to the Getting Started Manual in the download section.

upBack to top



How to install and configure NTK?

Please refer to chapter 0.6, Part III of the NTK Project's GETTING STARTED guide.

upBack to top



How to make a NTK Project application?

Please refer to Part IV of the NTK Project's GETTING STARTED guide.

upBack to top



What does mean core layer, ntkdll layer and ntkrad layer?

The NTKCore layer

NTKCore is the 'low-level' engine of NTK Project. For the rest, we also call it The Magic Blue Box! All other (actual and future) layers and libraries remain on it and are (and will be) architectured around it.

NTKCore layer is a set of low level functions allowing to perform direct calls to the Win32 API. NTKCore, it's about 400 functions that are same or very close to originals provided by the Win32 API.

Some have been slightly adapted to be more friendly or more xBase compliant...

In its extreme generosity, MS Win32 API provides us the following C function:

BOOL GetMessage( LPMSG lpMsg,         // address of the MSG structure.
                    HWND hWnd,           // handle of window
                    UINT wMsgFilterMin,  // first message to filter
                    UINT wMsgFilterMax   // last message to filter
                   );                    // The Return value is boolean: 0 or 1 

In NTKCore, it gives something like this:

   NTK_GetMessage( aMsg         ,;  // array of 7 items each one represents a MSG member.
                   hWnd         ,;  // numeric: handle of window
                   nMsgFilterMin,;  // numeric: first message to be filtered
                   nMsgFilterMax ;  // numeric: last message to be filtered
                 )                  // The Return value is logic: .F. or .T.

In other words, with NTKCORE, the developer (you) will be able to build 32 bit GUI applications using the MS-Windows 'traditional' manner. That is to say : events or messages handling and processing. By the way, you will provide fast and powerful GUI features to your [x]Harbour programs without know anything about C/C++ language and its constraints.

So, just by adding NTKCORE.LIB to your application MAKEFILE, the magic world of Win32 APIs will be yours!

Though, practice of this kind of programming is beyond the scope of this manual, feel free to learn more about the MS Win32 API programming, reading the famous 'Petzold book'. It's really worth while having a look to it. It certainly would be a great and serious benefit!

The NTKDLL layer

This layer has been especially created to offer the possibility to reach directly from a NTK/xHarbour program, most functions (Complex C++ functions or classes cannot be wrapped with NTKDLL. This will certainly require writing of some extra C code to be done.) of the Win32 API that would not be included in NTKCore or functions that would be stored into other OEM manufacturer DLL.

Thus, if the wished function is embedded inside an external DLL, the developer can wrap it dynamically with NTKDll's call engine. This can be done both ways:

- Using the combination of NTKcore's functions ( NTK_LoadLibrary, NTK_GetProcAdress NTK_CallDll ).

Using the NTKRad's command (DECLARE FUNCTION Myfunc LIB MyDllName.Myfunc ...).

e.g. #1

/*
*** ShellAbout() WRAPPER using the RAD command: Declare function or _DLL function.
*** Usage   : ShellAbout( hWnd, cTitleBarText, cInboxText, hIcon ) -> nRet
*** Returns : A numeric value. 1=Success OR 0=fail.
*** Included: In Shell32.DLL
*/

// ---------  NTK declaration style...
Declare function ShellAbout Lib Shell32.ShellAboutA ;
              ( hWnd As HWND, cApp As string,;
                cOtherStuff As string, hIcon As HICON )  AS int


// The following syntaxe works same as the above. Do not hesitate to try it !
// It has been created for NTK's backward compatibility with 16 bit Clip4Win apps.
// Just Look at NTKDLL.CH for further details...

// ---------  C4W like declaration style...  For Backward compatibility!
// _DLL function ShellAbout(hWnd AS HWND  ,;
//                         cApp AS string,;
//                         cOtherStuff AS string,;
//                         hIcon AS HICON) AS int Pascal:Shell32.ShellAboutA

e.g. #2

Have a look to CRW32.PRG in the contribs folder of NTK Project. You will see a fully functional set of wrapped functions for the Crystal Report API printing engine !

The NTKRad layer.

Based upon NTKCore layer, NTKRad is brought to the xBase developer in the main aim to hide the hard stuff that is handling and processing messages when you're programming MS-Windows 'the traditional' manner.

So, developing applications using NTKRad is just kidding for an xBase programmer, because most common xbase commands and functions are available for GUI mode. In fact, developer only has to take care about two important things.

- First, keep in mind a NTKRad application always starts with at least the minimum following declaration command: CREATE WINDOW hWnd TITLE "My title..."

- Second, as it is well known, in a graphical environment, functions or commands like SAVE SCREEN or RESTORE SCREEN do not work anymore. So, this is not absolutely required, but it is strongly recommended to gather all @ y,x SAY ... commands and other screen output commands inside a unique place where MS-Windows will come to peek, and then, take order of what he has to do when the current working window need to be painted/repainted.

To do so, NTKRad gives you the opportunity to attach a 'ON PAINT' clause to the CREATE WINDOW command. Thus, it becomes possible to write something like this:

CREATE WINDOW hWndDemo       ;
       TITLE cWinTitle       ; // Minimum declaration
       AT 0,0 SIZE 320,200   ;
       ON PAINT DoRePaint()

As you can guest, the DoRepaint() procedure/function is supposed to receive all the @ y,x SAY ...and all other screen output orders. Then, NTKRad does ALL THE JOB FOR YOU and tells MS-Windows what it has to do, each time a portion or the whole window context need to be refreshed.

upBack to top



Where can I find The NTK Project documentation?

NTK Project manuals are localized into /WNTK4HRB/DOC directory.

You'll find there:

- GSTARTED.PDF - The GETTING STARTED manual.

- FLIST.PDF - A quick memo guide for NTKCore APIs - summary of arguments and return value for each function.

- NTKCORE_PART1.PDF - Electronic manual describing the whole NTKCore APIs.

- NTKCORE_PART2.PDF - Electronic manual describing the whole NTKCore APIs.

- NTKRAD.PDF - Electronic manual describing NTKRad commands and functions.

- NTKACTVX.PDF - Electronic manual describing methods and instance vars of the NtkTActiveX OO class

- NTKTGAUGE.PDF - Electronic manual describing methods and instance vars of NtkTGauge & NtkTSGauge OO classes

- NTKTRBAR.PDF - Electronic manual describing methods and instance vars of the NtkTTrackBar OO class

- NTKTTAB.PDF - Electronic manual describing methods and instance vars of the NtkTTabs OO class

- NTKTVIEW.PDF - Electronic manual describing methods and instance vars of the NtkTTview OO class


N.B.

As you can understand, writing accurate documentation for such a big project as NTK is a heavy task that can not be done just in the blink of an eye. So before you complain for a leak of documentation, here are some little tips that can help you:

- Take a look at FLIST.PDF

- Use the GREP tool or the Windows Search mechanism to seek the wanted function into all PRG samples through the /WNTK4HRB folder and sub-folders. Keep in mind that PRGs provided ARE TUTORIALS!

- Use GREP tool or Windows Search to seek the wanted string into all .CH localized into /WNTK4HRB/INCLUDE folder.

- If you're looking for information about NTKRad commands, try exploring NTKCMD.CH & NTKCMDEX.CH. A lot of RAD commands are declared inside.

- Post a message on the forum. Maybe someone of NTK's community can point you the right direction.

- Then, only if you really don't find anything, post a message to our technical support.

upBack to top



What's the difference between Free-Training, Pro, and Premium version?

You can find all differences between versions, here...

upBack to top