![]() |
Handle event on Statusbar ??? |
Post Reply ![]() |
Author | |
compvis ![]() Groupie ![]() ![]() Joined: 07 March 2008 Location: Vietnam Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() Posted: 12 November 2008 at 9:45pm |
Hi,
I have a status bar with some panes ? How can i handle event when i click left-mouse on a pane of statusbar ? (with pane is a button one state)
thanks
|
|
I love ToolkitPro, Suite Pro ! Thanks Codejock !
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Add ON_COMMAND in message map for StatusBar Pane's Id.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
compvis ![]() Groupie ![]() ![]() Joined: 07 March 2008 Location: Vietnam Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
thank, Oleg
I have tried but no luck
my doing:
...
pane10.SetButton(TRUE);
....
afx_msg void OnClickPane10();
.....
ON_COMMAND(ID_PANE_10,OnClick10)
.....
then i have some exceptions...
|
|
I love ToolkitPro, Suite Pro ! Thanks Codejock !
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Show all code around pane10.SetButton(TRUE);
What "some exceptions" ?
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
compvis ![]() Groupie ![]() ![]() Joined: 07 March 2008 Location: Vietnam Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
hi, this is my codes:
if (!m_wndStatusBar.Create(this) ||!m_wndStatusBar.SetIndicators(indicators, sizeof(indicators)/sizeof(UINT))){ TRACE0( "Failed to create status bar\n"); return -1; // fail to create} m_wndStatusBar.SetPaneInfo(0, ID_INDICATOR_INFO, SBPS_STRETCH, 0); //m_wndStatusBar.SetPaneInfo(1, ID_INDICATOR_OVEN1, SBPS_NORMAL, 100);m_wndStatusBar.SetPaneText(0,_T( "Khởi tạo chương trình thành công !")); //Tạo item logo trên Status barCXTPStatusBarPane* pane = m_wndStatusBar.AddIndicator(ID_INDICATOR_LOGO, 0); pane->SetText(_T( "(C) thanhly's 2008"));pane->SetStyle(pane->GetStyle() | SBPS_POPOUT); CXTPPaintManager::CNonClientMetrics ncm; ncm.lfMenuFont.lfWeight = FW_HEAVY; pane->SetTextFont(&ncm.lfMenuFont); pane->SetTextColor(GetXtremeColor(COLOR_3DHIGHLIGHT)); //COLOR_3DSHADOWpane->SetWidth(0); // Best Fitpane->SetButton(TRUE); m_wndStatusBar.SetRibbonDividerIndex(2);
m_wndStatusBar.SetPaneStyle(0, m_wndStatusBar.GetPaneStyle(0) | SBPS_NOBORDERS); and: afx_msg void OnTime();and:
ON_COMMAND(ID_INDICATOR_TIME,OnTime) and:
void Ce5ckDlg::OnTime(){ //Do something here }
Debug app, one exception occurs and mouse jumps to line 2160 in wincore.cpp file like below: case AfxSig_v_u_p:{ CPoint point(lParam); ( this->*mmf.pfn_v_u_p)(static_cast<UINT>(wParam), point);} break; //-->>this is the mouse points
thanks, |
|
I love ToolkitPro, Suite Pro ! Thanks Codejock !
|
|
![]() |
|
compvis ![]() Groupie ![]() ![]() Joined: 07 March 2008 Location: Vietnam Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
Oleg, help me ???
|
|
I love ToolkitPro, Suite Pro ! Thanks Codejock !
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi, You call SetButton for ID_INDICATOR_LOGO - not for ID_INDICATOR_TIME. and AfxSig_v_u_p called not for WM_COMMAND - for another handler of your message map.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
compvis ![]() Groupie ![]() ![]() Joined: 07 March 2008 Location: Vietnam Status: Offline Points: 36 |
![]() ![]() ![]() ![]() ![]() |
thanks, oleg
i changed but nothing better, the same error occurs...
pls help !
|
|
I love ToolkitPro, Suite Pro ! Thanks Codejock !
|
|
![]() |
|
Oleg ![]() Admin Group ![]() Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
![]() ![]() ![]() ![]() ![]() |
Hi,
Problem not in this code. Somewhere else. remove some parts from project and send it to support@codejock.com.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |