![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
|
Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
br> br> |
| |||||||
![]() |
| | Thread Tools | Display Modes |
| | #1 (permalink) |
| Guest | 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 | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Vista not rendering 3D... | wrobes21 | Vista General | 3 | 04-06-2008 09:32 AM |
| HwndSource doubt | zidansoft | Avalon | 0 | 09-26-2007 02:51 AM |
| DIVX rendering | dev | Vista installation & setup | 9 | 04-17-2007 09:46 AM |
| Loading WPF User Control using HwndSource | mr1962 | Avalon | 2 | 06-13-2006 03:47 PM |
| Exception and slow loading when using HwndSource from a VB6 app | Gabriel Michaud | Avalon | 0 | 05-13-2006 02:59 PM |