473,387 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Rich Edit in Windows: why can't I change cursors?

18
I am trying to switch over to an arrow cursor when the user mouses over the client area of a Rich Edit control. I've tried two things:

#1) capture WM_SETCURSOR:

case WM_SETCURSOR:

// when mouse over the client area of the rich-edit subwindow,
// set the cursor to an arrow .. this is so the Navigator has a
// "pointer" style cursor

if (wParam == (UINT)hListingOut) {
SetCursor (LoadCursor(NULL, IDC_ARROW));
return TRUE; // no further processing
}
break;

This seems to switch the cursor momentarily, but something is switching it back to the standard "edit" style cursor.

#2) change the cursor in the window class:

SetClassLong (hListingOut, GCL_HCURSOR,
(LONG)LoadCursor (NULL, IDC_ARROW));

This doesn't seem to do anything for me.

The window is created as:

hListingOut = CreateWindowEx (
WS_EX_CLIENTEDGE | WS_EX_STATICEDGE ,
"RichEdit", NULL,
WS_CHILD | WS_CLIPCHILDREN | WS_VISIBLE |
ES_WANTRETURN | WS_VSCROLL | WS_HSCROLL |
ES_MULTILINE | ES_LEFT | ES_AUTOHSCROLL | ES_SAVESEL |
ES_READONLY ,
0, 0, 1, 1, hwnd, (HMENU) IDD_LIST,
hInst, NULL);


Anyone got any ideas on how to change the mouse cursor for a rich edit window declared within a dialog (and keep it changed) ?

Thanks,
Aug 26 '10 #1
0 1106

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: John Doe | last post by:
et al, I've tried to find out on the 'net how to do this but can't seem to find it anywhere. How can I changed the cursors that show up in a windows application to be specific cursors that I...
2
by: Hendrik | last post by:
Hi I have searched extensively for help on inserting text at the position of the mouse pointer in a text box as the final step of drag and drop process What I have come with is listed below - the...
0
by: David Killian Woods | last post by:
There are a couple of features I'd like for my scrollbars, but I'm not sure the best way to go about them. First, I'd like to build in a little padding at the bottom of my window. The idea is...
0
by: Adam Clauss | last post by:
I have a hander for OnEnChange in my view. In it, I parse the line where the cursor is and set the color for certain portions of the text. To set the color, I set the selection to the portion I...
2
by: InNeedOfHelp | last post by:
Hey, I'm trying to change the cursor in my application when a certain toolbar option is selected. I am using the following code which compiles and runs but does not change the cursor! I don't...
0
by: AcidBurn | last post by:
Hi Im currently doing an application in .net using vb and I find the change password control very interesting so I decided to use it. The problem is...I always get an error of "Password...
2
by: tristanlbailey | last post by:
I been scouring the Internet for an answer to my problem, and a couple of times thought I had almost found the answer, but still to no avail. I'm tying to use the Rich Edit class (riched20.dll),...
2
by: zhang | last post by:
I create a project (base dialog) just use the mouse ,It can work if I do not add " Rich Edit 2.0 Control". and the dialog diappeard after I add it. why???I can not use "Rich Edit 2.0 Control"...
4
by: San07 | last post by:
Hi All, I don't know whether this is the right place to post my query. Query: This is in VC++. I have created a blank Dialog-based project with VC++ 6.0. When I run, I am able to see the Dialog....
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.