mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
reactivate control panel folder
svn path=/trunk/; revision=14441
This commit is contained in:
parent
ce4cbf5e57
commit
87c424ef42
3 changed files with 48 additions and 23 deletions
|
@ -40,19 +40,19 @@ extern HWND create_webchildwindow(const WebChildWndInfo& info);
|
|||
|
||||
HWND MainFrameBase::Create(LPCTSTR path, bool mdi, UINT cmdshow)
|
||||
{
|
||||
HWND hMainFrame;
|
||||
HWND hFrame;
|
||||
|
||||
#ifndef _NO_MDI ///@todo implement command line option to switch between MDI and SDI
|
||||
if (mdi)
|
||||
hMainFrame = MDIMainFrame::Create();
|
||||
hFrame = MDIMainFrame::Create();
|
||||
else
|
||||
#endif
|
||||
hMainFrame = SDIMainFrame::Create();
|
||||
hFrame = SDIMainFrame::Create();
|
||||
|
||||
if (hMainFrame) {
|
||||
if (hFrame) {
|
||||
HWND hwndOld = g_Globals._hMainWnd;
|
||||
|
||||
g_Globals._hMainWnd = hMainFrame;
|
||||
g_Globals._hMainWnd = hFrame;
|
||||
|
||||
if (path) {
|
||||
static String sPath = path; // copy path to avoid accessing freed memory
|
||||
|
@ -62,8 +62,8 @@ HWND MainFrameBase::Create(LPCTSTR path, bool mdi, UINT cmdshow)
|
|||
if (hwndOld)
|
||||
DestroyWindow(hwndOld);
|
||||
|
||||
ShowWindow(hMainFrame, cmdshow);
|
||||
UpdateWindow(hMainFrame);
|
||||
ShowWindow(hFrame, cmdshow);
|
||||
UpdateWindow(hFrame);
|
||||
|
||||
bool valid_dir = false;
|
||||
|
||||
|
@ -78,12 +78,12 @@ HWND MainFrameBase::Create(LPCTSTR path, bool mdi, UINT cmdshow)
|
|||
|
||||
// Open the first child window after initializing the application
|
||||
if (valid_dir)
|
||||
PostMessage(hMainFrame, PM_OPEN_WINDOW, 0, (LPARAM)path);
|
||||
PostMessage(hFrame, PM_OPEN_WINDOW, 0, (LPARAM)path);
|
||||
else
|
||||
PostMessage(hMainFrame, PM_OPEN_WINDOW, OWM_EXPLORE|OWM_DETAILS, 0);
|
||||
PostMessage(hFrame, PM_OPEN_WINDOW, OWM_EXPLORE|OWM_DETAILS, 0);
|
||||
}
|
||||
|
||||
return hMainFrame;
|
||||
return hFrame;
|
||||
}
|
||||
|
||||
|
||||
|
@ -842,34 +842,34 @@ HWND MDIMainFrame::Create()
|
|||
|
||||
HWND MDIMainFrame::Create(LPCTSTR path, int mode)
|
||||
{
|
||||
HWND hMainFrame = Create();
|
||||
if (!hMainFrame)
|
||||
HWND hFrame = Create();
|
||||
if (!hFrame)
|
||||
return 0;
|
||||
|
||||
ShowWindow(hMainFrame, SW_SHOW);
|
||||
ShowWindow(hFrame, SW_SHOW);
|
||||
|
||||
MDIMainFrame* pMainFrame = GET_WINDOW(MDIMainFrame, hMainFrame);
|
||||
MDIMainFrame* pMainFrame = GET_WINDOW(MDIMainFrame, hFrame);
|
||||
|
||||
if (pMainFrame)
|
||||
pMainFrame->CreateChild(path, mode);
|
||||
|
||||
return hMainFrame;
|
||||
return hFrame;
|
||||
}
|
||||
|
||||
HWND MDIMainFrame::Create(LPCITEMIDLIST pidl, int mode)
|
||||
{
|
||||
HWND hMainFrame = Create();
|
||||
if (!hMainFrame)
|
||||
HWND hFrame = Create();
|
||||
if (!hFrame)
|
||||
return 0;
|
||||
|
||||
ShowWindow(hMainFrame, SW_SHOW);
|
||||
ShowWindow(hFrame, SW_SHOW);
|
||||
|
||||
MDIMainFrame* pMainFrame = GET_WINDOW(MDIMainFrame, hMainFrame);
|
||||
MDIMainFrame* pMainFrame = GET_WINDOW(MDIMainFrame, hFrame);
|
||||
|
||||
if (pMainFrame)
|
||||
pMainFrame->CreateChild(pidl, mode);
|
||||
|
||||
return hMainFrame;
|
||||
return hFrame;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1315,6 +1315,22 @@ HWND SDIMainFrame::Create(LPCITEMIDLIST pidl, int mode)
|
|||
return hFrame;
|
||||
}
|
||||
|
||||
HWND SDIMainFrame::Create(LPCTSTR path, int mode)
|
||||
{
|
||||
HWND hFrame = Create();
|
||||
if (!hFrame)
|
||||
return 0;
|
||||
|
||||
ShowWindow(hFrame, SW_SHOW);
|
||||
|
||||
MDIMainFrame* pMainFrame = GET_WINDOW(MDIMainFrame, hFrame);
|
||||
|
||||
if (pMainFrame)
|
||||
pMainFrame->CreateChild(path, mode);
|
||||
|
||||
return hFrame;
|
||||
}
|
||||
|
||||
LRESULT SDIMainFrame::WndProc(UINT nmsg, WPARAM wparam, LPARAM lparam)
|
||||
{
|
||||
switch(nmsg) {
|
||||
|
|
|
@ -135,6 +135,7 @@ struct SDIMainFrame : public ExtContextMenuHandlerT<
|
|||
SDIMainFrame(HWND hwnd);
|
||||
|
||||
static HWND Create();
|
||||
static HWND Create(LPCTSTR path, int mode=OWM_EXPLORE|OWM_DETAILS);
|
||||
static HWND Create(LPCITEMIDLIST pidl, int mode=OWM_EXPLORE|OWM_DETAILS|OWM_PIDL);
|
||||
|
||||
protected:
|
||||
|
|
|
@ -1861,10 +1861,18 @@ int StartMenuHandler::Command(int id, int code)
|
|||
#endif
|
||||
break;
|
||||
|
||||
case IDC_CONTROL_PANEL:
|
||||
case IDC_CONTROL_PANEL: {
|
||||
CloseStartMenu(id);
|
||||
//@@SDIMainFrame::Create(TEXT("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}"), 0);
|
||||
break;
|
||||
#ifndef _NO_MDI
|
||||
XMLPos explorer_options = g_Globals.get_cfg("general/explorer");
|
||||
bool mdi = XMLBool(explorer_options, "mdi", true);
|
||||
|
||||
if (mdi)
|
||||
MDIMainFrame::Create(TEXT("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}"), 0);
|
||||
else
|
||||
#endif
|
||||
SDIMainFrame::Create(TEXT("::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\::{21EC2020-3AEA-1069-A2DD-08002B30309D}"), 0);
|
||||
break;}
|
||||
|
||||
case IDC_ADMIN:
|
||||
CreateSubmenu(id, CSIDL_COMMON_ADMINTOOLS, CSIDL_ADMINTOOLS, ResString(IDS_ADMIN));
|
||||
|
|
Loading…
Reference in a new issue