Form_Window_Handle << Back



Offical Documentation is here.

Here is an excerpt of the documentation:
When a DataFlex object is paged (as part of activation) it creates the required Windows object. The Windows object is identified by its window_handle and its form_window_handle. When the DataFlex object is deactivated, the Windows objects (object handle and window handle) are destroyed and the handles are reset to 0.

I would like to expand on this explanation - Form_Window_Handle contains the window handle (who is used by most Windows API calls) of the "Entry" portion of the control. Form_Window_Handle is only available to a few UI controls, namely Form, Grid, Checkbox, Radio, and Button (and their data-aware counterparts). It is understandable that Grid, ComboForm, and Form would have Form_Window_Handle since all of them have the a child control for entry. However it is peculiar that Button, Radio, and Checkbox have a Form_Window_Handle because they can't really accept keyboard input per se. When a button/radio/checkbox object is paged, it creates a parent window (window class name "DFmenu") and a child window (window class name "DFbutton"). The parent window handle can be obtained by getting Window_Handle, and the child window handle can be obtained by getting Form_Window_Handle. When you are dealing Windows API calls to manipulate an UI object, it is important that you pass in the right window handle. For button/radio/checkbox, most of the time, you will be using Form_Window_Handle instead of Window_Handle. Armed with this information, we will look at some of the things we can do with Form_Window_Handle in the next blog entry. Stay tuned.

Free Web Hosting