Click here to Skip to main content
15,914,820 members
Home / Discussions / WPF
   

WPF

 
GeneralRe: How to set mouse position? Pin
User 27100922-Apr-08 5:59
User 27100922-Apr-08 5:59 
GeneralOT: MVP Summit Pin
Colin Angus Mackay22-Apr-08 6:42
Colin Angus Mackay22-Apr-08 6:42 
GeneralRe: OT: MVP Summit Pin
User 27100922-Apr-08 7:43
User 27100922-Apr-08 7:43 
QuestionWPF and no end list Pin
asgardia19-Apr-08 13:05
asgardia19-Apr-08 13:05 
GeneralRe: WPF and no end list Pin
User 27100921-Apr-08 5:17
User 27100921-Apr-08 5:17 
QuestionWPF Browser Application With Ajax Pin
Abhijit Jana18-Apr-08 21:29
professionalAbhijit Jana18-Apr-08 21:29 
AnswerRe: WPF Browser Application With Ajax Pin
charlymoon23-Apr-08 12:21
charlymoon23-Apr-08 12:21 
QuestionWebBrowser hosted in a WPF user control called from MFC dialog hangs when pressing the TAB key. Pin
OscarOrtega18-Apr-08 6:28
OscarOrtega18-Apr-08 6:28 
Hi colleagues,

I'm dealing with a weird scenario that I will try to explain here. I don't know what more can I do to find a solution, so I'm posting here with the expectation that someone can help me.

I created a user control using WPF & C# in .NET 3.5 with VS2008. This control is placed in a dll. The control has a toolbar, a tree view on the right side and a browser on the left. Inside the XAML code, I'm inserting the WebBrowser control hosted in a WindowsFormsHost. If I use this control from a Container that uses WPF as well everything works fine.

The problems arise when I try to call the mentioned control from an MFC application. I created a modeless dialog and call my WPF control. The first problem was that WM_CHARS messages were eaten up by someone, and I didn't receive any keystroke in my WPF control. Hopefully, I found this useful link that helped me to solve the problem:
http://devonethatdevelops.wordpress.com/2007/10/30/wpf-win32-interop-with-hwndsource/

But the main problem is that when I put the focus in the web browser and press the TAB key, both the modeless dialog and the application hang. The only thing I can do is go to the task manager and end the process. I've been searching similar problems but found nothing. I've tried to put breakpoints on every KeyDown event both in the containing dialog and in the user control but nothing happens. It seems as though the TAB key absolutely swollen by don't-know-who.

I've executed the WPF control from a WPF container and the KeyDown events reach my control on every key I press, but when I call it from the MFC dialog the program don't stop in the breakpoints.

The only thing I know is that pressing the TAB key inside the web browser control frozens the application.

Please, do you have any idea of what could be happening? Any clue?

Well, thanks anyway for having had the patience of reading this.

Oscar Ortega
GeneralRe: WebBrowser hosted in a WPF user control called from MFC dialog hangs when pressing the TAB key. Pin
RNEELY21-Apr-08 17:24
RNEELY21-Apr-08 17:24 
GeneralRe: WebBrowser hosted in a WPF user control called from MFC dialog hangs when pressing the TAB key. Pin
OscarOrtega22-Apr-08 23:07
OscarOrtega22-Apr-08 23:07 
GeneralRe: WebBrowser hosted in a WPF user control called from MFC dialog hangs when pressing the TAB key. Pin
OscarOrtega23-Apr-08 0:14
OscarOrtega23-Apr-08 0:14 
GeneralRe: WebBrowser hosted in a WPF user control called from MFC dialog hangs when pressing the TAB key. Pin
RNEELY23-Apr-08 3:35
RNEELY23-Apr-08 3:35 
GeneralRe: WebBrowser hosted in a WPF user control called from MFC dialog hangs when pressing the TAB key. Pin
OscarOrtega22-Apr-08 23:01
OscarOrtega22-Apr-08 23:01 
GeneralRe: WebBrowser hosted in a WPF user control called from MFC dialog hangs when pressing the TAB key. Pin
NickB25-Jun-08 4:14
NickB25-Jun-08 4:14 
GeneralWPF animation and performance Pin
koleraba17-Apr-08 12:14
koleraba17-Apr-08 12:14 
GeneralRe: WPF animation and performance Pin
User 27100917-Apr-08 18:26
User 27100917-Apr-08 18:26 
Generalfloat Dependency Property Exception Pin
RNEELY17-Apr-08 9:33
RNEELY17-Apr-08 9:33 
GeneralRe: float Dependency Property Exception Pin
Pete O'Hanlon17-Apr-08 9:55
mvePete O'Hanlon17-Apr-08 9:55 
GeneralRe: float Dependency Property Exception Pin
RNEELY17-Apr-08 10:00
RNEELY17-Apr-08 10:00 
Generalwpf xbap listbox problem Pin
pat3d216-Apr-08 9:03
pat3d216-Apr-08 9:03 
GeneralRe: wpf xbap listbox problem Pin
RNEELY18-Apr-08 4:48
RNEELY18-Apr-08 4:48 
GeneralRe: wpf xbap listbox problem Pin
pat3d223-Apr-08 7:27
pat3d223-Apr-08 7:27 
GeneralProblem with UserControl [modified] Pin
koleraba14-Apr-08 15:23
koleraba14-Apr-08 15:23 
GeneralRe: Problem with UserControl Pin
Insincere Dave14-Apr-08 16:33
Insincere Dave14-Apr-08 16:33 
GeneralRe: Problem with UserControl Pin
koleraba15-Apr-08 0:11
koleraba15-Apr-08 0:11 

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.