简体   繁体   中英

How to disable the CAP NUM SCRL indicators in the status bar of a Windows C++ MFC app?

Default MDI application in MS Visual C++ 2010 shows CAP, NUM, SCRL indicators in the lower right corner. These are not applicable for my application so would like to disable them.

Thanks, Eric

In your CMainFrame class you have this:

// CMainFrame

IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)

BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
    ON_WM_CREATE()
END_MESSAGE_MAP()

static UINT indicators[] =
{
    ID_SEPARATOR,           // status line indicator
    ID_INDICATOR_CAPS,
    ID_INDICATOR_NUM,
    ID_INDICATOR_SCRL,
};

The indicators array is used somewhere later like this:

m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT));

Simply remove the ID_INDICATOR_CAPS , ID_INDICATOR_NUM and ID_INDICATOR_SCRL symbols at will.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM