mirror of
https://github.com/reactos/reactos.git
synced 2024-11-28 05:53:31 +08:00
[OSK] Use new coordinates on keyboard layout changing (#1745)
CORE-16214
This commit is contained in:
parent
31d616ff73
commit
4c4e3d6048
@ -22,6 +22,7 @@ int OSK_DlgClose(void);
|
||||
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);
|
||||
@ -255,6 +256,18 @@ int OSK_DlgInitDialog(HWND hDlg)
|
||||
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
|
||||
@ -593,6 +606,13 @@ INT_PTR APIENTRY OSK_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
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),
|
||||
@ -619,6 +639,13 @@ INT_PTR APIENTRY OSK_DlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
|
||||
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),
|
||||
|
Loading…
Reference in New Issue
Block a user