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
   | BOOL MCODE_Graph::Create(const CRect& FullRect,
		CWnd* _pParentContainer, CWnd* _pTopMostParentWnd, mcINT32 nID,
		mcINT32 SetProperties,
		mcINT32 RemProperties)
{
	...
 
	static CString className = AfxRegisterWndClass(CS_HREDRAW | CS_VREDRAW | CS_DBLCLKS,0,(HBRUSH)BkgBrush);
 
	DWORD dwStyle = WS_CHILD | WS_VISIBLE;
 
	int result = -999;
	result = CWnd::CreateEx(WS_EX_TOPMOST,className, NULL, dwStyle, 
		FullRect.left, FullRect.top, FullRect.Width(), FullRect.Height(),
						pParentContainer->GetSafeHwnd(), (HMENU)nID);
 
	Hdc_Screen = GetDC()->GetSafeHdc();
	Hdc_Memory = CreateCompatibleDC(Hdc_Screen);
 
	...
 
	this->GetClientRect(&m_ClientRect);
	hBitmapFullPlot = CreateCompatibleBitmap(Hdc_Screen,m_ClientRect.Width(),m_ClientRect.Height());
 
	return TRUE;
} | 
Partager