Click here to Skip to main content
15,914,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
Hosam Aly Mahmoud wrote:
FloodFill ( memDC, 20, 20, RGB(255,0,0) ); // red background

Roll eyes | :rolleyes: I should have seen this before...

The colour you pass to FloodFill() is not the colour of the fill. It's the colour of the border. FloodFill() fills the area with the currently selected brush. To fill a rectangle with a given colour, either create a solid brush (CreateSolidBrush()) and use Rectangle(), or use the ExtTextOut() function to draw opaque text without actually drawing text:
SetBkColor(memDC, RGB(255,0,0)); // Red background
RECT rect;
// TODO: Setup the rectangle here
ExtTextOut(memDC, 0, 0, ETO_OPAQUE, rect, NULL, 0, NULL);
Hope this helps,

Ryan
"Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"

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 
GeneralMutiple Doc/View Support in MDI MFC App Problem Pin
bneacetp16-Aug-03 15:46
bneacetp16-Aug-03 15:46 
GeneralRe: Mutiple Doc/View Support in MDI MFC App Problem Pin
Joey Bloggs17-Aug-03 1:05
Joey Bloggs17-Aug-03 1:05 
GeneralRe: Mutiple Doc/View Support in MDI MFC App Problem Pin
bneacetp17-Aug-03 7:19
bneacetp17-Aug-03 7:19 

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.