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.

Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthorGaza
    • CommentTimeJul 8th 2011 edited
     
    Dear Jean,

    I read at the manual and sample you have 3 function to create windows but I can't found detail explanation of the advantage for each function.

    Please clarify the advantage for each function and where best to be use and for what to be use.

    1. __NtkMakeWnd()
    2. CREATE WINDOW hWnd RCF_MDIFRAME
    3. NTK_CreateWindow()
    4. NTK_CreateWindowEx()

    Thanks for advise.

    Rgds,
    Gaza
    •  
      CommentAuthorjnd
    • CommentTimeJul 8th 2011 edited
     
    Dear Gaza,

    This is always depending on what you want to do or what you need to do. Rapid application development with NTKRad layer, powerful acces to Win32 low level apis using NTKCore, or even both?

    So, NTK_CreateWindowEx() is the extented version of NTK_CreateWindow().
    They are both NTKCore wrappers to Win32 APIs functions of same name.
    (to learn more about CreateWindow(), CreateWindowEx(), just follow this link: http://msdn.microsoft.com/en-us/library/ms632679%28v=vs.85%29.aspx ).

    NTKCore (low level) functions allow you to program MS-Windows the tradional manner. i.e.
    1. Register a window class and its dedicated callback procedure
    2. Create a new window belonging to the registered class
    3. Mount a message pump in order to handle the window's events into its callback procedure
    (learn more on this topic reading the famous Petzold's book: Programming Windows, 5th edition.)

    In other terms, this way of programming is very similar to what you'd do if you were using C language. However, NTKCore is far easier to manipulate, mainly because you don't have the C constraints. Actually, NTKCore is more 'Clipper-spirit' like. e.g. handy/easy syntax, no pointers, arrays instead of C structures, and so on...


    IMO, NTKCore remains the favorite choice of experimented programmers coming from MS-Windows environments such as C, Clip-4-Win, etc.
    Regarding developers coming from Clipper or xHarbour console-world, I strongly recommend to begin with NTKRad. Indeed, CREATE WINDOW .... and the others NTKRad commands & functions are powerful enough, quick to implement and far easier to use.

    A good way to help you making your own opinion would be to compare a basic NTKCore program to its NTKRad equivalent. So, feel free to have a look to:
    1. c:\wntk4hrb\ntkcore\hello.prg and then, 2. c:\wnk4hrb\ntkrad\hellorad.prg

    Just keep in mind that NTKRad layer has been designed to hide/mask complexities related to win32 programming system, and help the xHarbour/clipper-console developers in their task.


    N.B.
    __NtkMakeWnd() is just the api of CREATE WINDOW. This NTKRad function is based upon NTK_RegisterWindow() and NTK_CreateWindowEx() among others...


    Hope this helps,
    Kind regards,
    JN
    •  
      CommentAuthorGaza
    • CommentTimeJul 10th 2011
     
    Dear JN,

    Thank you for your suggestion, now have an idea what to do.

    Rgds,
    Gaza