Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Balloon Help as a non-modal replacement for MessageBox()

, 7 Aug 2002 CPOL
Although sometimes useful, message boxes used to display information are often just annoying. This article describes a non-modal replacement.
balloonhelpr2_demo.zip
BalloonTest.exe
res
BalloonTest.ico
BalloonTest.manifest
BalloonTest.dsw
BalloonTest.dsp
balloonhelpr2_src.zip
balloonhelpr3_demo.zip
BalloonTest.ico
BalloonTest.manifest
BalloonTest.dsw
BalloonTest.dsp
BalloonTest.exe
balloonhelpr3_src.zip
balloonhelp_demo.zip
BalloonTest.exe
BalloonTest.ico
BalloonTest.manifest
BalloonTest.dsw
BalloonTest.dsp
balloonhelp_src.zip
bh-atl.zip
BalloonTest.dsp
BalloonTest.dsw
BalloonTestps.mk
BalloonTestps.def
BalloonTest.rgs
BalloonTest.ico
BalloonTest.manifest
BalloonTest.suo
wtl_balloonhelp_demo.zip
BalloonTest
BalloonTest.dsp
Release
BalloonTest.exe
res
BalloonTest.exe.manifest
BalloonTest.ico
bob.bmp
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"

#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "atlres.h"

/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS

/////////////////////////////////////////////////////////////////////////////
// Deutsch (Deutschland) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_DEU)
#ifdef _WIN32
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
#pragma code_page(1252)
#endif //_WIN32

/////////////////////////////////////////////////////////////////////////////
//
// Bitmap
//

IDB_Bob                 BITMAP  DISCARDABLE     "res\\bob.bmp"

/////////////////////////////////////////////////////////////////////////////
//
// 24
//

IDR_RT_MANIFEST         24      DISCARDABLE     "res\\BalloonTest.exe.manifest"

/////////////////////////////////////////////////////////////////////////////
//
// Icon
//

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDR_MAINFRAME           ICON    DISCARDABLE     "res\\BalloonTest.ico"
#endif    // Deutsch (Deutschland) resources
/////////////////////////////////////////////////////////////////////////////


/////////////////////////////////////////////////////////////////////////////
// Englisch (USA) resources

#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32

#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//

1 TEXTINCLUDE DISCARDABLE 
BEGIN
    "resource.h\0"
END

2 TEXTINCLUDE DISCARDABLE 
BEGIN
    "#include ""atlres.h""\r\n"
    "\0"
END

3 TEXTINCLUDE DISCARDABLE 
BEGIN
    "CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST ""res\\\\BalloonTest.exe.manifest""\r\n"
    "\0"
END

#endif    // APSTUDIO_INVOKED


/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//

IDD_MAINDLG DIALOGEX 0, 0, 349, 269
STYLE DS_CONTEXTHELP | WS_CAPTION | WS_SYSMENU
CAPTION "BalloonTest"
FONT 8, "MS Sans Serif", 0, 0, 0x1
BEGIN
    DEFPUSHBUTTON   "E&xit",IDOK,292,248,50,14
    GROUPBOX        "Balloon Options",IDC_STATIC,7,7,335,132
    CONTROL         "BOCloseOnLButtonDown",IDC_BOCloseOnLButtonDown,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,20,20,115,12
    CONTROL         "BOCloseOnMButtonDown",IDC_BOCloseOnMButtonDown,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,20,32,115,12
    CONTROL         "BOCloseOnRButtonDown",IDC_BOCloseOnRButtonDown,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,20,44,115,12
    CONTROL         "BOCloseOnLButtonUp",IDC_BOCloseOnLButtonUp,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,20,59,115,12
    CONTROL         "BOCloseOnMButtonUp",IDC_BOCloseOnMButtonUp,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,20,71,115,12
    CONTROL         "BOCloseOnRButtonUp",IDC_BOCloseOnRButtonUp,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,20,83,115,12
    CONTROL         "BOCloseOnMouseMove",IDC_BOCloseOnMouseMove,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,20,98,115,12
    CONTROL         "BOCloseOnKeyDown",IDC_BOCloseOnKeyDown,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,20,110,115,12
    CONTROL         "BOCloseOnAppDeactivate",IDC_BOCloseOnAppDeactivate,
                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,20,122,115,12
    CONTROL         "BOShowCloseButton",IDC_BOShowCloseButton,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,175,20,115,12
    CONTROL         "BOShowInnerShadow",IDC_BOShowInnerShadow,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,175,32,115,12
    CONTROL         "BOShowTopMost",IDC_BOShowTopMost,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,175,44,115,12
    CONTROL         "BODisableFadeIn",IDC_BODisableFadeIn,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,175,59,115,12
    CONTROL         "BODisableFadeOut",IDC_BODisableFadeOut,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,175,71,115,12
    CONTROL         "BODefault",IDC_BODefault,"Button",BS_AUTOCHECKBOX | 
                    WS_TABSTOP,175,122,115,12
    LTEXT           "&Title:",IDC_STATIC,7,146,60,11
    EDITTEXT        IDC_Title,7,158,160,25,ES_MULTILINE | ES_AUTOVSCROLL | 
                    ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL
    LTEXT           "&Content:",IDC_STATIC,182,146,60,11
    EDITTEXT        IDC_Content,182,158,160,25,ES_MULTILINE | ES_AUTOVSCROLL | 
                    ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL
    LTEXT           "Timeout in milliseconds:",IDC_STATIC,7,191,78,11,
                    SS_CENTERIMAGE
    EDITTEXT        IDC_Timeout,89,189,45,13,ES_RIGHT | ES_AUTOHSCROLL | 
                    ES_NUMBER
    CONTROL         "Use ""Bob"" as the balloon's Icon",IDC_UseBitmap,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,175,190,167,12
    CTEXT           "Press left button here...",IDC_LButtonDown,7,224,95,11,
                    SS_NOTIFY | SS_CENTERIMAGE,WS_EX_STATICEDGE
    CTEXT           "Press mid button here...",IDC_MButtonDown,127,224,95,11,
                    SS_NOTIFY | SS_CENTERIMAGE,WS_EX_STATICEDGE
    CTEXT           "Press right button here...",IDC_RButtonDown,247,224,95,
                    11,SS_NOTIFY | SS_CENTERIMAGE,WS_EX_STATICEDGE
    CONTROL         "",IDC_STATIC,"Static",SS_ETCHEDHORZ,7,241,335,1
    CONTROL         "Use ""follow me"" feature",IDC_FollowMe,"Button",
                    BS_AUTOCHECKBOX | WS_TABSTOP,175,206,167,12
END


/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//

#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE 
BEGIN
    IDD_MAINDLG, DIALOG
    BEGIN
        LEFTMARGIN, 7
        RIGHTMARGIN, 342
        VERTGUIDE, 20
        VERTGUIDE, 175
        TOPMARGIN, 7
        BOTTOMMARGIN, 262
    END
END
#endif    // APSTUDIO_INVOKED


#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//

VS_VERSION_INFO VERSIONINFO
 FILEVERSION 1,0,0,1
 PRODUCTVERSION 1,0,0,1
 FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS 0x4L
 FILETYPE 0x2L
 FILESUBTYPE 0x0L
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "Comments", "a\0"
            VALUE "CompanyName", "\0"
            VALUE "FileDescription", "CBalloonHelp Test Module\0"
            VALUE "FileVersion", "1, 0, 0, 1\0"
            VALUE "InternalName", "TEST1\0"
            VALUE "LegalCopyright", "Copyright 2002\0"
            VALUE "LegalTrademarks", "\0"
            VALUE "OriginalFilename", "BalloonTest.exe\0"
            VALUE "PrivateBuild", "\0"
            VALUE "ProductName", "BalloonTest Module\0"
            VALUE "ProductVersion", "1, 0, 0, 1\0"
            VALUE "SpecialBuild", "\0"
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END

#endif    // !_MAC

#endif    // Englisch (USA) resources
/////////////////////////////////////////////////////////////////////////////



#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "res\\BalloonTest.exe.manifest"

/////////////////////////////////////////////////////////////////////////////
#endif    // not APSTUDIO_INVOKED

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Shog9
Software Developer
United States United States
Poke...

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.1411022.1 | Last Updated 8 Aug 2002
Article Copyright 2001 by Shog9
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid