Click here to Skip to main content
15,915,160 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to select the point? Pin
567890123421-Jul-02 23:30
567890123421-Jul-02 23:30 
Questiondrag ang drop menu items, is it possible? Pin
includeh1021-Jul-02 4:49
includeh1021-Jul-02 4:49 
Questiondrag and drop pictures from dialog to dialog? Pin
includeh1021-Jul-02 4:41
includeh1021-Jul-02 4:41 
Questionbitmap: how to create from buffer? Pin
includeh1021-Jul-02 4:23
includeh1021-Jul-02 4:23 
AnswerRe: bitmap: how to create from buffer? Pin
Chris Losinger21-Jul-02 7:39
professionalChris Losinger21-Jul-02 7:39 
QuestionIs there any way of printing with or onto a pdf file? Pin
DanYELL21-Jul-02 4:23
DanYELL21-Jul-02 4:23 
GeneralPassing WM_PAINT to dll from EXE Pin
Chris Klecker21-Jul-02 4:14
Chris Klecker21-Jul-02 4:14 
GeneralRe: Passing WM_PAINT to dll from EXE Pin
Paul M Watt22-Jul-02 6:42
mentorPaul M Watt22-Jul-02 6:42 
You should not pass WM_PAINT messages to windows. Windows will ignore them anyway. Windows only generates paint messages itself if the message queue for that thread is empty. Even then the target window needs to have an invalid area on it window rect for a paint message to be generated. When you were looking to invalidate the rect of the window that is more along the lines of what you need to do.

If you want to force a repaint of the window use the RedrawWindow function. Here is an example.

m_SpellCastingBar.RedrawWindow(NULL, NULL, RDW_INVALIDATE | RDW_NOERASE | RDW_UPDATENOW);


The first two nulls indicate that you want the entire window to be updated. The flags say that you are invalidating the update region of your window because you can validate the window as well and prevent WM_PAINT messages from being called. RDW_NOERASE says do not generate a WM_ERASEBKGND message, and the RDW_UPDATENOW flag says expedite this request, and send the WM_PAINT message before the function call ends.

Coincidentally, these two function calls will do the equivalent of the RedrawWindow function above.

m_SpellCastingBar.InvalidateRect(NULL);
m_SpellCastingBar.UpdateWindow();



Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!

GeneralPassing String from COM to VB Client Pin
Anonymous21-Jul-02 2:39
Anonymous21-Jul-02 2:39 
GeneralRe: Passing String from COM to VB Client Pin
Dudi Avramov21-Jul-02 3:32
Dudi Avramov21-Jul-02 3:32 
GeneralRe: Passing String from COM to VB Client Pin
Anonymous21-Jul-02 6:58
Anonymous21-Jul-02 6:58 
Generalnot reading the file when executed from start menu Pin
a3gupta21-Jul-02 2:29
a3gupta21-Jul-02 2:29 
QuestionPainting etc - gdi?? Pin
Anonymous21-Jul-02 2:13
Anonymous21-Jul-02 2:13 
GeneralDataSet Pin
laphijia21-Jul-02 2:06
laphijia21-Jul-02 2:06 
GeneralOnDraw v.s OnPaint Pin
Dudi Avramov21-Jul-02 1:44
Dudi Avramov21-Jul-02 1:44 
GeneralRe: OnDraw v.s OnPaint Pin
NormDroid21-Jul-02 3:01
professionalNormDroid21-Jul-02 3:01 
GeneralRe: OnDraw v.s OnPaint Pin
Dudi Avramov21-Jul-02 3:35
Dudi Avramov21-Jul-02 3:35 
GeneralRe: OnDraw v.s OnPaint Pin
loket21-Jul-02 4:09
loket21-Jul-02 4:09 
QuestionIs there any syntax to do this? Pin
AJ12321-Jul-02 0:42
AJ12321-Jul-02 0:42 
AnswerRe: Is there any syntax to do this? Pin
Martin Ziacek21-Jul-02 0:56
Martin Ziacek21-Jul-02 0:56 
GeneralVisual c++ 6.0 Pin
amit prakash srivastava20-Jul-02 22:04
amit prakash srivastava20-Jul-02 22:04 
GeneralRe: Visual c++ 6.0 Pin
Christian Graus21-Jul-02 0:17
protectorChristian Graus21-Jul-02 0:17 
GeneralDocking CToolBars Pin
Paolo Vernazza20-Jul-02 15:54
Paolo Vernazza20-Jul-02 15:54 
GeneralRe: Docking CToolBars Pin
Nish Nishant20-Jul-02 16:35
sitebuilderNish Nishant20-Jul-02 16:35 
GeneralRe: Docking CToolBars Pin
Paolo Vernazza21-Jul-02 7:20
Paolo Vernazza21-Jul-02 7: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.