mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 21:23:05 +00:00
[NOTEPAD] Use wait cursor (#5659)
- Add WaitCursor helper function to display the wait cursor while heavy operation. - Manage the wait cursor by using a lock count. CORE-18837
This commit is contained in:
parent
7497f028f4
commit
0ef9cfb04e
3 changed files with 49 additions and 1 deletions
|
@ -433,6 +433,8 @@ NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
FINDREPLACE *pFindReplace = (FINDREPLACE *) lParam;
|
||||
Globals.find = *(FINDREPLACE *) lParam;
|
||||
|
||||
WaitCursor(TRUE);
|
||||
|
||||
if (pFindReplace->Flags & FR_FINDNEXT)
|
||||
NOTEPAD_FindNext(pFindReplace, FALSE, TRUE);
|
||||
else if (pFindReplace->Flags & FR_REPLACE)
|
||||
|
@ -441,6 +443,8 @@ NOTEPAD_WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
NOTEPAD_ReplaceAll(pFindReplace);
|
||||
else if (pFindReplace->Flags & FR_DIALOGTERM)
|
||||
NOTEPAD_FindTerm();
|
||||
|
||||
WaitCursor(FALSE);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -587,7 +591,7 @@ int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE prev, LPTSTR cmdline, int sh
|
|||
wndclass.lpfnWndProc = NOTEPAD_WndProc;
|
||||
wndclass.hInstance = Globals.hInstance;
|
||||
wndclass.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_NPICON));
|
||||
wndclass.hCursor = LoadCursor(0, IDC_ARROW);
|
||||
wndclass.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wndclass.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
|
||||
wndclass.lpszMenuName = MAKEINTRESOURCE(MAIN_MENU);
|
||||
wndclass.lpszClassName = className;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue