Click here to Skip to main content
15,562,669 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
SuggestionRe: Calling C Function in Dll Causing Problem Pin
Richard MacCutchan12-Jul-16 6:19
mveRichard MacCutchan12-Jul-16 6:19 
GeneralRe: Calling C Function in Dll Causing Problem Pin
Django_Untaken12-Jul-16 6:27
Django_Untaken12-Jul-16 6:27 
AnswerRe: Calling C Function in Dll Causing Problem Pin
Albert Holguin12-Jul-16 6:59
professionalAlbert Holguin12-Jul-16 6:59 
GeneralRe: Calling C Function in Dll Causing Problem Pin
Django_Untaken12-Jul-16 8:18
Django_Untaken12-Jul-16 8:18 
GeneralRe: Calling C Function in Dll Causing Problem Pin
Albert Holguin13-Jul-16 7:36
professionalAlbert Holguin13-Jul-16 7:36 
GeneralRe: Calling C Function in Dll Causing Problem Pin
mariakatosvich13-Aug-16 3:28
mariakatosvich13-Aug-16 3:28 
GeneralRe: Calling C Function in Dll Causing Problem Pin
Richard MacCutchan12-Jul-16 7:08
mveRichard MacCutchan12-Jul-16 7:08 
QuestionNcPaint and Invalid rect/region Pin
Сергей Шевченко12-Jul-16 3:00
Сергей Шевченко12-Jul-16 3:00 
Just in few words my question is next:

Is there a way to get current invalid region when CWnd gets WM_NCPAINT message (in OnNcPaint() handler)?

Details:
I have a main frame with few child dialogs placed on it. Dialogs have custom controls. Custom controls have specific non-client area and that area is drawn when the control gets WM_NCPAINT message.

Now I want to invalidate (redraw) only a small part of my main frame calling InvalidateRgn(&invalidRgn). If that invalid area overlaps with control's non-client area - WM_NCPAINT is sent to the control.

Code in control's OnNcPaint() is like this:
void CMyCtrl::OnNcPaint()
{
    CWindowDC dc(this);
    // dc.SelectClipRgn(&invalidRgn) ???
    DoPaint(&dc);
    ...
}


And it paints over all window dc of the control. Whole non-client area is repainted, not only invalid region which I've passed when called InvalidateRgn(&invalidRgn).
That is a behaviour I want to get rid of. I need only invalid region to be repainted. My suggestion is that I need somehow to get current invalid region and select it before painting like
dc.SelectClipRgn(&invalidRgn)

So the question is can I do that? and if yes - how?
AnswerRe: NcPaint and Invalid rect/region Pin
leon de boer12-Jul-16 3:33
leon de boer12-Jul-16 3:33 
GeneralRe: NcPaint and Invalid rect/region Pin
Сергей Шевченко12-Jul-16 5:15
Сергей Шевченко12-Jul-16 5:15 
QuestionCalling a method with the pointer to a base class Pin
FriendOfAsherah10-Jul-16 22:11
FriendOfAsherah10-Jul-16 22:11 
AnswerRe: Calling a method with the pointer to a base class Pin
Jochen Arndt10-Jul-16 22:47
professionalJochen Arndt10-Jul-16 22:47 
GeneralRe: Calling a method with the pointer to a base class Pin
FriendOfAsherah10-Jul-16 23:33
FriendOfAsherah10-Jul-16 23:33 
GeneralRe: Calling a method with the pointer to a base class Pin
Jochen Arndt10-Jul-16 23:52
professionalJochen Arndt10-Jul-16 23:52 
GeneralRe: Calling a method with the pointer to a base class Pin
_Flaviu11-Jul-16 2:59
_Flaviu11-Jul-16 2:59 
GeneralRe: Calling a method with the pointer to a base class Pin
leon de boer11-Jul-16 8:16
leon de boer11-Jul-16 8:16 
Questionreguired fast printing Pin
patilvaibhavrao7-Jul-16 21:39
patilvaibhavrao7-Jul-16 21:39 
AnswerRe: reguired fast printing Pin
Richard MacCutchan7-Jul-16 22:05
mveRichard MacCutchan7-Jul-16 22:05 
AnswerRe: reguired fast printing Pin
FriendOfAsherah7-Jul-16 23:25
FriendOfAsherah7-Jul-16 23:25 
AnswerRe: reguired fast printing Pin
leon de boer8-Jul-16 4:22
leon de boer8-Jul-16 4:22 
AnswerRe: reguired fast printing Pin
Patrice T8-Jul-16 11:42
mvePatrice T8-Jul-16 11:42 
QuestionOverloading methods with identical content in lot of derived classes Pin
FriendOfAsherah7-Jul-16 20:38
FriendOfAsherah7-Jul-16 20:38 
QuestionRe: Overloading methods with identical content in lot of derived classes Pin
CPallini7-Jul-16 22:09
mveCPallini7-Jul-16 22:09 
AnswerRe: Overloading methods with identical content in lot of derived classes Pin
FriendOfAsherah7-Jul-16 22:54
FriendOfAsherah7-Jul-16 22:54 
QuestionRe: Overloading methods with identical content in lot of derived classes Pin
CPallini7-Jul-16 23:37
mveCPallini7-Jul-16 23:37 

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.