/*
* ReactOS Standard Dialog Application Template
*
- * dialog.c
- *
- * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
+ * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
HWND hPage3;
LRESULT CreateMemoryDialog(HINSTANCE, HWND hwndOwner, LPSTR lpszMessage);
-LRESULT CALLBACK PageWndProc1(HWND, UINT, WPARAM, LPARAM);
-LRESULT CALLBACK PageWndProc2(HWND, UINT, WPARAM, LPARAM);
-LRESULT CALLBACK PageWndProc3(HWND, UINT, WPARAM, LPARAM);
+INT_PTR CALLBACK PageWndProc1(HWND, UINT, WPARAM, LPARAM);
+INT_PTR CALLBACK PageWndProc2(HWND, UINT, WPARAM, LPARAM);
+INT_PTR CALLBACK PageWndProc3(HWND, UINT, WPARAM, LPARAM);
////////////////////////////////////////////////////////////////////////////////
// Create tab pages
hTabWnd = GetDlgItem(hWnd, IDC_TAB);
- hPage1 = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PAGE1), hWnd, (DLGPROC)PageWndProc1);
- hPage2 = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PAGE2), hWnd, (DLGPROC)PageWndProc2);
- hPage3 = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PAGE3), hWnd, (DLGPROC)PageWndProc3);
+ hPage1 = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PAGE1), hWnd, PageWndProc1);
+ hPage2 = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PAGE2), hWnd, PageWndProc2);
+ hPage3 = CreateDialog(hInst, MAKEINTRESOURCE(IDD_PAGE3), hWnd, PageWndProc3);
// Insert tabs
_tcscpy(szTemp, _T("Page One"));
}
}
-LRESULT CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK DlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
int idctrl;
LPNMHDR pnmh;
return 0;
}
-
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
DialogData instData = { NULL, 34 };
hInst = hInstance;
- instData.hWnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_TABBED_DIALOG), NULL, (DLGPROC)DlgProc, (LPARAM)&instData);
+ instData.hWnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_TABBED_DIALOG), NULL, DlgProc, (LPARAM)&instData);
ShowWindow(instData.hWnd, SW_SHOW);
hAccel = LoadAccelerators(hInst, (LPCTSTR)IDR_ACCELERATOR);
while (GetMessage(&msg, NULL, 0, 0)) {
}
#else
hInst = hInstance;
- DialogBox(hInst, (LPCTSTR)IDD_TABBED_DIALOG, NULL, (DLGPROC)DlgProc);
+ DialogBox(hInst, (LPCTSTR)IDD_TABBED_DIALOG, NULL, DlgProc);
//CreateMemoryDialog(hInst, GetDesktopWindow(), "CreateMemoryDialog");
#endif
- return 0;
+ return 0;
}
/*
* ReactOS Standard Dialog Application Template
*
- * memdlg.c
- *
- * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
+ * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
////////////////////////////////////////////////////////////////////////////////
-LRESULT CALLBACK DialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK DialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
return 0;
}
*lpw++ = 0; // no creation data
GlobalUnlock(hgbl);
- ret = DialogBoxIndirect(hinst, (LPDLGTEMPLATE)hgbl, hwndOwner, (DLGPROC)DialogWndProc);
+ ret = DialogBoxIndirect(hinst, (LPDLGTEMPLATE)hgbl, hwndOwner, DialogWndProc);
if (ret == 0) {
TRACE(_T("DialogBoxIndirect() failed due to invalid handle to parent window: 0x%08X"), hwndOwner);
} else if (ret == -1) {
/*
* ReactOS About Dialog Box
*
- * about.c
- *
- * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
+ * Copyright (C) 2002 Robert Dickenson <robd@reactos.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
extern HINSTANCE hInst;
-LRESULT CALLBACK AboutDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+INT_PTR CALLBACK AboutDialogWndProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
HWND hLicenseEditWnd;
TCHAR strLicense[0x1000];
void ShowAboutBox(HWND hWnd)
{
- DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, (DLGPROC)AboutDialogWndProc);
+ DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, AboutDialogWndProc);
}