Click here to Skip to main content
15,899,754 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Exceptions handler question Pin
Richard MacCutchan16-Aug-12 6:59
mveRichard MacCutchan16-Aug-12 6:59 
GeneralRe: Exceptions handler question Pin
ForNow17-Aug-12 3:44
ForNow17-Aug-12 3:44 
GeneralRe: Exceptions handler question Pin
Richard MacCutchan17-Aug-12 4:53
mveRichard MacCutchan17-Aug-12 4:53 
GeneralRe: Exceptions handler question Pin
Eugen Podsypalnikov17-Aug-12 5:01
Eugen Podsypalnikov17-Aug-12 5:01 
AnswerRe: Exceptions handler question Pin
JackDingler16-Aug-12 7:59
JackDingler16-Aug-12 7:59 
QuestionCreateInstance(__uuidof(MYClass)); Pin
KeithF16-Aug-12 2:23
KeithF16-Aug-12 2:23 
AnswerRe: CreateInstance(__uuidof(MYClass)); Pin
KeithF20-Aug-12 6:06
KeithF20-Aug-12 6:06 
QuestionTreeCtrl edge not drawing when resized as part of CControlBar Pin
Phil Outram16-Aug-12 0:48
Phil Outram16-Aug-12 0:48 
OK, this is a bit of a long shot, but any help would be appreciated...

I have a CWnd that contains a CHeaderCtrl and CTreeCtrl within a CDialog within a CScrollView within a CSplitterWnd within a CControlBar.

All works very well except the CWnd border (ClientEdge) is not redrawn (just seems to leave whatever was underneath) when splitter bar is moved, and CWnd is resized and invalidated. However, the edges ARE redrawn properly when the whole app is resized which also resizes panes in CSplitterWnd and subsequently CWnd in excatly same way as above. In other words, both scenarios call CSplitterWnd::RecalcLayout() which trickles down and drives all resizing of child view/dialog/window/tree control. The only difference I can really see is that one was generated by resizing whole app, while other was generated by StopTracking() of the CSplitterWnd. All other controls (buttons, group boxes, etc. resize and redraw fine).

The CWnd is created as such...
C++
CreateEx(WS_EX_CLIENTEDGE, NULL, NULL, WS_CHILD | WS_VISIBLE |
                                 WS_TABSTOP, rcTreeWnd, pDlg, IDC_TREE);


A lot of web crawling suggests perhaps that it's something to do with being on a CControlBar which may result in some notify commands not getting to all children? But
I've tried trapping the paint messages, but am a bit confused as OnPaint seems to be being called...I'm now assuming that the window border isn't actually drawn by OnPaint? If it's not, where is it drawn and by whom?

Just playing around with painting in OnEraseBkgnd, I've noticed something very strange...if I get client rect and paint the background red, in the case where it's not repainting correctly, only an area at either end of the scroll bars to the right of the tree control are being painted red, where as in the case where it is working, the whole control is being painted red - the client rects are always same size.

Invalidating the CWnd doesn't fix the problem. Calling InvalidateRect(NULL) invalidates the whole screen which does fix the repainting, but is not a viable solution as there are graphs on the other bits of the screen that can take several seconds to redraw and shouldn't be redrawn any time the splitter bars are moved.

Anyone ever seen anything like this? I'm extremely confused and any pointers as to things to try would be much appreciated.

BTW - dialog in view in splitter wnd in ccontrol bar is part of a function panel down one side of the app.

Many thanks,
Phil.
"He is no fool who gives what he cannot keep to gain that which he cannot lose.

AnswerSOLUTION!! Pin
Phil Outram16-Aug-12 2:06
Phil Outram16-Aug-12 2:06 
QuestionEnumprocessmodule fails Pin
Member 450808315-Aug-12 23:35
Member 450808315-Aug-12 23:35 
AnswerRe: Enumprocessmodule fails Pin
pasztorpisti15-Aug-12 23:39
pasztorpisti15-Aug-12 23:39 
AnswerRe: Enumprocessmodule fails Pin
David Crow16-Aug-12 3:59
David Crow16-Aug-12 3:59 
AnswerRe: Enumprocessmodule fails Pin
Software_Developer16-Aug-12 4:52
Software_Developer16-Aug-12 4:52 
QuestionHow can i calculate seconds value here? Pin
Le@rner15-Aug-12 21:35
Le@rner15-Aug-12 21:35 
QuestionRe: How can i calculate seconds value here? Pin
pasztorpisti15-Aug-12 22:18
pasztorpisti15-Aug-12 22:18 
AnswerRe: How can i calculate seconds value here? Pin
Le@rner15-Aug-12 22:25
Le@rner15-Aug-12 22:25 
SuggestionRe: How can i calculate seconds value here? Pin
pasztorpisti15-Aug-12 22:32
pasztorpisti15-Aug-12 22:32 
AnswerRe: How can i calculate seconds value here? Pin
Jochen Arndt16-Aug-12 1:43
professionalJochen Arndt16-Aug-12 1:43 
GeneralRe: How can i calculate seconds value here? Pin
pasztorpisti16-Aug-12 1:52
pasztorpisti16-Aug-12 1:52 
AnswerRe: How can i calculate seconds value here? Pin
Richard MacCutchan15-Aug-12 22:23
mveRichard MacCutchan15-Aug-12 22:23 
AnswerRe: How can i calculate seconds value here? Pin
pasztorpisti15-Aug-12 22:38
pasztorpisti15-Aug-12 22:38 
AnswerRe: How can i calculate seconds value here? Pin
Jochen Arndt15-Aug-12 22:49
professionalJochen Arndt15-Aug-12 22:49 
GeneralRe: How can i calculate seconds value here? Pin
Le@rner15-Aug-12 23:27
Le@rner15-Aug-12 23:27 
QuestionI want to find out where the focus belongs after EN_KILLFOCUS? Pin
Falconapollo15-Aug-12 18:24
Falconapollo15-Aug-12 18:24 
AnswerRe: I want to find out where the focus belongs after EN_KILLFOCUS? Pin
Software_Developer15-Aug-12 19:26
Software_Developer15-Aug-12 19:26 

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.