Win32 |
Author |
Message |
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3100 Location: Europe
|
Posted: Thu Dec 14, 2006 4:44 pm Post subject: Messages |
|
|
CodeGuru: Handling OS Shut Down in Windows Vista,
by Nick Wienholt
"The way Vista closes applications during operating system shut down
has changed from prior Windows versions' approaches. Learn how to provide
your users with appropriate notification from the Vista shut down screen." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3100 Location: Europe
|
Posted: Mon Jan 22, 2007 8:39 pm Post subject: |
|
|
RC: The cost of continuously-visible affordances with dynamic states
"Lazy evaluation means that the user doesn't pay for something until they
use it. In this case, paying for the cost of calculating whether the menu item
should be enabled or not. Depending on the program, calculating whether a
menu item should be enabled can turn out to be rather expensive, so it's
natural to avoid doing it whenever possible. ('I can do nothing really fast.')" |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Tue Jan 30, 2007 9:09 pm Post subject: |
|
|
ordering WM_QUERYENDSESSION
"> I have an application designed to intercept shutdown calls before an
> other application receives it , is there any way i can make sure my
> application gets the WM_QUERYENDSESSION message first?
Use SetProcessShutdownParameters() " |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Sun Mar 18, 2007 4:38 pm Post subject: |
|
|
How to draw my own style of window
"> how to use WM_NCPAINT and functions like DrawCaption(...) to draw my own
> style of window?
In general you cannot do this anymore because of the new 'Vista glass' DWM api." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Tue May 22, 2007 10:48 pm Post subject: |
|
|
Resizing window causes extreme flicker
"The code I have now functions fine, it's just that when the window resizes
the scroll bar flickers horribly." |
|
Back to top |
|
|
XNote Kapetan
Joined: 16 Jun 2006 Posts: 532
|
Posted: Mon Nov 05, 2007 5:52 pm Post subject: |
|
|
RC: Why do we even have the DefWindowProc function?
"With the DefWindowProc model, we can do this by calling DefWindowProc to
do the default processing, and then modifying the result on the back end. If
we had use the dialog-box-like model, there would have been no way to call
the "default handler" as a subroutine in order to make it to the heavy lifting.
We would be forced to do all the work or none of it." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Tue Apr 22, 2008 11:23 pm Post subject: |
|
|
RC: Windows doesn't close windows when a user logs off; that's your call
"Commenter Peter Kankowski asks why Windows doesn't send WM_CLOSE and
WM_DESTROY messages when the user logs off.
That's what WM_ENDSESSION is for. To tell the program that the Windows
session is ending, and that you should get done whatever last things you want
to get done before the world comes to an end." |
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3100 Location: Europe
|
Posted: Fri May 23, 2008 4:34 pm Post subject: |
|
|
RC: What does TranslateAccelerator do?
"For some reason, there appears to be some confusion over what
TranslateAccelerator does. It's very simple, and it's all spelled out
in the documentation. You give it a message, and if the message
is a keypress that matches an entry in the accelerator table, the
corresponding WM_COMMAND or WM_SYSCOMMAND message is
sent to the window you said you are translating messages for." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
Posted: Tue Nov 18, 2008 1:47 am Post subject: |
|
|
RC: Why bother with RegisterWaitForSingleObject when you have MsgWaitForMultipleObjects?
"If you're so clever that you can modify every call to PeekMessage, GetMessage,
and WaitMessage, then more power to you. But in order to do this, you'll have
to restrict the functions you call, because all sorts of functions contain their own
message loops. Do you call MessageBox? Or DialogBox? Those functions contain
a modal loop." |
|
Back to top |
|
|
delovski
Joined: 14 Jun 2006 Posts: 3524 Location: Zagreb
|
|
Back to top |
|
|
XNote Kapetan
Joined: 16 Jun 2006 Posts: 532
|
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3100 Location: Europe
|
Posted: Tue Nov 28, 2023 4:53 pm Post subject: |
|
|
so - SetWindowTextW in an ANSI project
"SetWindowText()/SetWindowTextA() and SetWindowTextW() are all really
WM_SETTEXT which is one of the few messages subject to code-page
translation when you create a multibyte/Ansi window. This means there is no
W and A versions of the message. All you need to do is intercept the
WM_SETTEXT message in your window and pass the arguments to
DefWindowProcW() instead of the usual DefWindowProcA/DefWindowProc()." |
|
Back to top |
|
|
Ike Kapetan
Joined: 17 Jun 2006 Posts: 3100 Location: Europe
|
Posted: Mon Apr 22, 2024 4:49 pm Post subject: |
|
|
MS - Support snap layouts for desktop apps on Windows 11
"If the app's window has the maximize caption button available, the system
will automatically show snap layouts when a user hovers the mouse over the
window's maximize button. Snap layouts will appear automatically for most
apps, but some desktop apps may not show snap layouts. This topic describes
how to make sure your app shows the menu with snap layouts if the system
does not show it automatically." |
|
Back to top |
|
|
|