Windows popping up

Hello!

I am not sure where should I post this question (anyway, other forums give me errors when I try to open them). Let’s get straight to the problem…

Have you ever noticed that when your GL application is running and you press ALT + TAB (a dialog pops up) the performance decreases by 70%? Well, that’s not really a problem but when the dialog with which you choose a current window disappears the performance is still about only 60% of the previous one. When the window appears some windows settings probably are being made and even when it hides the application runs much worse.

Do you have any idea how to cope with it (at least, how to disable ALT+TAB)?

Thanks in advance! :slight_smile:

Orzech,

in windows, it is generally considered bad form to prevent the user from task switching, so I guess the short answer is: don’t do it. Anyway, it is better to be prepared for such a switch, and be able to handle it gracefully.

As for the performance hit, this is probably due to windows demoting your thread’s priority to accomodate the new foreground process, as it should be.

Thanks for your reply, Portal. :slight_smile:

Originally posted by Portal:
As for the performance hit, this is probably due to windows demoting your thread’s priority to accomodate the new foreground process, as it should be.
The problem is that the application doesn’t get to a previous state - I mean that it begins to run more slowly even after the ‘switchning-window’ gones. I know it seems odd. Do you now what can I do to bring my app to its full strength? :slight_smile:

Thanks

Hmmm, that is odd. You might try creating your window wih the WS_EX_TOPMOST style. You can also toggle this with the SetWindowPos(…) function using HWND_TOPMOST for the hWndInsertAfter parameter.

You could also utilize the GetThreadPriority(…) function to examine any changes that windows maybe making, then use the SetThreadPriority(…) function to make changes yourself.

All of these functions are fully documented in the MSDN.

Curious, what flavor of windows are you using?

Thanks, portal. :slight_smile:

Originally posted by Portal:
Curious, what flavor of windows are you using?
Win 2000 Pro (if that’s what you asked).

I’ll check out what you’ve said.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.