Code: Show/Hide INT_PTR CALLBACK IMsgsWndProc(HWND page, UINT msg, WPARAM wParam, LPARAM lParam);
//and so on... DLGPROC procs[NUM_PAGES] = { &IMsgsWndProc, &PlyWndProc, &VictWndProc, &DisWndProc, &MapWndProc, &UnitWndProc, &TrigWndProc }; |
Code: Show/Hide // The INT_PTR is guaranteed to be the same size as a pointer.
typedef _W64 int INT_PTR, *PINT_PTR; typedef INT_PTR (CALLBACK* DLGPROC)(HWND, UINT, WPARAM, LPARAM); |
Code: Show/Hide WORD PropSheetButtons[] = { IDOK, IDCANCEL, IDHELP };
//remove buttons for (int i = 0; i < sizeof(PropSheetButtons); i++) { HWND hWnd = GetDlgItem(sheet, PropSheetButtons[i]); if (hWnd != NULL) { ShowWindow(hWnd, SW_HIDE); EnableWindow(hWnd, FALSE); } } |
Quote: |
I wasn't dividing sizeof(PropSheetButtons) by sizeof(WORD) |