visual studio 2010 - How to implement a WM_LBUTTONCLICK event handler -
suppose have the copenglcontrol class derived cwnd , i'm customizing own purposes.
 want this:
 1- add zoom tool toolbar button @ top of dialog.
 2- after pressing toolbar button mentioned feature explained below gets enabled.
 3- if user clicks left mouse button zoomed in factor of 2 , gltranslate position of user's click.
 4-if user clicks right mouse button zoomed out factor of 0.5 , gltranslate position of user's click.
 5-if user clicks toolbar button feature explained in 2 above steps gets disabled.  
you know want implement zoom tool in global mapper.  
i don't have problems implementing glscale or gltranslate.
 have problems mfc part.
 searching default message handlers, found have wm_lbuttondblclk,wm_lbuttondown,wm_lbuttonup,wm_rbuttondblclk,wm_rbuttondown,wm_rbuttonup not wm_lbuttonclk or wm_rbuttonclk?  
even if had wm_lbuttonclk or wm_rbuttonclk, these event handlers enabled , active since creation of window until closing want them active @ time (after clicking zoom tool , before clicking tool)
 know here maybe need implement these features in user-defined message handlers don't have idea since i'm new mfc.
 me give true idea start from?  
try similar this:
void copenglcontrol::onlbuttondown(uint nflags, cpoint point) {     if (zoom_tool_has_been_clicked)     {         // zoom stuff here          return ;     }      cwnd::onlbuttondown(nflags, point); } just give idea.
Comments
Post a Comment