Gopi Krishna Komanduri wrote:
> Hi,
>      I need some information . Actually , I have on edit box control . It can 
> have a sentence (I mean words with spaces) . If I double click in that edit 
> box I should select entire sentences . Even if I click continously in it it 
> should keep on selecting .
>    
>   I mean ..
>      I need to send EM_SETSEL with 0 , -1 as wparam and lapam for 
> WM_LBUTTONBDCLICK in that edit control.
>    
>   I tried with EN_CHANGE , but what I observed is EN_CHANGE will occur only 
> when it lost focus and gains again .
>     
>     I am unable to understand how to handle WM_LBUTTONDBCLICK for this 
> control . 
>    
>    
>    I hope  I am clear .
>    
>   GOpi.k

The Microsoft Standard for GUI design appears to be single-click moves 
the keyboard caret to the nearest location under the cursor and 
double-click selects something (e.g. nearest sentence).  An optional 
triple-click selects something more than double-click (e.g. paragraph). 
  The process then cycles between the various effects as you keep clicking.

I've never seen a quadruple-click, but, IMO, we probably need one in 
certain apps.

BTW, it is WM_LBUTTONDBLCLK not WM_LBUTTONDBCLICK.

Edit controls are hard to master.  EN_CHANGE is sent as the user is 
typing into the edit control but before any visual updates happen. 
Seems like the wrong notification to look at to me.  You are better off 
waiting for a WM_LBUTTONDBLCLK and then using EM_CHARFROMPOS to 
determine where the click is occurring within the control.  From there, 
you should be able to select the text you want.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to