Start a new topic

Tabs in a plugin

Original Post by: spoulin Thu Dec 17 19:42:15 2009


Hi,


I'm trying to create a plugin with some tabs and I'm having some problems. I've just started and I'm just tring to get the handle on the Tab Control and it is not working. mgFindGuiById is returning NULL for the control. I've tried to get the gui of the other controls and it works. In the .rc file, the Tab Control is a SysTabControl32. Is this type of control supported? If not, what can I use to create some tabs?


Thanks,

Steven


Original Post by: SteveThompson Thu Dec 17 21:54:22 2009


The API does not support Tab Controls (directly). The controls directly supported by the API are those listed in Chapter 14 of the OpenFlight API User Guide Volume 2. While the API does not support Tab controls, you certainly can subclass your plugin dialog and do anything you want with the controls it contains. The attrviewer sample plugin shows how you might do this to support the Windows Tree Control.


See API functions mgDialogSubclass and mgControlSubclass for more information.

Original Post by: spoulin Fri Dec 18 17:30:26 2009


Thanks for the info. There is just one problem, how do I do all of this if mgFindGuiByID returns NULL for my tab control?

Original Post by: SteveThompson Fri Dec 18 18:28:20 2009


Not a problem... Simply get the HWND of the dialog and use the Windows functions to get pointers to its HWND children.

Login to post a comment