Link to home
Start Free TrialLog in
Avatar of Markenstein
Markenstein

asked on

Dialog tabbed control won't show

I have a win32 api dialog program (no MFC).  When i try to add a tabbed control from the toolbar onto the dialog using the resource editor and compile it, it gives me 0 warnings and 0 errors.  Yet the form doesn't show.  What can i do?  When i delete the tabbed control the form shows.
Avatar of tkirby052098
tkirby052098

Assuming that the "visible" box is checked in the tab control resource properties, then the most likely causes are...

1) you have not initialized the common controls dll properly

INITCOMMONCONTROLSEX icex;
icex.dwSize = sizeof(icex);
icex.dwICC = ICC_TAB_CLASSES;
InitCommonControlsEx(&icex);

2) you have not inserted any tabs into the control. without this step you are trying to display an empty control, so you see nothing. use TabCtrl_InsertItem and/or TabCtrl_SetItem as needed to add tabs to the control.

does this help?
Avatar of Markenstein

ASKER

I get the following errors after i added the commctrl.h.

INITCOMMONCONTROLSEX icex;
icex.dwSize = sizeof(icex);
icex.dwICC = ICC_TAB;
InitCommonControlsEx(&icex);

Main.obj : error LNK2001: unresolved external symbol __imp__InitCommonControlsEx@4
Debug/DlgApp.exe : fatal error LNK1120: 1 unresolved externals
Okay, you must be running an old version of the SDK (the extended function is not supported in your common controls .lib and .dll files).  Try
InitCommonControls(); instead (no arguments).  This should work every time.  What compiler and SDK are you using?
I'm using VC++ 6, i don't know what SDK i'm using...  How can i upgrade it?
ASKER CERTIFIED SOLUTION
Avatar of tkirby052098
tkirby052098

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial