* Method for resetting the message boxes stored in the registry. * * This method removes all results of formerly displayed message boxes from * the registry and therefore resets the state of the message boxes. Even * those, where the user checked "Don't display/ask again" will again be * displayed. */
| 334 | * displayed. |
| 335 | */ |
| 336 | void CMessageBoxDialog::ResetMessageBoxes ( ) |
| 337 | { |
| 338 | // Try to retrieve a handle to the application object. |
| 339 | CWinApp* pApplication = AfxGetApp(); |
| 340 | |
| 341 | ASSERT(pApplication != nullptr); |
| 342 | |
| 343 | // Check whether a handle was retrieved. |
| 344 | if ( pApplication != nullptr ) |
| 345 | { |
| 346 | // Delete the message box results stored in the registry. |
| 347 | pApplication->WriteProfileString(REGISTRY_SECTION_MESSAGEBOX, nullptr, nullptr); |
| 348 | } |
| 349 | } |
| 350 | |
| 351 | CString CMessageBoxDialog::GenerateRegistryKey(UINT nMessageID, UINT nHelpID) |
| 352 | { |
nothing calls this directly
no test coverage detected