Click here to Skip to main content
       

C / C++ / MFC

 
QuestionBOM Code PinmvpMichael Haephrati מיכאל האפרתי20-Feb-13 11:41 
SuggestionRe: BOM Code PinmemberDavidCrow20-Feb-13 11:47 
GeneralRe: BOM Code PinmvpMichael Haephrati מיכאל האפרתי20-Feb-13 11:49 
QuestionOn displaying two images second image overlapps first image Pinmembertoms from newdelhi20-Feb-13 1:32 
I'm writing a program to display multiple images on character select:
my code is on
case WM_CHAR:
		{
		
		switch((char)wParam)
		{
				
		case 'A': case 'a':
			
		hbmp =  LoadBitmap(hInst, MAKEINTRESOURCE(IDB_BITMAP2));
 
		break;
		case 'B': case 'b':	
	
			hbmp =  LoadBitmap(hInst, MAKEINTRESOURCE(IDB_BITMAP3));
			
			break;
			case 'C': case 'c':
			hbmp =  LoadBitmap(hInst, MAKEINTRESOURCE(IDB_BITMAP4));
			
			break;
		 default:
            break;
		
		}
		}
		break;
 
case WM_PAINT:
 
		{
 hDC = GetDC(picBoxDisp);
  
 	    /* Create a memory device compatible with the above DC variable*/
	    MemDCExercising = CreateCompatibleDC(hDC);
             /* Select the new bitmap*/
             SelectObject(MemDCExercising, hbmp);
	    /* Copy the bits from the memory DC into the current dc*/
	    BitBlt(hDC, 0, 0, 200, 200, MemDCExercising, 0, 0, SRCCOPY);
DeleteObject(hbmp);			
    DeleteDC(MemDCExercising);
	
	SendMessage(picBoxDisp,BM_SETIMAGE,IMAGE_BITMAP,(LPARAM)hbmp);
 
 
 
Images are displayed correctly but second image overlapps first...
AnswerRe: On displaying two images second image overlapps first image PinmvpRichard MacCutchan20-Feb-13 3:40 
AnswerRe: On displaying two images second image overlapps first image PinmvpMichael Haephrati מיכאל האפרתי20-Feb-13 11:15 
QuestionCFileDialog with preview working in Xp but not in Win7 Pinmemberyogeshs19-Feb-13 19:50 
AnswerRe: CFileDialog with preview working in Xp but not in Win7 PinmvpRichard MacCutchan19-Feb-13 23:10 
GeneralRe: CFileDialog with preview working in Xp but not in Win7 Pinmemberyogeshs19-Feb-13 23:46 
GeneralRe: CFileDialog with preview working in Xp but not in Win7 PinmvpRichard MacCutchan20-Feb-13 0:01 

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

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


Advertise | Privacy | Mobile
Web02 | 2.8.1411022.1 | Last Updated 22 Nov 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid