Click here to Skip to main content
15,909,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Problems with inheritance Pin
petter_e17-Aug-03 6:22
petter_e17-Aug-03 6:22 
GeneralCDaoDatabase Open Jet Database Crashing Pin
John Clump16-Aug-03 18:49
John Clump16-Aug-03 18:49 
GeneralRe: CDaoDatabase Open Jet Database Crashing Pin
Terry O'Nolley17-Aug-03 17:48
Terry O'Nolley17-Aug-03 17:48 
GeneralWM_ERASEBKGND Pin
Hosam Aly Mahmoud16-Aug-03 17:42
Hosam Aly Mahmoud16-Aug-03 17:42 
GeneralRe: WM_ERASEBKGND Pin
Ryan Binns16-Aug-03 19:53
Ryan Binns16-Aug-03 19:53 
GeneralRe: WM_ERASEBKGND Pin
Hosam Aly Mahmoud16-Aug-03 23:12
Hosam Aly Mahmoud16-Aug-03 23:12 
GeneralRe: WM_ERASEBKGND Pin
Ryan Binns16-Aug-03 23:30
Ryan Binns16-Aug-03 23:30 
GeneralRe: WM_ERASEBKGND Pin
Hosam Aly Mahmoud16-Aug-03 23:52
Hosam Aly Mahmoud16-Aug-03 23:52 
Many thanks for your reply. I am using Win32 API, so I get the HDC using BeginPaint(). I tried to draw in WM_PAINT, but I get a white background although I have myWndClass.hbrBackground = NULL. Here is my code:

case WM_PAINT:
{
	static PAINTSTRUCT ps;
	static dc = BeginPaint(hWnd, &ps);
 
	static HDC memDC = CreateCompatibleDC(dc);
	static HBITMAP memBitmap = CreateCompatibleBitmap(dc, MainWindowRect.right, MainWindowRect.bottom);
	SelectObject(memDC, memBitmap);
 
	FloodFill ( memDC, 20, 20, RGB(255,0,0) );	// red background
 
	static HBRUSH oldBrush = (HBRUSH) SelectObject(memDC, myBrush);
	Rectangle(memDC, myRect.left, myRect.top, myRect.right, myRect.bottom );
	SelectObject(memDC, oldBrush);
 
	BitBlt(dc, 0, 0, MainWindowRect.right, MainWindowRect.bottom,
				memDC, 0, 0, SRCCOPY);
	// in WM_SIZE I wrote: GetClientRect(&MainWindowRect);
	EndPaint(hWnd, &ps);
	return 0;
}

case WM_ERASEBKGND:
	return 0;	// processed already in WM_PAINT.


<marquee behavior="alternate">

Hosam Aly Mahmoud


GeneralRe: WM_ERASEBKGND Pin
Ryan Binns17-Aug-03 0:16
Ryan Binns17-Aug-03 0:16 
GeneralRe: WM_ERASEBKGND Pin
Hosam Aly Mahmoud17-Aug-03 1:28
Hosam Aly Mahmoud17-Aug-03 1:28 
GeneralRe: WM_ERASEBKGND Pin
Ryan Binns17-Aug-03 5:48
Ryan Binns17-Aug-03 5:48 
GeneralRe: WM_ERASEBKGND Pin
Hosam Aly Mahmoud17-Aug-03 11:42
Hosam Aly Mahmoud17-Aug-03 11:42 
GeneralRe: WM_ERASEBKGND Pin
Ryan Binns17-Aug-03 15:16
Ryan Binns17-Aug-03 15:16 
GeneralRe: WM_ERASEBKGND Pin
J. Dunlap17-Aug-03 15:37
J. Dunlap17-Aug-03 15:37 
GeneralRe: WM_ERASEBKGND Pin
Ryan Binns17-Aug-03 15:52
Ryan Binns17-Aug-03 15:52 
GeneralRe: WM_ERASEBKGND Pin
Hosam Aly Mahmoud17-Aug-03 17:36
Hosam Aly Mahmoud17-Aug-03 17:36 
GeneralRe: WM_ERASEBKGND Pin
Hosam Aly Mahmoud17-Aug-03 17:33
Hosam Aly Mahmoud17-Aug-03 17:33 
GeneralWeird run-time error Pin
Cannibal16-Aug-03 17:18
Cannibal16-Aug-03 17:18 
GeneralRe: Weird run-time error Pin
ZoogieZork16-Aug-03 18:33
ZoogieZork16-Aug-03 18:33 
GeneralRe: Weird run-time error Pin
Cannibal17-Aug-03 2:48
Cannibal17-Aug-03 2:48 
GeneralRe: Weird run-time error Pin
valikac17-Aug-03 5:37
valikac17-Aug-03 5:37 
QuestionHow to create a resource dll and export resource symbols? Pin
Abin16-Aug-03 16:25
Abin16-Aug-03 16:25 
AnswerRe: How to create a resource dll and export resource symbols? Pin
Alexander M.,16-Aug-03 23:59
Alexander M.,16-Aug-03 23:59 
GeneralRe: How to create a resource dll and export resource symbols? Pin
Abin17-Aug-03 3:43
Abin17-Aug-03 3:43 
GeneralRe: How to create a resource dll and export resource symbols? Pin
Alexander M.,17-Aug-03 6:18
Alexander M.,17-Aug-03 6:18 

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.