Print Page | Close Window

Handle event on Statusbar ???

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=12670
Printed Date: 21 November 2024 at 3:39pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Handle event on Statusbar ???
Posted By: compvis
Subject: Handle event on Statusbar ???
Date 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 !



Replies:
Posted By: Oleg
Date 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


Posted By: compvis
Date 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 !


Posted By: Oleg
Date Posted: 13 November 2008 at 8:13am
Hi,
 
Show all code around pane10.SetButton(TRUE);
 
What "some exceptions" ?


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: compvis
Date 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 bar

CXTPStatusBarPane* 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_3DSHADOW

pane->SetWidth(0); // Best Fit

pane->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 !


Posted By: compvis
Date Posted: 17 November 2008 at 12:32am
Oleg, help me ???

-------------
I love ToolkitPro, Suite Pro ! Thanks Codejock !


Posted By: Oleg
Date 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


Posted By: compvis
Date 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 !


Posted By: Oleg
Date Posted: 18 November 2008 at 3:54am
Hi,
Problem not in this code. Somewhere else. remove some parts from project and send it to mailto:support@codejock.com - support@codejock.com .


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net