{"id":218,"date":"2009-03-08T21:13:08","date_gmt":"2009-03-08T19:13:08","guid":{"rendered":"http:\/\/mariusbancila.ro\/blog\/?p=218"},"modified":"2009-03-09T21:56:30","modified_gmt":"2009-03-09T19:56:30","slug":"restart-manager-in-mfc","status":"publish","type":"post","link":"https:\/\/mariusbancila.ro\/blog\/2009\/03\/08\/restart-manager-in-mfc\/","title":{"rendered":"Restart Manager in MFC"},"content":{"rendered":"<p>One of the new features available in MFC in the Visual Studio 2010 CTP is the Restart Manager. This was introduced with Windows Vista to offer support for restarting application when a crash occurs or when an automatic update needs to close and then restart an application.<\/p>\n<p>When you create a new MFC project in Visual Studio 2010, in the <b>Advanced Features<\/b> property page you can specify the level of support you want for the restart manager.<\/p>\n<p><img decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/2009\/03\/recovdemo1.png\" atl=\"Select level of support\" \/><\/p>\n<p>You can select one of the following:<\/p>\n<ul>\n<li><b>Support Restart Manager<\/b>: restarts after crash or upgrade<\/li>\n<li><b>Reopen previously open documents<\/b>: reopens previously open documents<\/li>\n<li><b>Support application recovery<\/b>: recovers auto saved documents<\/li>\n<\/ul>\n<p>There are three flags defined for these three options:<\/p>\n<ul>\n<li><b>AFX_RESTART_MANAGER_SUPPORT_RESTART<\/b> for Support Restart Manager<\/li>\n<li><b>AFX_RESTART_MANAGER_SUPPORT_RESTART_ASPECTS<\/b> for Reopen previously open documents<\/li>\n<li><b>AFX_RESTART_MANAGER_SUPPORT_ALL_ASPECTS<\/b> for Support application recovery<\/li>\n<\/ul>\n<p>These are defined in the afxwin.h header.<\/p>\n<pre class=\"prettyprint\">\r\n\/\/ Restart Manager support flags\r\n#define AFX_RESTART_MANAGER_SUPPORT_RESTART           0x01  \/\/ restart support, means application is registered via RegisterApplicationRestart\r\n#define AFX_RESTART_MANAGER_SUPPORT_RECOVERY          0x02  \/\/ recovery support, means application is registered via RegisterApplicationRecoveryCallback\r\n#define AFX_RESTART_MANAGER_AUTOSAVE_AT_RESTART       0x04  \/\/ auto-save support is enabled, documents will be autosaved at restart by restart manager\r\n#define AFX_RESTART_MANAGER_AUTOSAVE_AT_INTERVAL      0x08  \/\/ auto-save support is enabled, documents will be autosaved periodically for crash recovery\r\n#define AFX_RESTART_MANAGER_REOPEN_PREVIOUS_FILES     0x10  \/\/ reopen of previously opened documents is enabled, on restart all previous documents will be opened\r\n#define AFX_RESTART_MANAGER_RESTORE_AUTOSAVED_FILES   0x20  \/\/ restoration of auto-saved documents is enabled, on restart user will be prompted to open auto-saved documents intead of last saved\r\n#define AFX_RESTART_MANAGER_SUPPORT_NO_AUTOSAVE       AFX_RESTART_MANAGER_SUPPORT_RESTART | \r\n                                                      AFX_RESTART_MANAGER_SUPPORT_RECOVERY | \r\n                                                      AFX_RESTART_MANAGER_REOPEN_PREVIOUS_FILES\r\n#define AFX_RESTART_MANAGER_SUPPORT_ALL_ASPECTS       AFX_RESTART_MANAGER_SUPPORT_NO_AUTOSAVE | \r\n                                                      AFX_RESTART_MANAGER_AUTOSAVE_AT_RESTART | \r\n                                                      AFX_RESTART_MANAGER_AUTOSAVE_AT_INTERVAL | \r\n                                                      AFX_RESTART_MANAGER_RESTORE_AUTOSAVED_FILES\r\n#define AFX_RESTART_MANAGER_SUPPORT_RESTART_ASPECTS   AFX_RESTART_MANAGER_SUPPORT_RESTART | \r\n                                                      AFX_RESTART_MANAGER_AUTOSAVE_AT_RESTART | \r\n                                                      AFX_RESTART_MANAGER_REOPEN_PREVIOUS_FILES | \r\n                                                      AFX_RESTART_MANAGER_RESTORE_AUTOSAVED_FILES\r\n#define AFX_RESTART_MANAGER_SUPPORT_RECOVERY_ASPECTS  AFX_RESTART_MANAGER_SUPPORT_RECOVERY | \r\n                                                      AFX_RESTART_MANAGER_AUTOSAVE_AT_INTERVAL | \r\n                                                      AFX_RESTART_MANAGER_REOPEN_PREVIOUS_FILES | \r\n                                                      AFX_RESTART_MANAGER_RESTORE_AUTOSAVED_FILES\r\n<\/pre>\n<p>Enabling this support is done with a single line in the constructor of the CWinAppEx derived class.<\/p>\n<pre class=\"prettyprint\">\r\nCRecoveryDemoApp::CRecoveryDemoApp()\r\n{\r\n\tm_bHiColorIcons = TRUE;\r\n\r\n\t\/\/ support Restart Manager\r\n\tm_dwRestartManagerSupportFlags = AFX_RESTART_MANAGER_SUPPORT_ALL_ASPECTS;\r\n\r\n\t\/\/ TODO: add construction code here,\r\n\t\/\/ Place all significant initialization in InitInstance\r\n}\r\n<\/pre>\n<p>Here is an application with the full support for restart enabled. There are two opened documents, one that is saved (on the left) and one that is not saved (on the right).<\/p>\n<p><img decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/2009\/03\/recovdemo2.png\" atl=\"Application with two documents\" \/><\/p>\n<p>When I hit the crash button, the application uses a null pointer and crashes.<\/p>\n<p><img decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/2009\/03\/recovdemo3.png\" atl=\"Application has stopped working\" \/><\/p>\n<p>Now, when I press the <b>Ignore<\/b> button of the crash report window, I get the restart manager window tha allows me to <b>Restart the program<\/b>.<\/p>\n<p><img decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/2009\/03\/recovdemo4.png\" atl=\"Restarting the program\" \/><\/p>\n<p>The restart manager will attempt to restart the program and reopen my documents, which it successfully does.<\/p>\n<p><img decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/2009\/03\/recovdemo5.png\" atl=\"Application restarted\" \/><\/p>\n<p>However, you can see that though the support for recovering auto saved documents was enabled, the second, unsaved document was not recovered. The reason was that this document was not auto saved, because the default interval for the auto save is 5 minutes and I crashed the program immediatelly after writing into the document. This default interval can be changed by calling the SetAutosaveInterval() method of the data recovery handler. In the following example I change this interval to one minute.<\/p>\n<pre class=\"prettyprint\">\r\nBOOL CRecoveryDemoApp::InitInstance()\r\n{\r\n   \/\/ ...\r\n   \r\n   CDataRecoveryHandler* autohandler = AfxGetApp()->GetDataRecoveryHandler();\r\n   autohandler->SetAutosaveInterval(60000);\r\n   \r\n   return TRUE;\r\n}\r\n<\/pre>\n<p>Here is another instance of the application with the first document saved, and the second not directly saved, but auto saved after one minute of inactivity.<\/p>\n<p><img decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/2009\/03\/recovdemo6.png\" atl=\"Application with two documents\" \/><\/p>\n<p>When the application restarts, because there was an auto saved document that can be recovered, a new window is displayed.<\/p>\n<p><img decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/2009\/03\/recovdemo7.png\" atl=\"Recovery options\" \/><\/p>\n<p>If I choose <b>Recover the auto-saved documents<\/b> my unsaved (but auto saved) document is recovered.<\/p>\n<p><img decoding=\"async\" src=\"\/blog\/wp-content\/uploads\/2009\/03\/recovdemo8.png\" atl=\"Recovered auto-saved document\" \/><\/p>\n<p>These options for restarting the application and saving and loading the application data (documents) are exposed through virtual methods in the CWinAppEx class.<\/p>\n<pre class=\"prettyprint\">\r\nvirtual void PreLoadState() {}    \/\/ called before anything is loaded\r\nvirtual void LoadCustomState() {} \/\/ called after everything is loaded\r\nvirtual void PreSaveState() {}    \/\/ called before anything is saved\r\nvirtual void SaveCustomState() {} \/\/ called after everything is saved\r\n<\/pre>\n<p>You can override these methods in your application for custom handling of the save and load operations.<\/p>\n<p>To learn more about this new feature I suggest you read the <a href=\"http:\/\/blogs.msdn.com\/vcblog\/archive\/2009\/02\/18\/mfc-restart-manager.aspx\" target=\"_blank\">Visual C++ team&#8217;s blog<\/a>.<\/p>\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the new features available in MFC in the Visual Studio 2010 CTP is the Restart Manager. This was introduced with Windows Vista to offer support for restarting application when a crash occurs or when an automatic update needs to close and then restart an application. When you create a new MFC project in &#8230; <a title=\"Restart Manager in MFC\" class=\"read-more\" href=\"https:\/\/mariusbancila.ro\/blog\/2009\/03\/08\/restart-manager-in-mfc\/\" aria-label=\"Read more about Restart Manager in MFC\">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,20,12],"tags":[451,453,89],"class_list":["post-218","post","type-post","status-publish","format-standard","hentry","category-c","category-ctps-betas","category-mfc","tag-c","tag-mfc","tag-vs2010"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.3 - aioseo.com -->\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Marius Bancila\"\/>\n\t<meta name=\"keywords\" content=\"c++,mfc,vs2010\" \/>\n\t<link rel=\"canonical\" href=\"https:\/\/mariusbancila.ro\/blog\/2009\/03\/08\/restart-manager-in-mfc\/\" \/>\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=\"Restart Manager in MFC\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/mariusbancila.ro\/blog\/2009\/03\/08\/restart-manager-in-mfc\/\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2009-03-08T19:13:08+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2009-03-09T19:56:30+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:title\" content=\"Restart Manager in MFC\" \/>\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\\\/2009\\\/03\\\/08\\\/restart-manager-in-mfc\\\/#article\",\"name\":\"Restart Manager in MFC\",\"headline\":\"Restart Manager in MFC\",\"author\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"\\\/blog\\\/wp-content\\\/uploads\\\/2009\\\/03\\\/recovdemo1.png\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2009\\\/03\\\/08\\\/restart-manager-in-mfc\\\/#articleImage\"},\"datePublished\":\"2009-03-08T21:13:08+02:00\",\"dateModified\":\"2009-03-09T21:56:30+02:00\",\"inLanguage\":\"en-US\",\"commentCount\":4,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2009\\\/03\\\/08\\\/restart-manager-in-mfc\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2009\\\/03\\\/08\\\/restart-manager-in-mfc\\\/#webpage\"},\"articleSection\":\"C++, CTPs &amp; Betas, MFC, C++, MFC, VS2010\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2009\\\/03\\\/08\\\/restart-manager-in-mfc\\\/#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\\\/2009\\\/03\\\/08\\\/restart-manager-in-mfc\\\/#listItem\",\"name\":\"Restart Manager in MFC\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/category\\\/it\\\/software\\\/c\\\/#listItem\",\"name\":\"C++\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2009\\\/03\\\/08\\\/restart-manager-in-mfc\\\/#listItem\",\"position\":6,\"name\":\"Restart Manager in MFC\",\"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\\\/2009\\\/03\\\/08\\\/restart-manager-in-mfc\\\/#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\\\/2009\\\/03\\\/08\\\/restart-manager-in-mfc\\\/#webpage\",\"url\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2009\\\/03\\\/08\\\/restart-manager-in-mfc\\\/\",\"name\":\"Restart Manager in MFC\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/2009\\\/03\\\/08\\\/restart-manager-in-mfc\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/mariusbancila.ro\\\/blog\\\/author\\\/admin\\\/#author\"},\"datePublished\":\"2009-03-08T21:13:08+02:00\",\"dateModified\":\"2009-03-09T21:56:30+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":"Restart Manager in MFC","description":"","canonical_url":"https:\/\/mariusbancila.ro\/blog\/2009\/03\/08\/restart-manager-in-mfc\/","robots":"max-image-preview:large","keywords":"c++,mfc,vs2010","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/mariusbancila.ro\/blog\/2009\/03\/08\/restart-manager-in-mfc\/#article","name":"Restart Manager in MFC","headline":"Restart Manager in MFC","author":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"publisher":{"@id":"https:\/\/mariusbancila.ro\/blog\/#organization"},"image":{"@type":"ImageObject","url":"\/blog\/wp-content\/uploads\/2009\/03\/recovdemo1.png","@id":"https:\/\/mariusbancila.ro\/blog\/2009\/03\/08\/restart-manager-in-mfc\/#articleImage"},"datePublished":"2009-03-08T21:13:08+02:00","dateModified":"2009-03-09T21:56:30+02:00","inLanguage":"en-US","commentCount":4,"mainEntityOfPage":{"@id":"https:\/\/mariusbancila.ro\/blog\/2009\/03\/08\/restart-manager-in-mfc\/#webpage"},"isPartOf":{"@id":"https:\/\/mariusbancila.ro\/blog\/2009\/03\/08\/restart-manager-in-mfc\/#webpage"},"articleSection":"C++, CTPs &amp; Betas, MFC, C++, MFC, VS2010"},{"@type":"BreadcrumbList","@id":"https:\/\/mariusbancila.ro\/blog\/2009\/03\/08\/restart-manager-in-mfc\/#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\/2009\/03\/08\/restart-manager-in-mfc\/#listItem","name":"Restart Manager in MFC"},"previousItem":{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/#listItem","name":"C++"}},{"@type":"ListItem","@id":"https:\/\/mariusbancila.ro\/blog\/2009\/03\/08\/restart-manager-in-mfc\/#listItem","position":6,"name":"Restart Manager in MFC","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\/2009\/03\/08\/restart-manager-in-mfc\/#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\/2009\/03\/08\/restart-manager-in-mfc\/#webpage","url":"https:\/\/mariusbancila.ro\/blog\/2009\/03\/08\/restart-manager-in-mfc\/","name":"Restart Manager in MFC","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/mariusbancila.ro\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/mariusbancila.ro\/blog\/2009\/03\/08\/restart-manager-in-mfc\/#breadcrumblist"},"author":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"creator":{"@id":"https:\/\/mariusbancila.ro\/blog\/author\/admin\/#author"},"datePublished":"2009-03-08T21:13:08+02:00","dateModified":"2009-03-09T21:56:30+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":"Restart Manager in MFC","og:url":"https:\/\/mariusbancila.ro\/blog\/2009\/03\/08\/restart-manager-in-mfc\/","article:published_time":"2009-03-08T19:13:08+00:00","article:modified_time":"2009-03-09T19:56:30+00:00","twitter:card":"summary","twitter:title":"Restart Manager in MFC"},"aioseo_meta_data":{"post_id":"218","title":null,"description":null,"keywords":null,"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:16:02","updated":"2025-12-12 07:25:17","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":4,"uagb_excerpt":"One of the new features available in MFC in the Visual Studio 2010 CTP is the Restart Manager. This was introduced with Windows Vista to offer support for restarting application when a crash occurs or when an automatic update needs to close and then restart an application. When you create a new MFC project in&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\/ctps-betas\/\" class=\"advgb-post-tax-term\">CTPs &amp; Betas<\/a>","<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/mfc\/\" class=\"advgb-post-tax-term\">MFC<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">C++<\/span>","<span class=\"advgb-post-tax-term\">CTPs &amp; Betas<\/span>","<span class=\"advgb-post-tax-term\">MFC<\/span>"]},"tags":{"linked":["<a href=\"https:\/\/mariusbancila.ro\/blog\/category\/it\/software\/c\/mfc\/\" 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\/c\/mfc\/\" class=\"advgb-post-tax-term\">VS2010<\/a>"],"unlinked":["<span class=\"advgb-post-tax-term\">C++<\/span>","<span class=\"advgb-post-tax-term\">MFC<\/span>","<span class=\"advgb-post-tax-term\">VS2010<\/span>"]}},"comment_count":"4","relative_dates":{"created":"Posted 18 years ago","modified":"Updated 18 years ago"},"absolute_dates":{"created":"Posted on March 8, 2009","modified":"Updated on March 9, 2009"},"absolute_dates_time":{"created":"Posted on March 8, 2009 9:13 pm","modified":"Updated on March 9, 2009 9:56 pm"},"featured_img_caption":"","series_order":"","jetpack_shortlink":"https:\/\/wp.me\/pYNdv-3w","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/218","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=218"}],"version-history":[{"count":3,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/218\/revisions"}],"predecessor-version":[{"id":221,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/posts\/218\/revisions\/221"}],"wp:attachment":[{"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/media?parent=218"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/categories?post=218"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mariusbancila.ro\/blog\/wp-json\/wp\/v2\/tags?post=218"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}