Guest TX_ Posted November 1, 2008 Share Posted November 1, 2008 (edited) Hello guys!This is my situation : I have standard MFC dialog, which I "inject" into another dialog of other process, with SetParent(this->GetSafeHwnd(), hwndRemoteDialog);. So my dialog (and all of it's controls) appear as part of that other dialog. To be more precise, I'm actually "injecting" it into one of the tabpage of that remote window. Now this is the problem : when I change tab to other, and then change back to that tab which now owns my window, some of the controls of my window (buttons, editboxes...) are not repainting - they are invisible until I hover the mouse over their location, when they re-appear again. This happens randomly to random controls, not to all.As we all know, during changing current tab, the old tab-page gets hidden (not destroyed), and after switching back to that tab the tabpage gets visible. So during this switch-back when ShowWindow(SW_SHOW) occures for that tabpage (which is the parent of my injected dialog), my dialog (some of it's subcontrols) does not repaint correctly. What is the reason? Do I need to add some window styles or extended window styles to it? It already has WS_CHILD style. I have tried adding some of "suspected" styles and extended styles but didn't help.Visual C++ 2008, MFC. The effect is more visible (occures more often for more controls) in XP than in Vista, I think...Any bit of help would be greatly appreciated !TX_ Edited November 1, 2008 by TX_ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now