Author |
Topic: New features for utility authors (Read 1679 times) |
|
Malcolm
Guest
|
 |
Re: New features for utility authors
« Reply #6 on: Mar 28th, 2011, 2:27pm » |
|
Thanks for the comments.
Quote:| I'm a little surprised if it changes the mouse cursor - nothing in the Microsoft docs suggests that it will. |
|
As was I, and I would be delighted if you prove me wrong on this point.
Malcolm.
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: New features for utility authors
« Reply #7 on: Mar 28th, 2011, 4:42pm » |
|
on Mar 28th, 2011, 2:27pm, Guest-Malcolm wrote:| I would be delighted if you prove me wrong on this point. |
|
If you perform this sequence:
Change cursor to IDC_WAIT (EMU_CURSOR message) Disable redraw (WM_SETREDRAW, 0) Enable redraw (WM_SETREDRAW, 1) the cursor is still the 'hourglass'. From that I conclude that WM_SETREDRAW isn't changing the cursor shape, but it is preventing the cursor being redrawn when it enters the window.
The practical consequence is likely to be the same (you can't display the hourglass cursor if redrawing is disabled) so you may argue the distinction is academic, but at least it isn't working contrary to the documentation.
Has my suggestion of inserting multiple lines in one 'chunk' made it unnecessary to disable redrawing, and therefore unnecessary to display the hourglass?
Richard.
|
|
Logged
|
|
|
|
Malcolm
Guest
|
 |
Re: New features for utility authors
« Reply #8 on: Mar 28th, 2011, 9:17pm » |
|
Quote:| Has my suggestion of inserting multiple lines in one 'chunk' made it unnecessary to disable redrawing, and therefore unnecessary to display the hourglass? |
|
It is quite possible that it may but I am not sure yet. To retrieve a multi-lined block the clipboard is the only way I could see to do it, or is there another way? I was getting a line at a time and so inserting only a line at a time or some blank lines for formatting.
Malcolm.
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: New features for utility authors
« Reply #9 on: Mar 28th, 2011, 10:26pm » |
|
on Mar 28th, 2011, 9:17pm, Guest-Malcolm wrote:| To retrieve a multi-lined block the clipboard is the only way I could see to do it, or is there another way? |
|
Why would you want to retrieve a multi-lined block? Reading lines (using EM_GETLINE) doesn't result in scrolling or any other display disturbance, so there shouldn't be any issue with doing that one line at a time.
Quote:I was getting a line at a time and so inserting only a line at a time or some blank lines for formatting. |
|
Obviously I don't know what your code is doing, but I can't see why reading lines one-at-a-time should imply also inserting them individually.
The Windows Constants utility is a good example to follow. The entire program is read one line at a time, but the constant declarations are inserted in one block using WM_PASTE.
Richard.
|
|
Logged
|
|
|
|
|