I'm trying to get the text from a tab control like this:
TCITEM itm;
itm.mask = TCIF_TEXT;
TabCtrl_GetItem(engineGL.controls.MainGlTab.MainTabHwnd,i,&itm);
but the psztext part of the structure is returning a bad pointer (0xcccccccccc).
I create the tabs like this:
void OGLMAINTAB::AddTab( char *name )
{
TCITEM itm;
itm.cchTextMax = 30;
itm.pszText = name;
itm.mask = TCIF_TEXT;
int numitems = TabCtrl_GetItemCount(MainTabHwnd);
SendMessage(MainTabHwnd,TCM_INSERTITEM,numitems,(LPARAM)&itm);
}
why is it not returning the text as I want it to?
Thanks