-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmdiclnt.cpp
42 lines (36 loc) · 1.1 KB
/
tmdiclnt.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
TMDICLNT.CPP
Copyright (c) 1994 Shawn Halpenny
All rights reserved.
Source code module for TMDIClient class.
*/
#ifndef __WOLF_H
#include <wolf.h>
#endif
#ifndef __SHDDEL_H
#include <shddel.h>
#endif
//done
TMDIClient::TMDIClient(PTMDIFrame pParent) : TWindow(pParent, NULL, 0)
{
ClientData.idFirstChild = ID_FIRSTMDICHILD;
WndClass.lpszClassName = "MDICLIENT";
SetStyle(MDIS_ALLCHILDSTYLES | WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE, 0);
pFrame = pParent;
x = y = cx = cy = 0;
SetFlags(WB_TRANSFER, FALSE);
//remove client object from parent's child list
pParent->ChildList.detach(this, TShouldDelete::Delete);
} //TMDIClient::TMDIClient
//done
BOOL TMDIClient::Create()
{
//no need to set up dynamic dispatcher (call SetGlobalWindowObject) because this is
//a system window class.
//create the window
ClientData.hWindowMenu = GetSubMenu(GetMenu(pFrame->hWindow), pFrame->nWindowMenuPos);
hWindow = CreateWindowEx(dwExStyle, WndClass.lpszClassName, "", dwStyle,
x, y, cx, cy,
pFrame->hWindow, 0, pApplication->hInstance, (LPSTR) &ClientData);
return hWindow != NULL;
} //TMDIClient::Create