I must be blind and not see something, or I've stared at this for too long... or both. But can someone help me see what is going on here? I successfully set up the tabs in another program, and am trying to do the same to my current project. The only difference between the two projects is this one is on a dialog and the previous working one was a main WndProc() window. Here is the section that is giving me the error.
Code:case WM_INITDIALOG: { RECT rect; tablehwnd = onehwnd; GetClientRect(tablehwnd, &rect); InitCommonControls(); //Create tabbed window hwndTab = CreateWindow(WC_TABCONTROL,"",WS_CHILD|WS_VISIBLE, //<< line that is having trouble 0,0,rect.right,rect.bottom,tablehwnd,(HMENU)TCITEM_HANDLE, (HINSTANCE)GetWindowLong(tablehwnd,GWL_HINSTANCE),NULL); //Set up tabs tcitem.mask = TCIF_TEXT; //Create tabs tcitem.pszText = "Tab 1"; int tabctrlone = TabCtrl_InsertItem(hwndTab, 0, &tcitem); tcitem.pszText = "Tab 2"; int tabctrltwo = TabCtrl_InsertItem(hwndTab, 1, &tcitem); //Set tab index to 0, and show window for tab 0 TabCtrl_SetCurSel(hwndTab,0); ShowWindow(hwndCalc,SW_SHOW); //Change tab font SendMessage (hwndTab,WM_SETFONT,(WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0); } break;EDIT: Fixed it! I don't exactly know why, but I changed the (HMENU)TCITEM_HANDLE to NULL and it worked. If someone wants to explain that to me that'd be awesome, otherwise it's no big deal.Code:C:\Beta Studios\CP Full\main.h||In function `BOOL MathTableProc(HWND__*, UINT, WPARAM, LPARAM)':| C:\Beta Studios\CP Full\main.h|4519|error: expected primary-expression before ')' token| ||=== Build finished: 1 errors, 1 warnings ===|



LinkBack URL
About LinkBacks



