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?
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.
Thanks for the info. There is just one problem, how do I do all of this if mgFindGuiByID returns NULL for my tab control?
Not a problem... Simply get the HWND of the dialog and use the Windows functions to get pointers to its HWND children.