Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
456426f7bf | ||
|
|
c1f6cc41ac | ||
|
|
f6d8a032d3 | ||
|
|
c16ebce58c | ||
|
|
dbd33f1e5d | ||
|
|
e333bec949 | ||
|
|
4cf88a12af | ||
|
|
738cb64646 | ||
|
|
1206264a68 | ||
|
|
8ab85cecf0 |
@@ -1,3 +1,4 @@
|
|||||||
7z a -r "%~dp0bin\bin.7z" "%~dp0bin\*.exe"
|
7z a -r "%~dp0bin\bin.7z" "%~dp0bin\*.exe"
|
||||||
WinRAR a -r "%~dp0bin\bin.rar" "%~dp0bin\*.exe"
|
WinRAR a -r "%~dp0bin\bin.rar" "%~dp0bin\*.exe"
|
||||||
|
del /s "%~dp0bin\*.exe"
|
||||||
pause
|
pause
|
||||||
@@ -111,7 +111,7 @@ LRESULT CALLBACK DeskWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lPar
|
|||||||
hWndDesktop = hWnd;
|
hWndDesktop = hWnd;
|
||||||
|
|
||||||
// Set the window position to shell
|
// Set the window position to shell
|
||||||
SetShellWindow(hWndDesktop);
|
// SetShellWindow(hWndDesktop);
|
||||||
ShowWindow(hWndDesktop, SW_MAXIMIZE);
|
ShowWindow(hWndDesktop, SW_MAXIMIZE);
|
||||||
|
|
||||||
// Strip the border from the desktop window
|
// Strip the border from the desktop window
|
||||||
@@ -173,11 +173,12 @@ HWND CreateListView(HWND hWndParent, RECT rc)
|
|||||||
{
|
{
|
||||||
HWND hWndListView;
|
HWND hWndListView;
|
||||||
LVITEM lviTestItem;
|
LVITEM lviTestItem;
|
||||||
//WCHAR szTestItem[] = L"Test Item\0";
|
WCHAR szTestItem[] = L"Test Item";
|
||||||
|
|
||||||
// Create the ListView
|
// Create the ListView
|
||||||
hWndListView = CreateWindowEx(WS_EX_LEFT, WC_LISTVIEW, L"",
|
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,
|
rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top,
|
||||||
hWndParent, (HMENU)ID_LISTVIEW, hAppInstance,
|
hWndParent, (HMENU)ID_LISTVIEW, hAppInstance,
|
||||||
NULL);
|
NULL);
|
||||||
@@ -192,11 +193,11 @@ HWND CreateListView(HWND hWndParent, RECT rc)
|
|||||||
lviTestItem.iSubItem = 0;
|
lviTestItem.iSubItem = 0;
|
||||||
lviTestItem.state = 0;
|
lviTestItem.state = 0;
|
||||||
lviTestItem.stateMask = 0;
|
lviTestItem.stateMask = 0;
|
||||||
//lviTestItem.pszText = &szTestItem;
|
lviTestItem.pszText = (LPWSTR)&szTestItem;
|
||||||
lviTestItem.cchTextMax = MAXTITLELEN;
|
lviTestItem.cchTextMax = MAXTITLELEN;
|
||||||
// lviTestItem.iImage = 1;
|
// lviTestItem.iImage = 1;
|
||||||
|
|
||||||
ListView_InsertItem(hWndListView, &lviTestItem);
|
ListView_InsertItem(hWndListView, &lviTestItem);
|
||||||
|
|
||||||
return hWndListView;
|
return hWndListView;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
GROUP.C -
|
GROUP.C -
|
||||||
Copyright (c) 2023 freedom7341, Vortesys
|
Copyright (c) 2023 freedom7341, Vortesys
|
||||||
DESCRIPTION -
|
DESCRIPTION -
|
||||||
Group window and program item functions.
|
Group window and program group/item functions.
|
||||||
LICENSE INFORMATION -
|
LICENSE INFORMATION -
|
||||||
MIT License, see LICENSE.txt in the root folder
|
MIT License, see LICENSE.txt in the root folder
|
||||||
\* * * * * * * */
|
\* * * * * * * */
|
||||||
@@ -15,4 +15,62 @@
|
|||||||
// #define WIN32_LEAN_AND_MEAN
|
// #define WIN32_LEAN_AND_MEAN
|
||||||
#include <Windows.h>
|
#include <Windows.h>
|
||||||
|
|
||||||
/* Functions */
|
/* Variables */
|
||||||
|
WNDCLASSEX wcGrp;
|
||||||
|
|
||||||
|
/* Functions */
|
||||||
|
|
||||||
|
/* * * *\
|
||||||
|
GroupWndProc -
|
||||||
|
Group window procedure.
|
||||||
|
RETURNS -
|
||||||
|
Zero if nothing, otherwise returns the good stuff.
|
||||||
|
\* * * */
|
||||||
|
LRESULT CALLBACK GroupWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
|
{
|
||||||
|
switch (message)
|
||||||
|
{
|
||||||
|
case WM_CREATE:
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
// GroupProcDefault:
|
||||||
|
return DefMDIChildProc(hWnd, message, wParam, lParam);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* * * *\
|
||||||
|
InitGroups -
|
||||||
|
Initialize variables for the betterment of groups forever
|
||||||
|
Make great glorious MDI Client
|
||||||
|
RETURNS -
|
||||||
|
Zero if nothing, otherwise returns the good stuff.
|
||||||
|
\* * * */
|
||||||
|
|
||||||
|
/* * * *\
|
||||||
|
TempCreateGroup -
|
||||||
|
th
|
||||||
|
RETURNS -
|
||||||
|
handle to window
|
||||||
|
\* * * */
|
||||||
|
HWND TempCreateGroup(HWND hMDIClient)
|
||||||
|
{
|
||||||
|
MDICREATESTRUCT mcs;
|
||||||
|
HWND hChild;
|
||||||
|
|
||||||
|
mcs.szClass = szGrpClass;
|
||||||
|
mcs.szTitle = L"";
|
||||||
|
mcs.hOwner = hAppInstance;
|
||||||
|
mcs.x = mcs.y = mcs.cx = mcs.cy = CW_USEDEFAULT;
|
||||||
|
mcs.style = WS_VISIBLE;
|
||||||
|
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
GROUP.H -
|
GROUP.H -
|
||||||
Copyright (c) 2023 freedom7341, Vortesys
|
Copyright (c) 2023 freedom7341, Vortesys
|
||||||
DESCRIPTION -
|
DESCRIPTION -
|
||||||
Program group and item structures and... stuff.
|
Program group/item structures, functions and definitons
|
||||||
LICENSE INFORMATION -
|
LICENSE INFORMATION -
|
||||||
MIT License, see LICENSE.txt in the root folder
|
MIT License, see LICENSE.txt in the root folder
|
||||||
\* * * * * * * */
|
\* * * * * * * */
|
||||||
@@ -13,3 +13,58 @@
|
|||||||
/* Includes */
|
/* Includes */
|
||||||
#include <wtypes.h>
|
#include <wtypes.h>
|
||||||
|
|
||||||
|
/* Definitions */
|
||||||
|
#define MAX_GROUPS 512
|
||||||
|
#define MAX_ITEMS 512
|
||||||
|
#define MAX_TITLE_LENGTH MAX_PATH
|
||||||
|
// Group Format Definitions
|
||||||
|
#define GRP_SIGNATURE 0x47324D50L // PM2G
|
||||||
|
// Group Flag Values (DWORD)
|
||||||
|
#define GRP_FLAG_COMMON 0x00000001
|
||||||
|
#define GRP_FLAG_READONLY 0x00000002
|
||||||
|
#define GRP_FLAG_MINIMIZED 0x00000004
|
||||||
|
#define GRP_FLAG_MAXIMIZED 0x00000008
|
||||||
|
|
||||||
|
/* Structures */
|
||||||
|
// Item Structure
|
||||||
|
typedef struct _ITEM {
|
||||||
|
// Item executable and name
|
||||||
|
WCHAR szItemName[MAX_TITLE_LENGTH];
|
||||||
|
WCHAR szExecPath[MAX_PATH]; // Path of the item executable
|
||||||
|
WCHAR szWorkPath[MAX_PATH]; // Working directory
|
||||||
|
|
||||||
|
// Icon
|
||||||
|
WCHAR szIconPath[MAX_PATH]; // Path of the icon
|
||||||
|
UINT uiIconIndex; // Index of the icon
|
||||||
|
} ITEM, * PITEM;
|
||||||
|
|
||||||
|
// Group format, .GRP
|
||||||
|
typedef struct _GROUP {
|
||||||
|
// Group file header
|
||||||
|
DWORD dwSignature; // Set to GRP_SIGNATURE
|
||||||
|
WORD wVersion; // Group format version
|
||||||
|
WORD wChecksum;
|
||||||
|
|
||||||
|
// Group information
|
||||||
|
WCHAR szGroupName[MAX_TITLE_LENGTH];
|
||||||
|
DWORD dwFlags; // Use with GRP_FLAG_* values.
|
||||||
|
FILETIME ftLastWrite;
|
||||||
|
|
||||||
|
// Items
|
||||||
|
WORD cItems; // Number of items
|
||||||
|
PITEM iItems; // Array of items
|
||||||
|
} GROUP, * PGROUP;
|
||||||
|
|
||||||
|
// Group window information
|
||||||
|
typedef struct _GROUPWND {
|
||||||
|
// Window information
|
||||||
|
HWND hWndGroup;
|
||||||
|
RECT rcGroup; // Window rectangle
|
||||||
|
|
||||||
|
// Group information
|
||||||
|
HANDLE hGroup; // Handle to GROUP object
|
||||||
|
} GROUPINFO, * PGROUPINFO;
|
||||||
|
|
||||||
|
/* Function Prototypes */
|
||||||
|
LRESULT CALLBACK GroupWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
HWND TempCreateGroup(HWND hMDIClient);
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
Binary file not shown.
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
/* Headers */
|
/* Headers */
|
||||||
#include "progmgr.h"
|
#include "progmgr.h"
|
||||||
|
#include "group.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "registry.h"
|
#include "registry.h"
|
||||||
// #define WIN32_LEAN_AND_MEAN
|
// #define WIN32_LEAN_AND_MEAN
|
||||||
@@ -18,15 +19,18 @@
|
|||||||
/* Variables */
|
/* Variables */
|
||||||
// Global
|
// Global
|
||||||
BOOL bIsDefaultShell = FALSE;
|
BOOL bIsDefaultShell = FALSE;
|
||||||
|
// Window Related
|
||||||
|
HICON hProgMgrIcon = NULL;
|
||||||
|
HICON hGroupIcon = NULL;
|
||||||
|
HINSTANCE hAppInstance;
|
||||||
|
HWND hWndProgMgr = NULL;
|
||||||
|
HWND hWndMDIClient = NULL;
|
||||||
// Global Strings
|
// Global Strings
|
||||||
WCHAR szAppTitle[32];
|
WCHAR szAppTitle[32];
|
||||||
WCHAR szProgMgr[] = L"progmgr";
|
WCHAR szProgMgr[] = L"progmgr";
|
||||||
WCHAR szWebsite[64];
|
WCHAR szWebsite[64];
|
||||||
// Window Related
|
WCHAR szClass[16];
|
||||||
HICON hProgMgrIcon = NULL;
|
WCHAR szGrpClass[16];
|
||||||
HINSTANCE hAppInstance;
|
|
||||||
HWND hWndProgMgr = NULL;
|
|
||||||
HWND hWndMDIClient = NULL;
|
|
||||||
|
|
||||||
/* Functions */
|
/* Functions */
|
||||||
|
|
||||||
@@ -41,8 +45,8 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
|
|||||||
HMENU hMenu;
|
HMENU hMenu;
|
||||||
HMENU hSystemMenu;
|
HMENU hSystemMenu;
|
||||||
WNDCLASS wc = { 0 };
|
WNDCLASS wc = { 0 };
|
||||||
|
WNDCLASSEX wce = { 0 };
|
||||||
WCHAR szBuffer[MAX_PATH];
|
WCHAR szBuffer[MAX_PATH];
|
||||||
WCHAR szClass[16];
|
|
||||||
RECT rcRoot;
|
RECT rcRoot;
|
||||||
POINT ptOffset;
|
POINT ptOffset;
|
||||||
|
|
||||||
@@ -50,24 +54,41 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
|
|||||||
|
|
||||||
// Create Strings
|
// Create Strings
|
||||||
LoadString(hAppInstance, IDS_PMCLASS, szClass, ARRAYSIZE(szClass));
|
LoadString(hAppInstance, IDS_PMCLASS, szClass, ARRAYSIZE(szClass));
|
||||||
|
LoadString(hAppInstance, IDS_GRPCLASS, szGrpClass, ARRAYSIZE(szGrpClass));
|
||||||
LoadString(hAppInstance, IDS_APPTITLE, szAppTitle, ARRAYSIZE(szAppTitle));
|
LoadString(hAppInstance, IDS_APPTITLE, szAppTitle, ARRAYSIZE(szAppTitle));
|
||||||
LoadString(hAppInstance, IDS_WEBSITE, szWebsite, ARRAYSIZE(szWebsite));
|
LoadString(hAppInstance, IDS_WEBSITE, szWebsite, ARRAYSIZE(szWebsite));
|
||||||
|
|
||||||
// Get Desktop background color
|
// Get Desktop background color
|
||||||
//CreateSolidBrush(GetBackgroundColor
|
//CreateSolidBrush(GetBackgroundColor
|
||||||
|
|
||||||
// Register the Frame Window
|
// Register the Frame Window Class
|
||||||
wc.lpfnWndProc = WndProc;
|
wc.lpfnWndProc = WndProc;
|
||||||
wc.hInstance = hAppInstance;
|
wc.hInstance = hAppInstance;
|
||||||
wc.hIcon = hProgMgrIcon = LoadImage(hAppInstance, MAKEINTRESOURCE(IDI_PROGMGR), IMAGE_ICON,
|
wc.hIcon = hProgMgrIcon = LoadImage(hAppInstance, MAKEINTRESOURCE(IDI_PROGMGR), IMAGE_ICON,
|
||||||
0, 0, LR_DEFAULTSIZE | LR_SHARED);
|
0, 0, LR_DEFAULTSIZE | LR_SHARED);
|
||||||
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||||
wc.hbrBackground = (HBRUSH)(COLOR_BACKGROUND);
|
// wc.hbrBackground = (HBRUSH)(COLOR_BACKGROUND);
|
||||||
|
wc.hbrBackground = NULL;
|
||||||
wc.lpszMenuName = MAKEINTRESOURCE(IDM_MAIN);
|
wc.lpszMenuName = MAKEINTRESOURCE(IDM_MAIN);
|
||||||
wc.lpszClassName = szClass;
|
wc.lpszClassName = szClass;
|
||||||
if (!RegisterClass(&wc))
|
if (!RegisterClass(&wc))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
// Register the Group Window Class
|
||||||
|
wce.cbSize = sizeof(WNDCLASSEX);
|
||||||
|
wce.lpfnWndProc = GroupWndProc;
|
||||||
|
wce.cbClsExtra = 0;
|
||||||
|
wce.cbWndExtra = 0;
|
||||||
|
wce.hInstance = hAppInstance;
|
||||||
|
wce.hIcon = hGroupIcon = LoadImage(hAppInstance, MAKEINTRESOURCE(IDI_PROGGRP), IMAGE_ICON,
|
||||||
|
0, 0, LR_DEFAULTSIZE | LR_SHARED);
|
||||||
|
wce.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||||
|
wce.hbrBackground = (HBRUSH)(COLOR_WINDOW + 1);
|
||||||
|
wce.lpszMenuName = NULL;
|
||||||
|
wce.lpszClassName = szGrpClass;
|
||||||
|
if (!RegisterClassEx(&wce))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
// Load the Accelerator table
|
// Load the Accelerator table
|
||||||
hAccel = LoadAccelerators(hAppInstance, MAKEINTRESOURCE(IDA_ACCELS));
|
hAccel = LoadAccelerators(hAppInstance, MAKEINTRESOURCE(IDA_ACCELS));
|
||||||
if (!hAccel)
|
if (!hAccel)
|
||||||
|
|||||||
@@ -32,12 +32,15 @@
|
|||||||
// PROGMGR.C
|
// PROGMGR.C
|
||||||
extern BOOL bIsDefaultShell;
|
extern BOOL bIsDefaultShell;
|
||||||
extern HICON hProgMgrIcon;
|
extern HICON hProgMgrIcon;
|
||||||
|
extern HICON hGroupIcon;
|
||||||
extern HINSTANCE hAppInstance;
|
extern HINSTANCE hAppInstance;
|
||||||
extern HWND hWndProgMgr;
|
extern HWND hWndProgMgr;
|
||||||
extern HWND hWndMDIClient;
|
extern HWND hWndMDIClient;
|
||||||
extern WCHAR szAppTitle[32];
|
extern WCHAR szAppTitle[32];
|
||||||
extern WCHAR szProgMgr[];
|
extern WCHAR szProgMgr[];
|
||||||
extern WCHAR szWebsite[64];
|
extern WCHAR szWebsite[64];
|
||||||
|
extern WCHAR szClass[16];
|
||||||
|
extern WCHAR szGrpClass[16];
|
||||||
|
|
||||||
/* Function Prototypes */
|
/* Function Prototypes */
|
||||||
// DESKTOP.C
|
// DESKTOP.C
|
||||||
@@ -50,4 +53,4 @@ BOOL SetShellWindow(HWND hWndShell);
|
|||||||
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
LRESULT CALLBACK CmdProc(HWND hWnd, WPARAM wParam, LPARAM lParam);
|
LRESULT CALLBACK CmdProc(HWND hWnd, WPARAM wParam, LPARAM lParam);
|
||||||
VOID UpdateChecks(BOOL bVarMenu, UINT uSubMenu, UINT uID);
|
VOID UpdateChecks(BOOL bVarMenu, UINT uSubMenu, UINT uID);
|
||||||
VOID UpdateWindowTitle();
|
VOID UpdateWindowTitle();
|
||||||
|
|||||||
@@ -187,4 +187,4 @@ BOOL LoadConfig()
|
|||||||
bConfigStatus = FALSE;
|
bConfigStatus = FALSE;
|
||||||
|
|
||||||
return bConfigStatus;
|
return bConfigStatus;
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
@@ -9,6 +9,7 @@
|
|||||||
|
|
||||||
/* Headers */
|
/* Headers */
|
||||||
#include "progmgr.h"
|
#include "progmgr.h"
|
||||||
|
#include "group.h"
|
||||||
#include "resource.h"
|
#include "resource.h"
|
||||||
#include "registry.h"
|
#include "registry.h"
|
||||||
// #define WIN32_LEAN_AND_MEAN
|
// #define WIN32_LEAN_AND_MEAN
|
||||||
@@ -30,78 +31,74 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
{
|
{
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
|
case WM_CREATE:
|
||||||
case WM_CREATE:
|
|
||||||
{
|
|
||||||
RECT rc;
|
|
||||||
CLIENTCREATESTRUCT ccs;
|
|
||||||
|
|
||||||
// Frame Window
|
|
||||||
hWndProgMgr = hWnd;
|
|
||||||
|
|
||||||
// MDI Client Window
|
|
||||||
ccs.hWindowMenu = GetSubMenu(GetMenu(hWnd), IDM_WINDOW);
|
|
||||||
ccs.idFirstChild = IDM_WINDOW_CHILDSTART;
|
|
||||||
|
|
||||||
GetClientRect(hWndProgMgr, &rc);
|
|
||||||
|
|
||||||
hWndMDIClient = CreateWindow(L"MDIClient", NULL,
|
|
||||||
WS_CLIPCHILDREN | WS_CHILD | WS_VSCROLL | WS_HSCROLL,
|
|
||||||
// rc.left - 1, rc.top - 1, rc.right + 2, rc.bottom + 2,
|
|
||||||
0, 0, 0, 0,
|
|
||||||
hWnd, (HMENU)1, hAppInstance, (LPWSTR)&ccs);
|
|
||||||
|
|
||||||
if (!hWndMDIClient) {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
case WM_SYSCOMMAND:
|
|
||||||
{
|
|
||||||
if (wParam == IDM_TASKMGR)
|
|
||||||
{
|
{
|
||||||
ShellExecute(hWndProgMgr, L"open", L"TASKMGR.EXE", NULL, NULL, SW_NORMAL);
|
CLIENTCREATESTRUCT ccs;
|
||||||
|
RECT rc;
|
||||||
|
|
||||||
|
// Frame Window
|
||||||
|
hWndProgMgr = hWnd;
|
||||||
|
|
||||||
|
// Create the MDI Client Window
|
||||||
|
ccs.hWindowMenu = GetSubMenu(GetMenu(hWnd), IDM_WINDOW);
|
||||||
|
ccs.idFirstChild = IDM_WINDOW_CHILDSTART;
|
||||||
|
|
||||||
|
GetClientRect(hWndProgMgr, &rc);
|
||||||
|
|
||||||
|
if (!(hWndMDIClient = CreateWindowEx(WS_EX_COMPOSITED, L"MDIClient",
|
||||||
|
NULL, WS_CLIPCHILDREN | WS_CHILD | WS_VSCROLL | WS_HSCROLL | WS_VISIBLE,
|
||||||
|
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
||||||
|
hWnd, (HMENU)1, hAppInstance, (LPWSTR)&ccs)))
|
||||||
|
{
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
TempCreateGroup(hWndMDIClient);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (wParam == IDM_SHUTDOWN)
|
case WM_SYSCOMMAND:
|
||||||
if (wParam == IDM_FILE_EXIT)
|
|
||||||
if (wParam == IDM_FILE_RUN)
|
|
||||||
{
|
{
|
||||||
CmdProc(hWnd, wParam, lParam);
|
if ((wParam >= IDM_MAIN) || (wParam <= IDM_TASKMGR))
|
||||||
break;
|
{
|
||||||
|
if (wParam == IDM_TASKMGR)
|
||||||
|
{
|
||||||
|
ShellExecute(hWndProgMgr, L"open", L"TASKMGR.EXE", NULL, NULL, SW_NORMAL);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CmdProc(hWnd, wParam, lParam))
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
goto WndProcDefault;
|
||||||
}
|
}
|
||||||
|
|
||||||
goto WndProcDefault;
|
case WM_COMMAND:
|
||||||
//return DefFrameProc(hWnd, hwndMDIClient, uiMsg, wParam, lParam);
|
if (CmdProc(hWnd, wParam, lParam))
|
||||||
}
|
return 0;
|
||||||
|
|
||||||
case WM_COMMAND:
|
goto WndProcDefault;
|
||||||
if (CmdProc(hWnd, wParam, lParam))
|
|
||||||
{
|
case WM_CLOSE:
|
||||||
|
if (bSaveSettings)
|
||||||
|
SaveConfig(TRUE, TRUE, TRUE);
|
||||||
|
|
||||||
|
if (bIsDefaultShell && (GetShellWindow() != NULL))
|
||||||
|
SetShellWindow(0);
|
||||||
|
|
||||||
|
PostQuitMessage(0);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
goto WndProcDefault;
|
|
||||||
|
|
||||||
case WM_CLOSE:
|
case WM_ENDSESSION:
|
||||||
if (bSaveSettings)
|
PostQuitMessage(0);
|
||||||
SaveConfig(TRUE, TRUE, TRUE);
|
break;
|
||||||
|
|
||||||
if (bIsDefaultShell && (GetShellWindow() != NULL))
|
default:
|
||||||
SetShellWindow(0);
|
|
||||||
|
|
||||||
PostQuitMessage(0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case WM_ENDSESSION:
|
|
||||||
PostQuitMessage(0);
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
WndProcDefault:
|
WndProcDefault:
|
||||||
return DefFrameProc(hWnd, hWndMDIClient, message, wParam, lParam);
|
return DefFrameProc(hWnd, hWndMDIClient, message, wParam, lParam);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -236,4 +233,4 @@ VOID UpdateWindowTitle()
|
|||||||
LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
LRESULT CALLBACK ChildWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user