add WM_SETFONT message handle in MFC
-
MFC doesn't have WM_SETFONT message handle, such as OnSetFont(...), how to add it as standard MFC handle? I mean, not use WindowProc(...) etc. .
-
MFC doesn't have WM_SETFONT message handle, such as OnSetFont(...), how to add it as standard MFC handle? I mean, not use WindowProc(...) etc. .
Are you wanting to intercept the
WM_SETFONT
message? Do you have a custom control that has aWndProc()
function?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
-
MFC doesn't have WM_SETFONT message handle, such as OnSetFont(...), how to add it as standard MFC handle? I mean, not use WindowProc(...) etc. .
I think you can use ON_MESSAGE 0N_MESSAGE(WM_SETFONT, OnSetFont)... where OnSetFont is declared as afx_msg LRESULT OnSetFont(WPARAM, LPARAM). and WPARAM contains HFONT.
-
I think you can use ON_MESSAGE 0N_MESSAGE(WM_SETFONT, OnSetFont)... where OnSetFont is declared as afx_msg LRESULT OnSetFont(WPARAM, LPARAM). and WPARAM contains HFONT.
venkatmakam wrote:
0N_MESSAGE(WM_SETFONT, OnSetFont)...
While you probably meant
ON_MESSAGE()
, isn't that for user-defined messages and less-common Windows messages?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
-
venkatmakam wrote:
0N_MESSAGE(WM_SETFONT, OnSetFont)...
While you probably meant
ON_MESSAGE()
, isn't that for user-defined messages and less-common Windows messages?"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
you do ask a lot of questions, don't you? :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Please use <PRE> tags for code snippets, they improve readability.
CP Vanity has been updated to V2.3 -
MFC doesn't have WM_SETFONT message handle, such as OnSetFont(...), how to add it as standard MFC handle? I mean, not use WindowProc(...) etc. .
WM_SETFONT is a message sent TO a window (control). That's why it doesn't have a handler macro.
Mark Salsbery Microsoft MVP - Visual C++ :java:
-
you do ask a lot of questions, don't you? :)
Luc Pattyn [My Articles] Nil Volentibus Arduum
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Please use <PRE> tags for code snippets, they improve readability.
CP Vanity has been updated to V2.3Um, yeah.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather