Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

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.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > Avalon

HwndSource not rendering when come into view

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 03-29-2006   #1 (permalink)
MueMeister
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 SpecsSystem Spec
Closed Thread

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


Vistax64.com is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media 2005-2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51