NTK and The NTK Project
are properties of Jn Dechereux
Home | Documentation | FAQ.
Vanilla 1.1.8 is a product of Lussumo. More Information: Documentation, Community Support.
Q. I've noticed that some of the Windows constants are not included in Windows.ch. What should I do?
A. Most of major constants are included, but some rarer or newer ones may not be. You may have to look at the include folder of your Borland CPP (or other C++ tool) to use its supplied .H files. Maybe you can find there the constants you need. If not, try referring to the Microsoft Software Developer Network online documentation. Another good idea is to dig into Wine (the linux open source project), its .H include files are often a mine of precious informations.
Q. I am currently using NTK for conversion of a Dos-Clipper application. May I get 1 sample program which show me how to create a main window with a menubar?
A. Using NTK, you have many way of making menus. At least, I see 3 differents:
1) Using the standard Win32/NTKCore way. That is to say: invoking NTK's popup-menu functions. Besides, those functions are complete clones of Clip4win ones. You'll find many samples browsing NTKRad or NTKCore subfolders. Maybe you will also find helpfull, glancing at PRINT.PRG in NTKRad or DEMOMULT.PRG in NTKCore directory.
2) If you prefer the old Clipper way of coding menus via the @ ... Prompt command:
Give a try to Abbougaga's contribution called PrompMnu. You'll find it in your \wntk4hrb\contribs\ subfolder or maybe a more recent version in the 'NTK - Knowledge sharing' section:
http://www.ntkproject.com/forum_ntk/?CategoryID=3
3) The last technic consist in using NTKRad's button or toolbar commands.
Basically, each button is supposed to work with at least 2 different bitmaps. One for standard buttonup state, and one (same bmp, but with more highlighted colors) for the buttonmouseover state. Thus, when your final user is dragging the mouse arrow over a button within the toolbar, this last appears to be more intense. Using this technic with the NTK's hyperlink button style, you will get very fancy menubars...
Find out more about this subject reading the following chapters of NTKRad.pdf book:
- 0.6 @... Create toolbar
- 0.8 @... Hyperlink...
Also, you'll find a good sample of how to use hyperlink buttons in \wntk4hrb\ntkrad\appdemo\main.prg
Feel free to explore the whole APPDEMO folder and subfolders to really figure out how things work.
CREATE WINDOW hWndMain ; STYLE F_MIN+F_MAX+WS_SYSMENU ; EXSTYLE WS_EX_TOPMOST ; // 'Always on Top' SIZE 640,480 ; TITLE cWinTitle
hWndMain := NTK_CreateWindowEx( WS_EX_WINDOWEDGE, "MYCLASS", cWinTitle,; F_MIN+F_MAX+WS_SYSMENU,; 0, 0, 640, 480 )
FUNCTION ShowReport( hWndMain ) Local cReport := "C:\MyAPP\tmp\MyReport.txt " NTK_ShowWindow ( hWndMain , SW_MINIMIZE ) // --- Display the report preview ( probably using NOTEPAD ) // --- and wait util user clicks Notepad cancel button ... RUN ( cRapport ) AND WAIT NTK_ShowWindow ( hWndMain , SW_RESTORE ) RETURN (Nil )
1 to 4 of 4