{"id":16353,"date":"2009-10-16T07:00:00","date_gmt":"2009-10-16T07:00:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/oldnewthing\/2009\/10\/16\/important-window-message-numbers-to-memorize\/"},"modified":"2009-10-16T07:00:00","modified_gmt":"2009-10-16T07:00:00","slug":"important-window-message-numbers-to-memorize","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/oldnewthing\/20091016-00\/?p=16353","title":{"rendered":"Important window message numbers to memorize"},"content":{"rendered":"<p>You probably know them already, but if you&#8217;re new to Win32, here are some key window messages. I would normally suggest that you commit them to memory, but if you do enough debugging, you&#8217;ll end up memorizing them anyway because you see them all the time.<\/p>\n<table>\n<tr>\n<td><code>0x000F<\/code> <\/td>\n<td><code>WM_PAINT<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>0x001A<\/code> <\/td>\n<td><code>WM_WININICHANGE<\/code> \/ <code>WM_SETTINGCHANGE<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>0x0046<\/code> <\/td>\n<td><code>WM_WINDOWPOSCHANGING<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>0x0047<\/code> <\/td>\n<td><code>WM_WINDOWPOSCHANGED<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>0x004E<\/code> <\/td>\n<td><code>WM_NOTIFY<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>0x010n<\/code> <\/td>\n<td><code>WM_KEYxxx<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>0x0111<\/code> <\/td>\n<td><code>WM_COMMAND<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>0x0112<\/code> <\/td>\n<td><code>WM_SYSCOMMAND<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>0x0113<\/code> <\/td>\n<td><code>WM_TIMER<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>0x0200<\/code> <\/td>\n<td><code>WM_MOUSEMOVE<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>0x020n<\/code> <\/td>\n<td><code>WM_MOUSExxx<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>0x0400<\/code> <\/td>\n<td><code>WM_USER<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>0x8000<\/code> <\/td>\n<td><code>WM_APP<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>0xCxxx<\/code> <\/td>\n<td><code>RegisterWindowMessage<\/code><\/td>\n<\/tr>\n<\/table>\n<p> I include <code>0x001A<\/code> in the list even though it is a low-traffic message because you do see it a lot when you are investigating hangs. The <code>WM_SETTINGCHANGE<\/code> (which also goes by the name <code>WM_WININICHANGE<\/code>) is a common culprit when investigating why your program has wedged: You&#8217;re broadcasting a notification and there&#8217;s a window in the system that isn&#8217;t responding.<\/p>\n<p> I know that Visual Studio has <a href=\"http:\/\/blogs.msdn.com\/larryosterman\/archive\/2005\/05\/25\/421740.aspx#421762\"> a shortcut for decoding error codes<\/a>. I wonder if it has one for decoding message numbers. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>You probably know them already, but if you&#8217;re new to Win32, here are some key window messages. I would normally suggest that you commit them to memory, but if you do enough debugging, you&#8217;ll end up memorizing them anyway because you see them all the time. 0x000F WM_PAINT 0x001A WM_WININICHANGE \/ WM_SETTINGCHANGE 0x0046 WM_WINDOWPOSCHANGING 0x0047 [&hellip;]<\/p>\n","protected":false},"author":1069,"featured_media":111744,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[25],"class_list":["post-16353","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-oldnewthing","tag-code"],"acf":[],"blog_post_summary":"<p>You probably know them already, but if you&#8217;re new to Win32, here are some key window messages. I would normally suggest that you commit them to memory, but if you do enough debugging, you&#8217;ll end up memorizing them anyway because you see them all the time. 0x000F WM_PAINT 0x001A WM_WININICHANGE \/ WM_SETTINGCHANGE 0x0046 WM_WINDOWPOSCHANGING 0x0047 [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/16353","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/users\/1069"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/comments?post=16353"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/posts\/16353\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media\/111744"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/media?parent=16353"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/categories?post=16353"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/oldnewthing\/wp-json\/wp\/v2\/tags?post=16353"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}