int OSK_DlgTimer(void);
BOOL OSK_DlgCommand(WPARAM wCommand, HWND hWndControl);
BOOL OSK_ReleaseKey(WORD ScanCode);
+VOID OSK_RestoreDlgPlacement(HWND hDlg);
INT_PTR APIENTRY OSK_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam);
LRESULT APIENTRY OSK_ThemeHandler(HWND hDlg, NMCUSTOMDRAW *pNmDraw);
return TRUE;
}
+/***********************************************************************
+ *
+ * OSK_RestoreDlgPlacement
+ *
+ * Restores the dialog placement
+ */
+VOID OSK_RestoreDlgPlacement(HWND hDlg)
+{
+ LoadDataFromRegistry();
+ SetWindowPos(hDlg, (Globals.bAlwaysOnTop ? HWND_TOPMOST : HWND_NOTOPMOST), Globals.PosX, Globals.PosY, 0, 0, SWP_NOSIZE);
+}
+
/***********************************************************************
*
* OSK_DlgClose
CheckMenuItem(GetMenu(hDlg), IDM_ENHANCED_KB, MF_BYCOMMAND | MF_CHECKED);
CheckMenuItem(GetMenu(hDlg), IDM_STANDARD_KB, MF_BYCOMMAND | MF_UNCHECKED);
+ /*
+ Before creating the dialog box restore the coordinates. The user can
+ move the dialog around before choosing a different dialog layout therefore
+ we must create the dialog with the new coordinates.
+ */
+ OSK_RestoreDlgPlacement(hDlg);
+
/* Finally, display the dialog modal box with the enhanced keyboard dialog */
DialogBoxW(Globals.hInstance,
MAKEINTRESOURCEW(MAIN_DIALOG_ENHANCED_KB),
CheckMenuItem(GetMenu(hDlg), IDM_ENHANCED_KB, MF_BYCOMMAND | MF_UNCHECKED);
CheckMenuItem(GetMenu(hDlg), IDM_STANDARD_KB, MF_BYCOMMAND | MF_CHECKED);
+ /*
+ Before creating the dialog box restore the coordinates. The user can
+ move the dialog around before choosing a different dialog layout therefore
+ we must create the dialog with the new coordinates.
+ */
+ OSK_RestoreDlgPlacement(hDlg);
+
/* Finally, display the dialog modal box with the standard keyboard dialog */
DialogBoxW(Globals.hInstance,
MAKEINTRESOURCEW(MAIN_DIALOG_STANDARD_KB),