// A program based single document
// CMainFrame.CPP
IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
ON_WM_CREATE()
END_MESSAGE_MAP()
static UINT indicators[] =
{
ID_SEPARATOR, // status line indicator
ID_INDICATOR_CAPS,
ID_INDICATOR_NUM,
ID_INDICATOR_SCRL,
};
If I mask keyword 'static', there is no impact.
What is rationale about the keyword of 'static' be added here?
IIRC, static when applied to globals limits their scope only to the .cpp they're defined in, so if a different file tried to use indicators, it would fail.