Cursor shape on overlapped child controls
Veeraraghavan -- veera@hiso.honeywell.soft.net Tuesday, May 07, 1996 Hello, Env: Win NT 3.51/VC++ 2.2 I have grid like layout in the view where there are windows derived from CEdit. My application requires, when the user clicks on a edit control to display a value list(which I am doing with combo box) displayed at left top corner of the view and the window for combo box spans some edit controls too. When the mouse is moved to combo box to select an item, the cursor changes to hair cursor instead of Arrow due to edit control beneath it. This causes lot of frustration for the end users. I tried changing the parent window to mainframe but I do not get messages from combo box which I am currently handling in view class. Am I missing something. Thanks in advance for the help. WM_THANKS|WM_REGARDS Veera Sr.Software Engineer ____________________________ | Veeraraghavan . S. | /)| veera@honeywell.soft.net |(\ / )| Ph :011-91-80-8520150 |( \ __( (|____________________________|) )__ ((( \ \ > /_) ( \ < / / ))) (\\\ \ \_/ / \ \_/ / ///) \ / \ / \ _/ \_ / / / \ \ / / \ \
R Kumar -- kumar@blr.cybercash.com Friday, May 10, 1996 [Mini-digest: 2 responses] At 11:07 AM 5/7/96 -0500, you wrote: >Hello, > > Env: Win NT 3.51/VC++ 2.2 > > I have grid like layout in the view where there are windows derived >from CEdit. My application requires, when the user clicks on a edit control >to display a value list(which I am doing with combo box) displayed at left >top corner of the view and the window for combo box spans some edit controls >too. When the mouse is moved to combo box to select an item, the cursor >changes to hair cursor instead of Arrow due to edit control beneath it. This >causes lot of frustration for the end users. > > I tried changing the parent window to mainframe but I do not get >messages from combo box which I am currently handling in view class. > > Am I missing something. Thanks in advance for the help. > >WM_THANKS|WM_REGARDS > >Veera >Sr.Software Engineer Just check for WM_NCHITTEST over the combo box. If it's over combo box eat the WM_SETCUROSR message. -----From: jhewett@ix.netcom.com (Jerry Hewett) > When the mouse is moved to combo box to select an item, the cursor changes > to hair cursor instead of Arrow due to edit control beneath it. This causes > lot of frustration for the end users. I'm new to the MFC and VCPP, so all I can offer is my best guess based on intercepting the WM_SETCURSOR message under Win3.x. I'd try overriding the CWnd::OnSetCursor class, include a test for your ComboBox ID, and change the cursor to an arrow if true. If nothing else, ::OnSetCursor should be the right method for the override; I don't have enough experience with the MFC to guarantee that CWnd is the right class, but at least it's somewhere to start from. Jerry (Apologies Ahead Of Time If I'm Completely Wrong About This!) H.
| Вернуться в корень Архива |