Hi Stew, I am currently facing the same problem...did you solve it??. I noticed that GDI resource are returned properly to system after calling StrokePath() or StrokeAndFillPath(). My code pDC->BeginPath();// GDI used pDC->MoveTo(some point); pDC->LineTo(another point); pDC->EndPath(); pDC->WidenPath(); HRGN hRgn=::PathToRegion(pDC->GetSafeHdc()); ::FillRgn(pDC->GetSafeHdc(),m_hLastSecondRgn,(HBRUSH)GreyBrush);
This code doesn't return GDI resource...please help cause I have been stuck on this for quite some time now... Regards Mustafa
Mustafa
Posts
-
Freeing GDI Resources -
Launching a CMiniFrame/CDocument/CView from CDialogHi All, Been stuck with this problem for quite sometime now, tried some other discussion group - no help, hope someone here can help me.... I would like to launch a CMiniFrameWnd/CDocument/CView derived objects from a Dialog based program (Doc/View was not selected during AppWizard).This window is a floating window above MyDialog and contains all the built-in Doc/View architecture when launched. This is what I have done up to now:- BOOL CTestApp::InitInstance() { Other stuffs..... CSingleDoctemplate* pDocTemplate; pDocTemplate=new CSingleDocTemplate( IDR_MINIFRAME, // I also have a problem understanding the string // resource needed for this value here, no menu, // no icon RUNTIME_CLASS(CMyDoc), RUNTIME_CLASS(CMyMiniFrame), RUNTIME_CLASS(CMyView)); AddDocTemplate(pDocTemplate); CMyDlg dlg; int nResponse=dlg.DoModal(); etc etc } void CMyDlg::OnButton1() { // Here is where I would like to launch my floating Doc/View Frame // I have no idea how to do it...... } Thanks For any help :-) Mustafa