linquize
linquize

Reputation: 20366

CMFCStatusBar double click event

How to response to CMFCStatusBar double click event?

I have already called m_StatusBar.EnablePaneDoubleClick(TRUE);

Upvotes: 1

Views: 1334

Answers (1)

linquize
linquize

Reputation: 20366

see the example StatusBarDemo at http://archive.msdn.microsoft.com/vcsamplesmfc

BEGIN_MESSAGE_MAP(CStatusBarDemoView, CFormView)
    ON_COMMAND(ID_INDICATOR_LABEL, OnIndicatorLabel)
END_MESSAGE_MAP()

static UINT indicators[] =
{
    ID_INDICATOR_ICON,      // status icon
    ID_SEPARATOR,           // status line indicator
    ID_INDICATOR_PROGRESS,  // progress bar
    ID_INDICATOR_LABEL,     // text label
    ID_INDICATOR_ANIMATION, // animation pane
    ID_INDICATOR_CAPS,
    ID_INDICATOR_NUM,
    ID_INDICATOR_SCRL,
};

void CStatusBarDemoView::OnCreate()
{
    m_wndStatusBar.Create(this);
    m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT)))
}

void CStatusBarDemoView::OnIndicatorLabel()
{
    MessageBox(_T("Status bar pane double-click..."));
}

Upvotes: 2

Related Questions