|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
wxMac - Bring application to frontHi I have a tray application, that brings up various modeless dialog boxes from the context menu. If there are other applications open on the desktop, and one of them has focus, and I right click, then bring up a dialog box, the dialog is behind everything. If I left click on the tray icon, to bring the application to focus, then right click and bring up the dialog, the dialog is on top of everything. I need a way to bring the app to the front, so the dialogs show. I've tried using Raise(), but all that seems to do is bring the dialog to the top of the stack within the program, not the desktop. Help! -=Bob --------------------------------------------------------------------- To unsubscribe, e-mail: wx-users-unsubscribe@... For additional commands, e-mail: wx-users-help@... |
|
|
|
|
|
Re: wxMac - Bring application to frontBob McCown wrote:
> I need a way to bring the app to the front, so the dialogs show. I've tried using Raise(), but all that seems to do is bring the dialog to the top of the stack within the program, not the desktop. Here's some code I use to bring our app to the front: #ifdef __WXMAC__ ProcessSerialNumber process; if ( GetCurrentProcess(&process) == noErr ) SetFrontProcess(&process); #endif #ifdef __WXMSW__ SetForegroundWindow( (HWND)mainptr->GetHandle() ); #endif Maybe there is a high-level wx call like wxBringAppToFront, but I haven't been able to find it. Andrew --------------------------------------------------------------------- To unsubscribe, e-mail: wx-users-unsubscribe@... For additional commands, e-mail: wx-users-help@... |
|
|
Re[2]: wxMac - Bring application to frontOn Tue, 11 Apr 2006 18:03:06 +1000 Andrew Trevorrow <andrew@...> wrote:
AT> Bob McCown wrote: AT> AT> > I need a way to bring the app to the front, so the dialogs show. I've tried using Raise(), but all that seems to do is bring the dialog to the top of the stack within the program, not the desktop. AT> AT> Here's some code I use to bring our app to the front: AT> AT> #ifdef __WXMAC__ AT> ProcessSerialNumber process; AT> if ( GetCurrentProcess(&process) == noErr ) AT> SetFrontProcess(&process); AT> #endif AT> #ifdef __WXMSW__ AT> SetForegroundWindow( (HWND)mainptr->GetHandle() ); AT> #endif AT> AT> Maybe there is a high-level wx call like wxBringAppToFront, but I haven't AT> been able to find it. I certainly can see that a wxApp::BringToFront() could be useful. And it could just be implemented as GetTopWindow()->Raise() by default, too. If anyone feels like making a patch implementing it, it would be great. Regards, VZ -- TT-Solutions: wxWidgets consultancy and technical support http://www.tt-solutions.com/ --------------------------------------------------------------------- To unsubscribe, e-mail: wx-users-unsubscribe@... For additional commands, e-mail: wx-users-help@... |
|
|
Re: wxMac - Bring application to frontThanks Andrew, works like a charm. -=Bob Andrew Trevorrow wrote: >Bob McCown wrote: > > > >> I need a way to bring the app to the front, so the dialogs show. I've tried using Raise(), but all that seems to do is bring the dialog to the top of the stack within the program, not the desktop. >> >> > >Here's some code I use to bring our app to the front: > > #ifdef __WXMAC__ > ProcessSerialNumber process; > if ( GetCurrentProcess(&process) == noErr ) > SetFrontProcess(&process); > #endif > #ifdef __WXMSW__ > SetForegroundWindow( (HWND)mainptr->GetHandle() ); > #endif > >Maybe there is a high-level wx call like wxBringAppToFront, but I haven't >been able to find it. > >Andrew > >--------------------------------------------------------------------- >To unsubscribe, e-mail: wx-users-unsubscribe@... >For additional commands, e-mail: wx-users-help@... > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: wx-users-unsubscribe@... For additional commands, e-mail: wx-users-help@... |
| Free embeddable forum powered by Nabble | Forum Help |