1. setTextColor() Have Pointer Can it be a Red, Blue , ?? Any Help ??
- Posted by Selgor May 08, 2010
- 1472 views
Hi,
Just wondering if I can set the pointer to a colour ?
Tried setTextColor(Pointer,Red) .. subscript error setTextColor(PopWin,Red) .. nothing
Just trying to learn .
Cheers, Selgor.
include win32lib.ew without warning constant Pointer = createMousePointer( 5, 1, { " xx " , " x x " , " x x " , " x x " , " x x " , " x xxx " , " x x x " , " x x xxx " , " x x x x " , " xxx x x xxx " , " x x x x x x " , " x x x x x x " , " x x x x x x " , " x x " , " x x " , " x x " , " x x " , " x x " , " x x " , " x x " , " xxxxxxxxxxx " , " xxxxxxxxxxx " , " xxxxxxxxxxx " , " xxxxxxxxxxx " } ) constant PopWin=create(Window,"",0,700,0,155,200,{WS_POPUP,WS_BORDER,WS_VISIBLE}) setWindowBackColor(PopWin,#FFFFFF) setMousePointer( PopWin, Pointer ) procedure get_app(integer pntr, integer event, sequence parms) --- pntr replaced self if pntr = PopWin then setVisible(PopWin,0) end if end procedure setHandler({PopWin}, w32HClick, routine_id("get_app")) WinMain(PopWin, Normal)
2. Re: setTextColor() Have Pointer Can it be a Red, Blue , ?? Any Help ??
- Posted by dcole May 09, 2010
- 1462 views
Hello Selgor,
I'm no expert, but I don't think you can change the color of the mouse pointer.
I think you have to create a bimap amd move it around in tamdem with a hidden pointer.
Don Cole
3. Re: setTextColor() Have Pointer Can it be a Red, Blue , ?? Any Help ??
- Posted by Selgor May 10, 2010
- 1394 views
Hello Don,
Thank you for replying .
I have added the following code.
It displays bitmap .
But now I have a DIB error.
Can't "find" bitmap .
So I have to register bmp.
I don't know how to do that.
So, too hard basket ?
Thanks for your help.
Cheers Selgor
atom hBitmap sequence image image = { " xx " , " x x " , " x x " , " x x " , " x x " , " x xxx " , " x x x " , " x x xxx " , " x x x x " , " xxx x x xxx " , " x x x x x x " , " x x x x x x " , " x x x x x x " , " x x " , " x x " , " x x " , " x x " , " x x " , " x x " , " x x " , " xxxxxxxxxxx " , " xxxxxxxxxxx " , " xxxxxxxxxxx " , " xxxxxxxxxxx " } --) -- create the bitmap hBitmap = textToBitmap( image ) -- display the bitmap in TheWindow at {1,1} drawBitmap( PopWin, hBitmap, 41, 41 ) setBitmap(PopWin,{image,41,41})
4. Re: setTextColor() Have Pointer Can it be a Red, Blue , ?? Any Help ??
- Posted by petelomax May 10, 2010
- 1358 views
-- display the bitmap in TheWindow at {1,1} drawBitmap( PopWin, hBitmap, 41, 41 ) setBitmap(PopWin,{image,41,41})
try instead
procedure paint(integer self, integer event, sequence parms) -- display the bitmap in PopWin at {41,41} drawBitmap( PopWin, hBitmap, 41, 41 ) end procedure setHandler(PopWin, w32HPaint, routine_id("paint")) --setBitmap(PopWin,{image,41,41})
5. Re: setTextColor() Have Pointer Can it be a Red, Blue , ?? Any Help ??
- Posted by Selgor May 11, 2010
- 1380 views
Hello Pete,
Thank you for your reply.
Yes, it sure shows the bitmap.
No Errors.
re the code you used.... were you taught it, just knew, experience ??
I could find nothing like that.
So now I want to use the bitmap as pointer.
Is it possible.
I'll keep plodding !
Thanks again.
Cheers, Selgor
6. Re: setTextColor() Have Pointer Can it be a Red, Blue , ?? Any Help ??
- Posted by Selgor May 11, 2010
- 1405 views
Hi Don, Pete,
Thanks again to each of you.
I have further added the following code.
The result is a red strip.
So I must be closer to a coloured Pointer ??
Cheers,
Selgor
atom qBitmap sequence pixels ,pal pixels={ {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0},-- } {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0}, {0,0,0,0} } pal= { {255,0,0} , {0, 0, 255} } qBitmap = createDIB( {pal, pixels} ) procedure paint1(integer self, integer event, sequence parms) -- display the bitmap in PopWin at {81,81} drawBitmap( PopWin, qBitmap, 81, 81 ) end procedure setHandler(PopWin, w32HPaint, routine_id("paint1"))
7. Re: setTextColor() Have Pointer Can it be a Red, Blue , ?? Any Help ??
- Posted by petelomax May 11, 2010
- 1412 views
re the code you used.... were you taught it, just knew, experience ??
I could find nothing like that.
I've been around here a while. I visited the archive and downloaded as many tutorials and example programs as I could. I remember Wolfgang Fritz and Ad Rienks being a particular eye-opener for me, along with Dan Moyer's gateway, which is now bundled with win32lib.
So now I want to use the bitmap as pointer.
Is it possible.
Probably, but I left win32lib for arwen some time ago.
btw, I just spotted that it should be
if pntr=PopWin then -- setVisible(PopWin,0) closeWindow(PopWin) end if
otherwise the process remains active but invisible forever.
Regards, Pete