Click here to Skip to main content
15,879,326 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: I had this interview question Pin
Software200719-Jun-11 13:53
Software200719-Jun-11 13:53 
AnswerRe: I had this interview question Pin
Stefan_Lang19-Jun-11 23:23
Stefan_Lang19-Jun-11 23:23 
GeneralRe: I had this interview question Pin
Software200720-Jun-11 3:17
Software200720-Jun-11 3:17 
Question__debugbreak(); [modified] Pin
Mohibur Rashid17-Jun-11 18:07
professionalMohibur Rashid17-Jun-11 18:07 
AnswerRe: __debugbreak(); Pin
Richard MacCutchan17-Jun-11 22:48
mveRichard MacCutchan17-Jun-11 22:48 
AnswerRe: __debugbreak(); Pin
Mohibur Rashid17-Jun-11 23:04
professionalMohibur Rashid17-Jun-11 23:04 
GeneralRe: __debugbreak(); Pin
Philippe Mori18-Jun-11 5:17
Philippe Mori18-Jun-11 5:17 
Question[Win32]Set Dialog Bitmap Background Pin
Member 296547117-Jun-11 13:20
Member 296547117-Jun-11 13:20 
Hi, I've a modal dialog box and I've tried to set a bitmap background:

case WM_ERASEBKGND:
{
HDC memDC, hdc;
HBITMAP hBmp;
BITMAP bmp;
RECT rcc;

hdc = GetDC(hDlg);
hBmp = LoadBitmap(hInst, MAKEINTRESOURCE(IDB_BMP));
memDC = CreateCompatibleDC(hdc);

SelectObject(memDC,hBmp);
GetObject(hBmp, sizeof(bmp), &bmp);
GetClientRect(hDlg,&rcc);

SetStretchBltMode(hdc, HALFTONE);
StretchBlt(hdc, 
0,0, rcc.right,rcc.bottom,
memDC, 
0,0,bmp.bmWidth, bmp.bmHeight, 
SRCCOPY);

DeleteDC(memDC);
DeleteObject(hBmp);
ReleaseDC(hDlg,hdc);

return (INT_PTR)TRUE;
}


this code set a background bitmap, but when I move or resize the dialog controls(edit,button,listbox,...) disappear under the bitmap...what's wrong?how can i repaint correctly the dialog?
AnswerRe: [Win32]Set Dialog Bitmap Background Pin
Cheongwadae17-Jun-11 14:34
Cheongwadae17-Jun-11 14:34 
GeneralRe: [Win32]Set Dialog Bitmap Background Pin
Ram Shelke17-Jun-11 22:09
Ram Shelke17-Jun-11 22:09 
AnswerRe: [Win32]Set Dialog Bitmap Background Pin
enhzflep18-Jun-11 3:05
enhzflep18-Jun-11 3:05 
QuestionError 2248: cannot access protected member declared in CWinapp Pin
eastman7517-Jun-11 8:23
eastman7517-Jun-11 8:23 
QuestionRe: Error 2248: cannot access protected member declared in CWinapp Pin
Abhi Lahare17-Jun-11 8:36
Abhi Lahare17-Jun-11 8:36 
AnswerRe: Error 2248: cannot access protected member declared in CWinapp Pin
eastman7521-Jun-11 19:23
eastman7521-Jun-11 19:23 
AnswerRe: Error 2248: cannot access protected member declared in CWinapp Pin
Albert Holguin17-Jun-11 8:44
professionalAlbert Holguin17-Jun-11 8:44 
GeneralRe: Error 2248: cannot access protected member declared in CWinapp Pin
eastman7517-Jun-11 22:10
eastman7517-Jun-11 22:10 
GeneralRe: Error 2248: cannot access protected member declared in CWinapp Pin
Richard MacCutchan17-Jun-11 22:52
mveRichard MacCutchan17-Jun-11 22:52 
GeneralRe: Error 2248: cannot access protected member declared in CWinapp Pin
Albert Holguin18-Jun-11 6:38
professionalAlbert Holguin18-Jun-11 6:38 
GeneralRe: Error 2248: cannot access protected member declared in CWinapp Pin
eastman7519-Jun-11 5:01
eastman7519-Jun-11 5:01 
GeneralRe: Error 2248: cannot access protected member declared in CWinapp Pin
eastman7520-Jun-11 5:39
eastman7520-Jun-11 5:39 
GeneralRe: Error 2248: cannot access protected member declared in CWinapp Pin
Albert Holguin20-Jun-11 7:25
professionalAlbert Holguin20-Jun-11 7:25 
AnswerRe: Error 2248: cannot access protected member declared in CWinapp Pin
eastman7520-Jun-11 18:34
eastman7520-Jun-11 18:34 
QuestionUnresolved external Symbol Pin
William Engberts17-Jun-11 4:14
William Engberts17-Jun-11 4:14 
AnswerRe: Unresolved external Symbol Pin
Albert Holguin17-Jun-11 4:16
professionalAlbert Holguin17-Jun-11 4:16 
GeneralRe: Unresolved external Symbol Pin
William Engberts17-Jun-11 4:20
William Engberts17-Jun-11 4:20 

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.