1. win32lib ??
- Posted by Bernie Ryan <bwryan at PCOM.NET> Sep 05, 1999
- 326 views
David: What is the reason that you register the main window every time createWindow procedure is called ? Bernie
2. Re: win32lib ??
- Posted by David Cuny <dcuny at LANSET.COM> Sep 05, 1999
- 311 views
Bernie Ryan wondered: > What is the reason that you register the main > window every time createWindow procedure > is called ? I was under the impression that you had to register all the windows. Am I mistaken? The class name for each window is "Win32Lib%d", where %d uses the control id. Each window gets a new control id, so each window should be registered as a new class. -- David Cuny
3. Re: win32lib ??
- Posted by Terry <terry at EDERNEY.IDPS.CO.UK> Sep 05, 1999
- 314 views
Bernie Ryan wondered: >> What is the reason that you register the main >> window every time createWindow procedure >> is called ? David Cuny replied: >I was under the impression that you had to >register all the windows. Am I >mistaken? Yes. You only need to register for new window types. Therefore, in most cases, it is only neccesary to register the first window you create(i.e register as win32lib1 as you do for your first window). The others can all then be created with win32lib1 as the lpClassName element of CreateWindow. I think you must have forgotten, David, that we had this discussion a few months ago, because I had to rewrite several portions of your main create() function for this exact reason. Also, registering every window in this way makes it impossible to use other, preregistered, window types, i.e syslistview, except for the ones you specifically allow, i.e. button, group, edit etc. At that time I sent you code that overcomes this problem, and you said that you would use it in future versions of win32lib. If you would like another copy let me know. All the best Terry
4. Re: win32lib ??
- Posted by Bernie Ryan <bwryan at PCOM.NET> Sep 05, 1999
- 310 views
On Sun, 5 Sep 1999 10:31:49 -0700, David Cuny <dcuny at LANSET.COM> wrote: >The class name for each window is "Win32Lib%d", where %d uses the control >id. Each window gets a new control id, so each window should be registered >as a new class. > >-- David Cuny First you create and initialize wndProcFunc variable pointer to zero. My undestanding is that main window is the application it self. The windclass structure describes the template for creating the main window. This template is registered to let windows know about this application window and how it should look. Then you have to create this application window ( which is pointing WndProcFunc NULL for the forward reference ) after the WndProc is defined. But the mainwindow class is only registered once. A control that is to be used must have a unique IDC_XXXXXXX assigned to it ( IDentificationControl mylistbox ) like this constant IDC_MYLISTBOX = 1001 -- this can be any UNIQUE number When the control is created, it is a child window of the main window therefore the parentwindowhandle is set to the MAIN window handle. The window menu (handle can be the menu or ) can be set to the IDC_MYLISTBOX to tell windows when something happens to this control we use this IDC_XXXXX as a reference when responding to the parent's message switching WM_COMMAND Maybe I'am wrong ? Bernie
5. Re: win32lib ??
- Posted by "Cuny, David" <David.Cuny at DSS.CA.GOV> Sep 07, 1999
- 310 views
Terry wrote: > I think you must have forgotten, David, that > we had this discussion a few months ago ... > ... If you would like another copy let me know. Yes, please. -- David Cuny