Click here to Skip to main content
15,898,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Hot key problem with Win (ModWin) key! Pin
josip cagalj18-Oct-07 1:16
josip cagalj18-Oct-07 1:16 
GeneralRe: Hot key problem with Win (ModWin) key! Pin
Hamid_RT18-Oct-07 3:37
Hamid_RT18-Oct-07 3:37 
Questionepson printer... Pin
birajendu17-Oct-07 21:48
birajendu17-Oct-07 21:48 
AnswerRe: epson printer... Pin
Hamid_RT17-Oct-07 22:01
Hamid_RT17-Oct-07 22:01 
AnswerRe: epson printer... Pin
Nelek18-Oct-07 1:14
protectorNelek18-Oct-07 1:14 
QuestionLoadImage failure? Pin
Llasus17-Oct-07 21:12
Llasus17-Oct-07 21:12 
AnswerRe: LoadImage failure? Pin
Hamid_RT17-Oct-07 21:16
Hamid_RT17-Oct-07 21:16 
GeneralRe: LoadImage failure? Pin
Llasus17-Oct-07 21:32
Llasus17-Oct-07 21:32 
The code is actually too large to paste in here. I can only paste the function which displays has the LoadImage part.

	<br />
void CDlg::DisplayImage()<br />
{<br />
        //then use LoadImage and attach it to a BITMAP handle<br />
	gOtherClass.gDisplayPanelHandle = (HBITMAP)::LoadImage<br />
	( <br />
		0, <br />
		gMapPath, <br />
		IMAGE_BITMAP, <br />
		gSourceSize.cx,<br />
		gSourceSize.cy,<br />
		LR_DEFAULTCOLOR | LR_LOADFROMFILE <br />
	);<br />
<br />
	//check if GlobalMap.bmp was loaded<br />
	if(gOtherClass.gDisplayPanelHandle == NULL)<br />
	{<br />
		AfxMessageBox("Error!\nUnable to load Map File");<br />
		return;<br />
	}<br />
<br />
	//Attach the bitmap handle to the CDC for display<br />
	gCDC.SelectObject(gOtherClass.gDisplayPanelHandle);<br />
<br />
	//reverse image and stretch it to display correctly<br />
	gCDC.StretchBlt<br />
	(<br />
		0, <br />
		0,<br />
		gSourceSize.cx,<br />
		gSourceSize.cy,<br />
		&gCDC,<br />
		0, <br />
		gSourceSize.cy - 1,	//added - 1 to display image properly<br />
		gSourceSize.cx,<br />
		-gSourceSize.cy,<br />
		SRCCOPY<br />
	);<br />
        Invalidate(FALSE);<br />
}<br />

GeneralRe: LoadImage failure? Pin
Hamid_RT17-Oct-07 21:57
Hamid_RT17-Oct-07 21:57 
GeneralRe: LoadImage failure? Pin
Llasus17-Oct-07 22:21
Llasus17-Oct-07 22:21 
GeneralRe: LoadImage failure? Pin
Naveen17-Oct-07 22:58
Naveen17-Oct-07 22:58 
GeneralRe: LoadImage failure? Pin
Llasus18-Oct-07 3:10
Llasus18-Oct-07 3:10 
GeneralRe: LoadImage failure? Pin
jhwurmbach17-Oct-07 23:42
jhwurmbach17-Oct-07 23:42 
GeneralRe: LoadImage failure? Pin
Llasus18-Oct-07 3:17
Llasus18-Oct-07 3:17 
GeneralRe: LoadImage failure? Pin
jhwurmbach18-Oct-07 3:24
jhwurmbach18-Oct-07 3:24 
GeneralRe: LoadImage failure? Pin
Llasus18-Oct-07 4:01
Llasus18-Oct-07 4:01 
GeneralRe: LoadImage failure? Pin
Llasus18-Oct-07 15:53
Llasus18-Oct-07 15:53 
QuestionJapanese email attachments Pin
monsieur_jj17-Oct-07 19:54
monsieur_jj17-Oct-07 19:54 
QuestionMinidumps Pin
Programm3r17-Oct-07 19:31
Programm3r17-Oct-07 19:31 
QuestionAssertion failed Pin
mosali satish17-Oct-07 19:29
mosali satish17-Oct-07 19:29 
QuestionRe: Assertion failed Pin
Hamid_RT17-Oct-07 19:57
Hamid_RT17-Oct-07 19:57 
AnswerRe: Assertion failed Pin
Nelek17-Oct-07 21:04
protectorNelek17-Oct-07 21:04 
AnswerRe: Assertion failed Pin
David Crow18-Oct-07 2:48
David Crow18-Oct-07 2:48 
QuestionScrollBar Limitations Pin
paresh_joe17-Oct-07 19:24
paresh_joe17-Oct-07 19:24 
AnswerRe: ScrollBar Limitations Pin
Roger Broomfield17-Oct-07 20:16
Roger Broomfield17-Oct-07 20:16 

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.