>What about applying a certain window style to your pop-up window, so that it
>can't lose focus? I'm trying to locate info now on window styles from MSDN
>(for other reasons) since the gui-docs dont mention window styles well.
>Just a suggestion :-)
>Ian.

>> When I click a button and create a popup window...... all is well.
>> When I popup the same window by clicking an item in a list box, the box
>> opens in a flash but then the original window takes the focus back and
>> the popup window hides behind the original. I used SetForegroundWindow(
>> ) but that didn't work.
>>
>> Any other ideas?
>> Is this actually the listbox taking the focus because of the item click?
>>
>> Mike Kangas
>> [EMAIL PROTECTED]

You can also try calling a ->Disable() on your main window then calling
SetForegroundWindow(), or possibly SetFocus() on your popup, then when your
popup window terminates call ->Enable() and SetFocus() on your main window.  I
use that method and it works just fine.

Chuck





Reply via email to