Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » CExtMsgBox problems Collapse All
Subject Author Date
Ashley Gullen Jan 29, 2009 - 5:23 AM

In our application, we have a messagebox with a ’do not show this again checkbox’ when the user presses delete. If this is checked and ’no’ is clicked, the delete command is not carried out, however Prof-UIS saves this result to registry and as such the messagebox never appears again and the delete code is always skipped. This results in users not being able to use the delete command. Is there a way for us to handle the outcome of the messagebox, as opposed to it being automatically hidden every time thereafter?

Technical Support Jan 29, 2009 - 12:45 PM

Here are the functions displaying a message box:

int __PROF_UIS_API ProfUISMsgBox(
            HWND hWndParent,
            UINT nMessageResourceID,
            UINT nCaptionResourceID = 0,
            UINT nMsgBoxStyle = __EXT_MB_DEFAULT_STYLES,
            UINT nHelpID = 0,
            __EXT_MFC_SAFE_LPCTSTR strUniqueID = NULL, // for __EXT_MB_DO_NOT_DISPLAY_AGAIN and __EXT_MB_DO_NOT_ASK_AGAIN
            UINT nMsgBoxStyleEx = __EXT_MB_EX_DEFAULT_STYLES,
            UINT nTimeoutSeconds = 0,
            bool bIsDisabledTimeout = false,
            CExtBitmap * pBmpIcon = NULL
            );
int __PROF_UIS_API ProfUISMsgBox(
            HWND hWndParent,
            __EXT_MFC_SAFE_LPCTSTR strMessageText, 
            __EXT_MFC_SAFE_LPCTSTR strCaption = NULL,
            UINT nMsgBoxStyle = __EXT_MB_DEFAULT_STYLES,
            UINT nHelpID = 0,
            __EXT_MFC_SAFE_LPCTSTR strUniqueID = NULL, // for __EXT_MB_DO_NOT_DISPLAY_AGAIN and __EXT_MB_DO_NOT_ASK_AGAIN
            UINT nMsgBoxStyleEx = __EXT_MB_EX_DEFAULT_STYLES,
            UINT nTimeoutSeconds = 0,
            bool bIsDisabledTimeout = false,
            CExtBitmap * pBmpIcon = NULL
            );
If you are using the __EXT_MB_DO_NOT_DISPLAY_AGAIN and __EXT_MB_DO_NOT_ASK_AGAIN styles, then it’s recommended to specify some unique string in the strUniqueID parameter for each of message boxes in your application. But if you need to reset the checked state of such message boxes, then you should initialize the CExtMsgBox with the same parameters in constructor and invoke the CExtMsgBox::ResetMsgBox() method. You can invoke the CExtMsgBox::ResetAllMsgBoxes() static method to reset checked states of all the message boxes in your application.