![]() |
Handle event on Statusbar ??? |
Post Reply
|
| Author | |
compvis
Groupie
Joined: 07 March 2008 Location: Vietnam Status: Offline Points: 36 |
Post Options
Thanks(0)
Quote Reply
Topic: Handle event on Statusbar ???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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 November 2008 at 2:40am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 November 2008 at 4:20am |
|
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
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 November 2008 at 8:13am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 13 November 2008 at 10:45pm |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 November 2008 at 12:32am |
|
Oleg, help me ???
|
|
|
I love ToolkitPro, Suite Pro ! Thanks Codejock !
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 November 2008 at 9:05am |
|
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 |
Post Options
Thanks(0)
Quote Reply
Posted: 17 November 2008 at 9:40pm |
|
thanks, oleg
i changed but nothing better, the same error occurs...
pls help !
|
|
|
I love ToolkitPro, Suite Pro ! Thanks Codejock !
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 November 2008 at 3:54am |
|
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 |