Fixed about box :-P

This commit is contained in:
Johnny Bergström 2005-01-21 16:23:55 +00:00
parent e98fb7d6e4
commit 6200ee6977
2 changed files with 26 additions and 2 deletions

View File

@ -209,7 +209,7 @@ void ListboxItemSelected(HWND hDlg) {
SetDlgItemInt(hDlg, IDC_EDIT_DEFUSED, stats->bDefused, 0); SetDlgItemInt(hDlg, IDC_EDIT_DEFUSED, stats->bDefused, 0);
} }
// Message handler for about WinCSXBox. // Message handler for WinCSXBox.
LRESULT CALLBACK WinCSXBox(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) LRESULT CALLBACK WinCSXBox(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{ {
switch (message) switch (message)
@ -237,7 +237,7 @@ LRESULT CALLBACK WinCSXBox(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
} }
break; break;
case IDC_ABOUT: case IDC_ABOUT:
DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hDlg, (DLGPROC)WinCSXBox); DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hDlg, (DLGPROC)AboutBox);
break; break;
} }
break; break;
@ -246,4 +246,27 @@ LRESULT CALLBACK WinCSXBox(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam
return FALSE; return FALSE;
} }
// Message handler for AboutBox.
LRESULT CALLBACK AboutBox(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
return InitWinCSXBox(hDlg); // load all data from file and fill the listbox with the shit
case WM_COMMAND:
switch (LOWORD(wParam))
{
case IDOK:
case IDCANCEL:
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}

View File

@ -19,5 +19,6 @@ ATOM MyRegisterClass(HINSTANCE hInstance);
BOOL InitInstance(HINSTANCE, int); BOOL InitInstance(HINSTANCE, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK WinCSXBox(HWND, UINT, WPARAM, LPARAM); LRESULT CALLBACK WinCSXBox(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK AboutBox(HWND, UINT, WPARAM, LPARAM);
bool LoadRankFromFile(HWND hDlg); bool LoadRankFromFile(HWND hDlg);