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

C / C++ / MFC

 
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 
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 
Ryan Binns wrote:
I'm not certain why it's there

Well, if you "eat" the WM_ERASEBKGND message, return 1, and forward it to the parent window, you can get transparent effects, because you're telling the parent to erase an area, rather than erasing it yourself with the default brush, which is the normal behavior.

This is a neat trick that is played by the Common Controls Toolbar so that it can have a transparent background. It also calls WM_ERASEBACKGND on the parent window whenever it draws anything outside of a WM_PAINT message, so that the background is always erased to the parent's background.


"Blessed are the peacemakers, for they shall be called sons of God." - Jesus

"You must be the change you wish to see in the world." - Mahatma Gandhi







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 
GeneralDeriving a template from a template Pin
aka the guy16-Aug-03 14:30
aka the guy16-Aug-03 14:30 
GeneralRe: Deriving a template from a template Pin
Andrew Walker16-Aug-03 16:03
Andrew Walker16-Aug-03 16:03 
GeneralRe: Deriving a template from a template Pin
aka the guy17-Aug-03 15:54
aka the guy17-Aug-03 15:54 

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.