Playing aroung with the dialog editor and the new Tab control that was added.
Tried to create a simple tab interface Inititaly only the tab. When the code gets generated and run it only creates a box
on the window not a Tab control. When you run the test it works correctly. But not for the generated source.
This was created as to be a dialog not a window not sure if this makes a differance.
Here is the code it generates.
Don
#define TAB_1 1
class dlg:dialog
{
declare OnInitDialog(),int;
declare OnClose(),int;
declare OnControl(int nID, int nNotifyCode, unsigned int hControl),int;
}
global sub main()
{
dlg d1;
d1.Create(0,0,520,341,0x80CB0080,0,"My Tab Test",0);
d1.AddControl(CTTABCTRL,"Tab Control",62,62,421,210,0x54030040,0x0,TAB_1);
d1.DoModal();
return 0;
}
dlg::OnClose(),int
{
CloseDialog(1);
return true;
}
dlg::OnInitDialog(),int
{
/* Initialize any controls here */
CenterWindow();
return true;
}
dlg::OnControl(int nID, int nNotifyCode, unsigned int hControl),int
{
select nID
{
case TAB_1:
/* respond to control notifications here */
}
return true;
}
A tab control looks like a button (just a box) until you add tabs to it. Insert a couple AddTab calls (or whatever it's called, I haven't used that class yet) in the OnInitDialog function.
See the example file "tabctrl.src"