Click here to Skip to main content
15,890,185 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: WinMain loop pauses when the application window is grabbed by mouse and resized? Pin
Code-o-mat11-Jul-10 1:06
Code-o-mat11-Jul-10 1:06 
QuestionClass Information Pin
Fareed Rizkalla10-Jul-10 1:04
Fareed Rizkalla10-Jul-10 1:04 
AnswerRe: Class Information Pin
enhzflep10-Jul-10 1:11
enhzflep10-Jul-10 1:11 
AnswerRe: Class Information Pin
Jackson201010-Jul-10 18:41
Jackson201010-Jul-10 18:41 
QuestionError during print Pin
ashtwin9-Jul-10 20:48
ashtwin9-Jul-10 20:48 
QuestionRe: Error during print Pin
CPallini10-Jul-10 0:45
mveCPallini10-Jul-10 0:45 
AnswerRe: Error during print Pin
ashtwin14-Jul-10 23:19
ashtwin14-Jul-10 23:19 
AnswerRe: Error during print Pin
ashtwin15-Jul-10 2:47
ashtwin15-Jul-10 2:47 
Actually at one place i am using the follwing code and dcRef is NULL in my case so it is going to the else part.
mDC = new CMetaFileDC();
	if (mDC != 0)
	{
		HDC myhdl;
		if (dcRef != 0)
		{
			myhdl = dcRef->m_hAttribDC;
		}
		else
		{
			myhdl = getDC();
			dcRef = CDC::FromHandle(myhdl);
		}

		mDC->CreateEnhanced(dcRef, 0, bounds, description);
		mDC->SetAttribDC(myhdl);

		// Set default mapmode to MM_HIMETRIC
		mDC->SetMapMode(MM_HIMETRIC);
	}<pre>
Is there any problem in passing a pointer acquired from CDC::FromHandle to CreateEnhanced.
At some other place i am using
<pre>mMetaFileHandle = mDC->CloseEnhanced();
		delete mDC;
		mDC = 0;
                do something .....
                if (mMetaFileHandle != 0)
	{
		// Release metafile handle if existing
		::DeleteEnhMetaFile(mMetaFileHandle);
		mMetaFileHandle = 0;
	}
        HDC myhdl = getDC();
        CDC dc;
        dc.Attach(myhdl);
        dc.DeleteDC();

In the above code getDC is returning a handle to the device context.
QuestionHow to save IHTMLELEMENT of Tag IMG Pin
voo doo129-Jul-10 20:47
voo doo129-Jul-10 20:47 
AnswerRe: How to save IHTMLELEMENT of Tag IMG Pin
shichangone9-Jul-10 21:49
shichangone9-Jul-10 21:49 
GeneralRe: How to save IHTMLELEMENT of Tag IMG Pin
voo doo1212-Jul-10 15:49
voo doo1212-Jul-10 15:49 
QuestionHow can put here Vertical Scrollbar and Infotip or Tooltip for Items and Subitems? [modified] Pin
Le@rner9-Jul-10 20:20
Le@rner9-Jul-10 20:20 
QuestionCannot open the Dalog(DataBase error) [modified] Pin
raju_shiva9-Jul-10 18:33
raju_shiva9-Jul-10 18:33 
AnswerRe: Cannot open the Dalog(DataBase error) Pin
Richard MacCutchan10-Jul-10 0:39
mveRichard MacCutchan10-Jul-10 0:39 
Questionunreadable text on Grid Control Pin
Max++9-Jul-10 14:54
Max++9-Jul-10 14:54 
AnswerRe: unreadable text on Grid Control Pin
Garth J Lancaster9-Jul-10 19:22
professionalGarth J Lancaster9-Jul-10 19:22 
QuestionWin32 + Direct2D Pin
Fareed Rizkalla9-Jul-10 14:33
Fareed Rizkalla9-Jul-10 14:33 
AnswerRe: Win32 + Direct2D Pin
Cedric Moonen9-Jul-10 22:02
Cedric Moonen9-Jul-10 22:02 
QuestionError in building QuickFix library in Exceptions.h Pin
arupsarkar9-Jul-10 8:54
arupsarkar9-Jul-10 8:54 
AnswerRe: Error in building QuickFix library in Exceptions.h Pin
David Crow9-Jul-10 9:04
David Crow9-Jul-10 9:04 
AnswerRe: Error in building QuickFix library in Exceptions.h Pin
Aescleal9-Jul-10 10:13
Aescleal9-Jul-10 10:13 
GeneralRe: Error in building QuickFix library in Exceptions.h Pin
arupsarkar16-Jul-10 6:46
arupsarkar16-Jul-10 6:46 
Questionerror C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall ................... Pin
deadlyabbas9-Jul-10 5:23
deadlyabbas9-Jul-10 5:23 
QuestionRe: error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall ................... Pin
David Crow9-Jul-10 5:50
David Crow9-Jul-10 5:50 
AnswerRe: error C2440: 'static_cast' : cannot convert from 'LRESULT (__thiscall ................... Pin
Stuart Dootson11-Jul-10 0:46
professionalStuart Dootson11-Jul-10 0:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.