Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » wndTopMost ignored in CExtResizableDialog Collapse All
Subject Author Date
John Ritzenthaler Feb 27, 2009 - 5:24 PM

I’m using a modeless CExtResizableDialog and want to float it over other application (such as Excel) to drag and drop data.  I’m using this call:


      SetWindowPos(&wndTopMost, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);


This worked fine when I derived from CDialog but doesn’t work with CExtResizableDialog


 

Technical Support Mar 1, 2009 - 4:47 AM

We can create some test project which invokes the same line of code, but we would like not to guess how your real project really created dialog, which window styles are used by this dialog and so on. Could you please modify some simple Prof-UIS sample project like SDI, make it displaying dialog like your real project do and send this modified project to us.

John Ritzenthaler Mar 4, 2009 - 9:43 AM

I created different projects using variations of ProfUIS/non-ProfUIS dialogs and found that the problem isn’t related to your library.  Unfortunately I haven’t figured out what IS causing it.

John Ritzenthaler Mar 9, 2009 - 5:16 PM

After a long struggle...


The problem is caused by something the toolbar does AFTER sending the command.  In processing the command, I use SetWindowPos() to make it topmost.  But sometimes it works, sometimes it doesn’t.


My work-around was to post another message to the window.  The toolbar command processing then completes before I get the 2nd command message.  When I process the 2nd command message, I call SetWindowPos() and everything works fine.


CDlg::OnBtnFloat()

{

PostMessage(WM_COMMAND, ID_BTN_FLOAT2);

}

CDlg::OnBtnFloat2()

{

SetWindowPos(...);

}