mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 07:13:01 +00:00
[explorer]
- Run the dialog window in a new thread patch by Mikhail Denisenko <denisenkom AT gmail DOT com> See issue #3339 for more details. svn path=/trunk/; revision=51656
This commit is contained in:
parent
4e8ffdfe77
commit
51534cffd8
1 changed files with 25 additions and 2 deletions
|
@ -2111,14 +2111,37 @@ void StartMenuHandler::ShowSearchComputer()
|
|||
MessageBox(0, TEXT("SHFindComputer() not yet implemented in SHELL32"), ResString(IDS_TITLE), MB_OK);
|
||||
}
|
||||
|
||||
void StartMenuHandler::ShowLaunchDialog(HWND hwndOwner)
|
||||
struct RunDialogThread : public Thread
|
||||
{
|
||||
int Run();
|
||||
};
|
||||
|
||||
int RunDialogThread::Run()
|
||||
{
|
||||
static DynamicFct<RUNFILEDLG> RunFileDlg(TEXT("SHELL32"), 61);
|
||||
|
||||
// RunFileDlg needs owner window to properly position dialog
|
||||
// that window will be disabled so we can't use DesktopBar
|
||||
RECT rect = {0};
|
||||
#ifndef TASKBAR_AT_TOP
|
||||
rect.top = GetSystemMetrics(SM_CYSCREEN) - DESKTOPBARBAR_HEIGHT;
|
||||
#endif
|
||||
rect.right = GetSystemMetrics(SM_CXSCREEN);
|
||||
rect.bottom = rect.top + DESKTOPBARBAR_HEIGHT;
|
||||
Static dlgOwner(0, 0, rect.left, rect.top, rect.right-rect.left, rect.bottom-rect.top, 0, 0);
|
||||
|
||||
// Show "Run..." dialog
|
||||
if (RunFileDlg) {
|
||||
(*RunFileDlg)(hwndOwner, 0, NULL, NULL, NULL, RFF_CALCDIRECTORY);
|
||||
(*RunFileDlg)(dlgOwner, 0, NULL, NULL, NULL, RFF_CALCDIRECTORY);
|
||||
}
|
||||
DestroyWindow(dlgOwner);
|
||||
return 0;
|
||||
}
|
||||
|
||||
void StartMenuHandler::ShowLaunchDialog(HWND hwndOwner)
|
||||
{
|
||||
RunDialogThread * rdt = new RunDialogThread();
|
||||
rdt->Start();
|
||||
}
|
||||
|
||||
void StartMenuHandler::ShowLogoffDialog(HWND hwndOwner)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue