working on #17, program mdi window is now created and sized properly, close to completing the group part once i finish... registry functions and a group dialog
This commit is contained in:
@@ -36,14 +36,17 @@ BOOL InitializeGroups()
|
|||||||
{
|
{
|
||||||
CLIENTCREATESTRUCT ccs = { 0 };
|
CLIENTCREATESTRUCT ccs = { 0 };
|
||||||
WNDCLASSEX wce = { 0 };
|
WNDCLASSEX wce = { 0 };
|
||||||
|
RECT rcFrame;
|
||||||
|
|
||||||
// Create the MDI Client Window
|
// Create the MDI Client Window
|
||||||
ccs.hWindowMenu = GetSubMenu(GetMenu(hWndProgMgr), IDM_WINDOW);
|
ccs.hWindowMenu = GetSubMenu(GetMenu(hWndProgMgr), IDM_WINDOW);
|
||||||
ccs.idFirstChild = IDM_WINDOW_CHILDSTART;
|
ccs.idFirstChild = IDM_WINDOW_CHILDSTART;
|
||||||
|
|
||||||
|
GetClientRect(hWndProgMgr, &rcFrame);
|
||||||
|
|
||||||
if (!(hWndMDIClient = CreateWindowEx(WS_EX_COMPOSITED, L"MDIClient",
|
if (!(hWndMDIClient = CreateWindowEx(WS_EX_COMPOSITED, L"MDIClient",
|
||||||
NULL, WS_CLIPCHILDREN | WS_CHILD | WS_VSCROLL | WS_HSCROLL | WS_VISIBLE,
|
NULL, WS_CLIPCHILDREN | WS_CHILD | WS_VSCROLL | WS_HSCROLL | WS_VISIBLE,
|
||||||
CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
|
rcFrame.left, rcFrame.top, rcFrame.right, rcFrame.bottom,
|
||||||
hWndProgMgr, (HMENU)1, hAppInstance, (LPWSTR)&ccs)))
|
hWndProgMgr, (HMENU)1, hAppInstance, (LPWSTR)&ccs)))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
@@ -70,7 +73,7 @@ BOOL InitializeGroups()
|
|||||||
|
|
||||||
// TempCreateGroup();
|
// TempCreateGroup();
|
||||||
|
|
||||||
// CreateGroupWindow(NULL);
|
CreateGroupWindow(NULL);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
@@ -89,12 +92,12 @@ VOID TempCreateGroup()
|
|||||||
|
|
||||||
/* * * *\
|
/* * * *\
|
||||||
CreateGroupWindow -
|
CreateGroupWindow -
|
||||||
Create an MDI window from a group
|
Create an MDI window from a group structure
|
||||||
RETURNS -
|
RETURNS -
|
||||||
Group Window structure
|
Pointer to a group window structure
|
||||||
or NULL GROUPWND on failure
|
or NULL on failure
|
||||||
\* * * */
|
\* * * */
|
||||||
GROUPWND CreateGroupWindow(PGROUP pgGroup)
|
PGROUPWND CreateGroupWindow(PGROUP pgGroup)
|
||||||
{
|
{
|
||||||
GROUPWND gw = { NULL };
|
GROUPWND gw = { NULL };
|
||||||
MDICREATESTRUCT mcs = { NULL };
|
MDICREATESTRUCT mcs = { NULL };
|
||||||
@@ -113,11 +116,10 @@ GROUPWND CreateGroupWindow(PGROUP pgGroup)
|
|||||||
mcs.style = WS_VISIBLE;
|
mcs.style = WS_VISIBLE;
|
||||||
mcs.lParam = (LPARAM)pgGroup;
|
mcs.lParam = (LPARAM)pgGroup;
|
||||||
|
|
||||||
hGroup = (HWND)SendMessage(hWndMDIClient, WM_MDICREATE, 0, (LPARAM)(LPTSTR)&mcs);
|
if (!(hGroup = (HWND)SendMessage(hWndMDIClient, WM_MDICREATE, 0, (LPARAM)(LPTSTR)&mcs)))
|
||||||
if (!hGroup)
|
return NULL;
|
||||||
return gw;
|
|
||||||
|
|
||||||
return gw;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* * * *\
|
/* * * *\
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ BOOL InitializeGroups();
|
|||||||
VOID TempCreateGroup();
|
VOID TempCreateGroup();
|
||||||
// Group Window
|
// Group Window
|
||||||
LRESULT CALLBACK GroupWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
LRESULT CALLBACK GroupWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
GROUPWND CreateGroupWindow(PGROUP pgGroup);
|
PGROUPWND CreateGroupWindow(PGROUP pgGroup);
|
||||||
// Group information
|
// Group information
|
||||||
DWORD GetGroupFlags(PGROUPWND pgw);
|
DWORD GetGroupFlags(PGROUPWND pgw);
|
||||||
// Import/export functions
|
// Import/export functions
|
||||||
|
|||||||
Reference in New Issue
Block a user