Pregunta

I have a very weird behaviour in a screen with a modeless dialog and I cannot find a solution.

I open a modeless dialog by clicking on a button in a view. As the dialog is not modal I should be able to click any other buttons in this view while the dialog is opened. But I cannot. In fact I can not place the focus in any control..edits, buttons, etc.

I have check which messages the view is getting and it seems it doesn't get the WM_LBUTTONDOWN message. But it does get the WM_LBUTTONUP message.

To make things even weirder it just happen in Windows 7 64-bits (no one reported this problem in windows XP and is being used for a long time) and just in some computers. But I cannot find the reason and I don't have a clue about why it happens in these computers.

Does anybody have a clue? Somewhere to start looking at?

Thanks.

Javier

¿Fue útil?

Solución

it was a tricky question. The problem happened to be in a custom implementation of the dialogs. They draw it's non-client area with MFC2008 visual styles and when calling OnNcActivate for the visual manager it returned FALSE when Aero and Desktop Window Manager where active. So the dialog was not releasing the control to its child-controls.

Quite tricky as I said.....I just let you know where was the problem just in case someone somewhere ever have a similar problem. I lost two days trying to figure it out.

Thanks.

Javier

Otros consejos

you must deal with WM_NCACTIVATE in wrong way. make sure the parent window procedure return TRUE when it receive WM_NCACTIVATE with wparam is FALSE.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top