static VOID
-GeneralOnInit(HWND hwnd,
- PINFO pInfo)
+GeneralOnInit(PINFO pInfo)
{
- SetWindowLongPtrW(hwnd,
- GWLP_USERDATA,
- (LONG_PTR)pInfo);
-
- pInfo->hGeneralPage = hwnd;
-
SetWindowPos(pInfo->hGeneralPage,
NULL,
- 2,
- 22,
+ 13,
+ 110,
0,
0,
SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
WPARAM wParam,
LPARAM lParam)
{
- PINFO pInfo = (PINFO)GetWindowLongPtrW(hDlg,
+ PINFO pInfo = (PINFO)GetWindowLongPtrW(GetParent(hDlg),
GWLP_USERDATA);
switch (message)
{
case WM_INITDIALOG:
- GeneralOnInit(hDlg, (PINFO)lParam);
+ pInfo->hGeneralPage = hDlg;
+ GeneralOnInit(pInfo);
return TRUE;
case WM_COMMAND:
static VOID
-DisplayOnInit(HWND hwnd,
- PINFO pInfo)
+DisplayOnInit(PINFO pInfo)
{
DISPLAY_DEVICEW displayDevice;
DWORD iDevNum = 0;
BOOL GotDev = FALSE;
- SetWindowLongPtrW(hwnd,
- GWLP_USERDATA,
- (LONG_PTR)pInfo);
-
- pInfo->hDisplayPage = hwnd;
-
SetWindowPos(pInfo->hDisplayPage,
NULL,
- 2,
- 22,
+ 13,
+ 110,
0,
0,
SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);
WPARAM wParam,
LPARAM lParam)
{
- PINFO pInfo = (PINFO)GetWindowLongPtrW(hDlg,
+ PINFO pInfo = (PINFO)GetWindowLongPtrW(GetParent(hDlg),
GWLP_USERDATA);
switch (message)
{
case WM_INITDIALOG:
- DisplayOnInit(hDlg, (PINFO)lParam);
+ pInfo->hDisplayPage = hDlg;
+ DisplayOnInit(pInfo);
return TRUE;
case WM_DRAWITEM:
pInfo->hTab = GetDlgItem(hwnd, IDC_TAB);
if (pInfo->hTab)
{
- if (CreateDialogParamW(hInst,
- MAKEINTRESOURCEW(IDD_GENERAL),
- pInfo->hTab,
- GeneralDlgProc,
- (LPARAM)pInfo))
+ if (CreateDialogW(hInst,
+ MAKEINTRESOURCEW(IDD_GENERAL),
+ hwnd,
+ (DLGPROC)GeneralDlgProc))
{
WCHAR str[256];
ZeroMemory(&item, sizeof(TCITEM));
(void)TabCtrl_InsertItem(pInfo->hTab, 0, &item);
}
- if (CreateDialogParamW(hInst,
- MAKEINTRESOURCEW(IDD_DISPLAY),
- pInfo->hTab,
- DisplayDlgProc,
- (LPARAM)pInfo))
+ if (CreateDialogW(hInst,
+ MAKEINTRESOURCEW(IDD_DISPLAY),
+ hwnd,
+ (DLGPROC)DisplayDlgProc))
{
WCHAR str[256];
ZeroMemory(&item, sizeof(TCITEM));