diff --git a/progmgr/desktop.c b/progmgr/desktop.c index ed4ca81..5347a99 100644 --- a/progmgr/desktop.c +++ b/progmgr/desktop.c @@ -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; diff --git a/progmgr/group.c b/progmgr/group.c index a7d3b37..76740fd 100644 --- a/progmgr/group.c +++ b/progmgr/group.c @@ -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; } \ No newline at end of file diff --git a/progmgr/icons/src/progmgr.pdn b/progmgr/icons/src/progmgr.pdn index f29664b..80444c6 100644 Binary files a/progmgr/icons/src/progmgr.pdn and b/progmgr/icons/src/progmgr.pdn differ diff --git a/progmgr/wndproc.c b/progmgr/wndproc.c index e74f3c7..5a70579 100644 --- a/progmgr/wndproc.c +++ b/progmgr/wndproc.c @@ -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;