something something desktop window blah blah blah WE HAVE MDI!!!!

This commit is contained in:
freedom
2023-08-06 00:23:57 -06:00
parent 738cb64646
commit 4cf88a12af
4 changed files with 19 additions and 20 deletions

View File

@@ -111,7 +111,7 @@ LRESULT CALLBACK DeskWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar
hWndDesktop = hWnd;
// Set the window position to shell
SetShellWindow(hWndDesktop);
// SetShellWindow(hWndDesktop);
ShowWindow(hWndDesktop, SW_MAXIMIZE);
// Strip the border from the desktop window
@@ -173,11 +173,12 @@ HWND CreateListView(HWND hWndParent, RECT rc)
{
HWND hWndListView;
LVITEM lviTestItem;
//WCHAR szTestItem[] = L"Test Item\0";
WCHAR szTestItem[] = L"Test Item";
// Create the ListView
hWndListView = CreateWindowEx(WS_EX_LEFT, WC_LISTVIEW, L"",
WS_VISIBLE | WS_CHILD | WS_BORDER | LVS_ICON | LVS_SINGLESEL,
WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN |
LVS_ICON | LVS_SINGLESEL,
rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top,
hWndParent, (HMENU)ID_LISTVIEW, hAppInstance,
NULL);
@@ -192,7 +193,7 @@ HWND CreateListView(HWND hWndParent, RECT rc)
lviTestItem.iSubItem = 0;
lviTestItem.state = 0;
lviTestItem.stateMask = 0;
//lviTestItem.pszText = &szTestItem;
lviTestItem.pszText = &szTestItem;
lviTestItem.cchTextMax = MAXTITLELEN;
// lviTestItem.iImage = 1;

View File

@@ -32,7 +32,7 @@ LRESULT CALLBACK GroupWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPa
break;
}
default:
GrpProcDefault:
// GrpProcDefault:
return DefMDIChildProc(hWnd, message, wParam, lParam);
}
return 0;
@@ -49,18 +49,17 @@ HWND TempCreateGroup(HWND hMDIClient)
MDICREATESTRUCT mcs;
HWND hChild;
mcs.szTitle = L"[Untitled]";
mcs.szClass = szGrpClass;
mcs.hOwner = GetModuleHandle(NULL);
mcs.x = mcs.cx = CW_USEDEFAULT;
mcs.y = mcs.cy = CW_USEDEFAULT;
mcs.style = MDIS_ALLCHILDSTYLES;
mcs.szTitle = L"";
mcs.hOwner = hAppInstance;
mcs.x = mcs.y = mcs.cx = mcs.cy = CW_USEDEFAULT;
mcs.style = WS_VSCROLL | WS_HSCROLL;
hChild = (HWND)SendMessage(hMDIClient, WM_MDICREATE, 0, (LONG)&mcs);
if (!hChild)
{
MessageBox(hMDIClient, L"MDI Child creation failed.", L"Oh Oh...",
MB_ICONEXCLAMATION | MB_OK);
}
hChild = (HWND)SendMessage(hMDIClient, WM_MDICREATE, 0, (LPARAM)(LPTSTR)&mcs);
// if (!hChild)
// {
// MessageBox(hMDIClient, L"MDI Child creation failed.", L"Oh Oh...",
// MB_ICONEXCLAMATION | MB_OK);
// }
return hChild;
}

Binary file not shown.

View File

@@ -39,7 +39,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
// Frame Window
hWndProgMgr = hWnd;
// MDI Client Window
// Create the MDI Client Window
ccs.hWindowMenu = GetSubMenu(GetMenu(hWnd), IDM_WINDOW);
ccs.idFirstChild = IDM_WINDOW_CHILDSTART;
@@ -47,7 +47,6 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if (!(hWndMDIClient = CreateWindowEx(WS_EX_COMPOSITED, L"MDIClient",
NULL, WS_CLIPCHILDREN | WS_CHILD | WS_VSCROLL | WS_HSCROLL | WS_VISIBLE,
// rc.left - 1, rc.top - 1, rc.right + 2, rc.bottom + 2,
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
hWnd, (HMENU)1, hAppInstance, (LPWSTR)&ccs)))
{
@@ -66,7 +65,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
if (wParam == IDM_TASKMGR)
{
ShellExecute(hWndProgMgr, L"open", L"TASKMGR.EXE", NULL, NULL, SW_NORMAL);
break;
return 0;
}
if (CmdProc(hWnd, wParam, lParam))
@@ -78,7 +77,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
case WM_COMMAND:
if (CmdProc(hWnd, wParam, lParam))
break;
return 0;
goto WndProcDefault;