I was getting a strange flickering in my cursor, so followed the example in here:
http://www.planetsquires.com/protect/forum/index.php?topic=1789.msg14882#msg14882
But the mouse cursor flickers even in an empty newly created dialog. I am
guessing firefly does something under the water?
How can i work around this?
BTW, I am using windows 7.
The cursor doesnt flicker if i use SetCapture in the target dialog...
If there is a better way than this, please do tell. :)
From Lance Edmonds at PB Forums:
QuoteThe problem is that the class cursor for the control/dialog is restored by Windows. The solution is to either create the control/dialog with a NULL cursor and change it with SetCursor(), or...
Use SetClassLong(...%GCL_HCURSOR...) once and windows will use that cursor until you change it again.
It's a good idea to restore the original cursor when your control/dialog is destroyed, and if necessary release the handle for the cursor. ie, always clean up after yourself.
Here are two posts asking about mouse flicker and his response to both:
http://www.powerbasic.com/support/pbforums/showthread.php?t=1950 (http://www.powerbasic.com/support/pbforums/showthread.php?t=1950)
http://www.powerbasic.com/support/pbforums/showthread.php?t=4833 (http://www.powerbasic.com/support/pbforums/showthread.php?t=4833)
It would seem that SetClassLong is what you are looking for, but I haven't tested it. I would have had you included the problem code.:)