{"id":805,"date":"2010-12-06T16:38:54","date_gmt":"2010-12-06T14:38:54","guid":{"rendered":"http:\/\/mariusbancila.ro\/blog\/?p=805"},"modified":"2011-05-19T15:18:31","modified_gmt":"2011-05-19T13:18:31","slug":"addremove-commands-tofrom-the-window-menu","status":"publish","type":"post","link":"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/","title":{"rendered":"Add\/Remove Commands to\/from the Window Menu"},"content":{"rendered":"<p>A window&#8217;s system menu (now called simply <em>window menu<\/em>) features by default commands like Move, Size or Close. (When the user selects one of these commands a <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/ms646360%28VS.85%29.aspx\">WM_SYSCOMMAND<\/a> message is sent to the window.) What if you want to remove and add these commands on the fly? Here is how you can do it.<\/p>\n<p>This is how a default Window menu looks for a dialog window.<br \/>\n<img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2010\/12\/windowmenudemo1.png\" title=\"Window Menu\" class=\"alignnone\" width=\"348\" height=\"262\" \/><\/p>\n<p>To remove the Move command:<\/p>\n<pre name=\"code\" class=\"cpp\">\r\n   CMenu* pSysMenu = GetSystemMenu(FALSE);\r\n   if(pSysMenu != NULL)\r\n      pSysMenu->RemoveMenu(SC_MOVE, MF_BYCOMMAND);\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2010\/12\/windowmenudemo2.png\" title=\"Move command removed\" class=\"alignnone\" width=\"348\" height=\"262\" \/><\/p>\n<p>To add the Move command, you can do something like this (you can also insert it at a specific position, other than 0):<\/p>\n<pre name=\"code\" class=\"cpp\">\r\n   CMenu* pSysMenu = GetSystemMenu(FALSE);\r\n   if(pSysMenu != NULL)\r\n      pSysMenu->InsertMenu(0, MF_BYCOMMAND, SC_MOVE, _T(\"Move\"));\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" src=\"\/blog\/wp-content\/uploads\/2010\/12\/windowmenudemo3.png\" title=\"Move command added\" class=\"alignnone\" width=\"348\" height=\"262\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>A window&#8217;s system menu (now called simply window menu) features by default commands like Move, Size or Close. (When the user selects one of these commands a WM_SYSCOMMAND message is sent to the window.) What if you want to remove and add these commands on the fly? Here is how you can do it. This &#8230; <a title=\"Add\/Remove Commands to\/from the Window Menu\" class=\"read-more\" href=\"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/\" aria-label=\"Read more about Add\/Remove Commands to\/from the Window Menu\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","advgb_blocks_editor_width":"","advgb_blocks_columns_visual_guide":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[7,12,8],"tags":[247,248],"class_list":["post-805","post","type-post","status-publish","format-standard","hentry","category-c","category-mfc","category-windows-programming","tag-menu","tag-window"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"description\" content=\"Learn how to add\/remove command to\/from the window system menu at runtime.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Marius Bancila\"\/>\n\t<meta name=\"keywords\" content=\"menu,system,commands,window\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.3\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Marius Bancila&#039;s Blog | About code. Mostly on C++\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"Add\/Remove Commands to\/from the Window Menu\" \/>\n\t\t<meta property=\"og:description\" content=\"Learn how to add\/remove command to\/from the window system menu at runtime.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2010-12-06T14:38:54+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2011-05-19T13:18:31+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Add\/Remove Commands to\/from the Window Menu\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Learn how to add\/remove command to\/from the window system menu at runtime.\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/12\\\/06\\\/addremove-commands-tofrom-the-window-menu\\\/#article\",\"name\":\"Add\\\/Remove Commands to\\\/from the Window Menu\",\"headline\":\"Add\\\/Remove Commands to\\\/from the Window Menu\",\"author\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-content\\\/uploads\\\/2010\\\/12\\\/windowmenudemo1.png\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/12\\\/06\\\/addremove-commands-tofrom-the-window-menu\\\/#articleImage\"},\"datePublished\":\"2010-12-06T16:38:54+02:00\",\"dateModified\":\"2011-05-19T15:18:31+02:00\",\"inLanguage\":\"en-US\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/12\\\/06\\\/addremove-commands-tofrom-the-window-menu\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/12\\\/06\\\/addremove-commands-tofrom-the-window-menu\\\/#webpage\"},\"articleSection\":\"C++, MFC, Windows Programming, menu, window\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/12\\\/06\\\/addremove-commands-tofrom-the-window-menu\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/#listItem\",\"name\":\"IT\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/#listItem\",\"position\":2,\"name\":\"IT\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/#listItem\",\"name\":\"Software\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/#listItem\",\"position\":3,\"name\":\"Software\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/c\\\/#listItem\",\"name\":\"C++\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/#listItem\",\"name\":\"IT\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/c\\\/#listItem\",\"position\":4,\"name\":\"C++\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/c\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/c\\\/mfc\\\/#listItem\",\"name\":\"MFC\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/#listItem\",\"name\":\"Software\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/c\\\/mfc\\\/#listItem\",\"position\":5,\"name\":\"MFC\",\"item\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/c\\\/mfc\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/12\\\/06\\\/addremove-commands-tofrom-the-window-menu\\\/#listItem\",\"name\":\"Add\\\/Remove Commands to\\\/from the Window Menu\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/c\\\/#listItem\",\"name\":\"C++\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/12\\\/06\\\/addremove-commands-tofrom-the-window-menu\\\/#listItem\",\"position\":6,\"name\":\"Add\\\/Remove Commands to\\\/from the Window Menu\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/c\\\/mfc\\\/#listItem\",\"name\":\"MFC\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\",\"name\":\"Marius Bancila's Blog\",\"description\":\"About code. Mostly on C++\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/\",\"name\":\"Marius Bancila\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/12\\\/06\\\/addremove-commands-tofrom-the-window-menu\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a84dd2831d955c38355ddea55df4df260809b88f36408bc14fd4eab8f7f131c9?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Marius Bancila\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/12\\\/06\\\/addremove-commands-tofrom-the-window-menu\\\/#webpage\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/12\\\/06\\\/addremove-commands-tofrom-the-window-menu\\\/\",\"name\":\"Add\\\/Remove Commands to\\\/from the Window Menu\",\"description\":\"Learn how to add\\\/remove command to\\\/from the window system menu at runtime.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2010\\\/12\\\/06\\\/addremove-commands-tofrom-the-window-menu\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2010-12-06T16:38:54+02:00\",\"dateModified\":\"2011-05-19T15:18:31+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/\",\"name\":\"Marius Bancila's Blog\",\"description\":\"About code. Mostly on C++\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Add\/Remove Commands to\/from the Window Menu","description":"Learn how to add\/remove command to\/from the window system menu at runtime.","canonical_url":"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/","robots":"max-image-preview:large","keywords":"menu,system,commands,window","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/#article","name":"Add\/Remove Commands to\/from the Window Menu","headline":"Add\/Remove Commands to\/from the Window Menu","author":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/mariusbancila.ro\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-content\/uploads\/2010\/12\/windowmenudemo1.png","@id":"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/#articleImage"},"datePublished":"2010-12-06T16:38:54+02:00","dateModified":"2011-05-19T15:18:31+02:00","inLanguage":"en-US","mainEntityOfPage":{"@id":"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/#webpage"},"isPartOf":{"@id":"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/#webpage"},"articleSection":"C++, MFC, Windows Programming, menu, window"},{"@type":"BreadcrumbList","@id":"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/mariusbancila.ro\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/#listItem","name":"IT"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/#listItem","position":2,"name":"IT","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/#listItem","name":"Software"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/#listItem","position":3,"name":"Software","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/#listItem","name":"C++"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/#listItem","name":"IT"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/#listItem","position":4,"name":"C++","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/mfc\/#listItem","name":"MFC"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/#listItem","name":"Software"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/mfc\/#listItem","position":5,"name":"MFC","item":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/mfc\/","nextItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/#listItem","name":"Add\/Remove Commands to\/from the Window Menu"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/#listItem","name":"C++"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/#listItem","position":6,"name":"Add\/Remove Commands to\/from the Window Menu","previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/mfc\/#listItem","name":"MFC"}}]},{"@type":"Organization","@id":"https:\/\/mariusbancila.ro\/blog\/#organization","name":"Marius Bancila's Blog","description":"About code. Mostly on C++","url":"https:\/\/mariusbancila.ro\/blog\/"},{"@type":"Person","@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author","url":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/","name":"Marius Bancila","image":{"@type":"ImageObject","@id":"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/a84dd2831d955c38355ddea55df4df260809b88f36408bc14fd4eab8f7f131c9?s=96&d=mm&r=g","width":96,"height":96,"caption":"Marius Bancila"}},{"@type":"WebPage","@id":"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/#webpage","url":"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/","name":"Add\/Remove Commands to\/from the Window Menu","description":"Learn how to add\/remove command to\/from the window system menu at runtime.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/mariusbancila.ro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/#breadcrumblist"},"author":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"datePublished":"2010-12-06T16:38:54+02:00","dateModified":"2011-05-19T15:18:31+02:00"},{"@type":"WebSite","@id":"https:\/\/mariusbancila.ro\/blog\/#website","url":"https:\/\/mariusbancila.ro\/blog\/","name":"Marius Bancila's Blog","description":"About code. Mostly on C++","inLanguage":"en-US","publisher":{"@id":"https:\/\/mariusbancila.ro\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"Marius Bancila's Blog | About code. Mostly on C++","og:type":"article","og:title":"Add\/Remove Commands to\/from the Window Menu","og:description":"Learn how to add\/remove command to\/from the window system menu at runtime.","og:url":"https:\/\/mariusbancila.ro\/blog\/2010\/12\/06\/addremove-commands-tofrom-the-window-menu\/","article:published_time":"2010-12-06T14:38:54+00:00","article:modified_time":"2011-05-19T13:18:31+00:00","twitter:card":"summary","twitter:title":"Add\/Remove Commands to\/from the Window Menu","twitter:description":"Learn how to add\/remove command to\/from the window system menu at runtime."},"aioseo_meta_data":{"post_id":"805","title":"Add\/Remove Commands to\/from the Window Menu","description":"Learn how to add\/remove command to\/from the window system menu at runtime.","keywords":[{"label":"menu","value":"menu"},{"label":"system","value":"system"},{"label":"commands","value":"commands"}],"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"location":null,"local_seo":null,"breadcrumb_settings":null,"limit_modified_date":false,"ai":null,"created":"2021-03-18 21:13:46","updated":"2025-12-12 07:35:21","seo_analyzer_scan_date":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"author_meta":{"display_name":"Marius Bancila","author_link":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/"},"featured_img":null,"jetpack_publicize_connections":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Marius Bancila","author_link":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/"},"uagb_comment_info":0,"uagb_excerpt":"A window&#8217;s system menu (now called simply window menu) features by default commands like Move, Size or Close. (When the user selects one of these commands a WM_SYSCOMMAND message is sent to the window.) What if you want to remove and add these commands on the fly? Here is how you can do it. This&hellip;","coauthors":[],"tax_additional":{"categories":{"linked":["<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/\" class=\"advgb-post-tax-term\">C++<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/mfc\/\" class=\"advgb-post-tax-term\">MFC<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/windows-programming\/\" class=\"advgb-post-tax-term\">Windows Programming<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">C++<\/span>","<span class=\"advgb-post-tax-term\">MFC<\/span>","<span class=\"advgb-post-tax-term\">Windows Programming<\/span>"]},"tags":{"linked":["<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/windows-programming\/\" class=\"advgb-post-tax-term\">menu<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/windows-programming\/\" class=\"advgb-post-tax-term\">window<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">menu<\/span>","<span class=\"advgb-post-tax-term\">window<\/span>"]}},"comment_count":"0","relative_dates":{"created":"Posted 16 years ago","modified":"Updated 15 years ago"},"absolute_dates":{"created":"Posted on December 6, 2010","modified":"Updated on May 19, 2011"},"absolute_dates_time":{"created":"Posted on December 6, 2010 4:38 pm","modified":"Updated on May 19, 2011 3:18 pm"},"featured_img_caption":"","series_order":"","jetpack_shortlink":"https:\/\/wp.me\/pYNdv-cZ","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/comments?post=805"}],"version-history":[{"count":4,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/805\/revisions"}],"predecessor-version":[{"id":987,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/805\/revisions\/987"}],"wp:attachment":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/media?parent=805"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/categories?post=805"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/tags?post=805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}