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.
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__InitCommonControlsE x@4
Debug/DlgApp.exe : fatal error LNK1120: 1 unresolved externals
INITCOMMONCONTROLSEX icex;
icex.dwSize = sizeof(icex);
icex.dwICC = ICC_TAB;
InitCommonControlsEx(&icex
Main.obj : error LNK2001: unresolved external symbol __imp__InitCommonControlsE
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?
InitCommonControls(); instead (no arguments). This should work every time. What compiler and SDK are you using?
ASKER
I'm using VC++ 6, i don't know what SDK i'm using... How can i upgrade it?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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?