![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | HwndSource not rendering when come into view Hi there, I got a short question on interop with MFC. In an complex MFC-app I have a CStatic-object as the placeholder for the WPF-Contol. I use a HwndSource-object to wrap the WPF-stuff inside it. The size of the CStatic should also be the size of the HwndSource's HWND which I retrieve through: myHwnd = (HWND)hwndSource->Handle.ToPointer(); Now, I start the appication but the control doesn't show up. It only appears if I resize the app cause the CStatic reacts to WM_SIZE message. In the message handler OnSize(..) I do SetWindowPos(...) on the myHwnd-object and voila, the WPF-Control is visible. I checked that the HwndSourceParameters-object is initialized correctly. I also checked that the dimensions of the hwnd is valid ats startup and during runtime. I also tried to force redraw on the myHwnd-object but without success. Any ideas why the window is not painting itsself at startup and only appears after resize (SetWindowPos(..))? Thanks Chris :-) |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| games Rendering everywhere! | Vista Games | |||
| Page Rendering | Vista mail | |||