Hi. I'm trying to put a status bar in my win32 app, using the following code:
(in case of WM_CREATE Message)
I added the MessageBox bit in after I compiled and ran the app and saw no StatusBar. It seems hStatus is null and that no Status Bar has been created. Could somebody please advice me as to why this is? Thankyou for any replies.Code:HWND hStatus; int statwidths[] = {100, -1}; hStatus = CreateWindowEx(0, STATUSCLASSNAME, NULL, WS_CHILD | WS_VISIBLE | SBARS_SIZEGRIP, 0, 0, 0, 0, hwnd, (HMENU)ID_STATUS, GetModuleHandle(NULL), NULL); SendMessage(hStatus, SB_SETPARTS, sizeof(statwidths)/sizeof(int), (LPARAM)statwidths); SendMessage(hStatus, SB_SETTEXT, 0, (LPARAM)"Test"); if(hStatus == NULL) MessageBox(hwnd, "Could not create StatusBar.", "Error", MB_OK | MB_ICONERROR);



LinkBack URL
About LinkBacks




.text+0x600): undefined reference to `InitCommonControls@0'