in reply to Modifying Standard Tk Cursors?

Yes, and in that same Chapter 23 of Mastering Perl/Tk, they offer the following code snippet,

my $cursor = $^0 eq 'MSWin32' ? 'mouse' : [qw/@mouse.xbm mouse.mask brown white/];

along with the comment, "What it's telling us is that, unfortunately, home-brewed cursors are not supported on Win32 machines [emphasis mine]; we use a built-in cursor named mouse instead."

Hence, the point of my question. If I can't create my own cursor under Windows, how can I modify one of the built-in ones? (The file "cursorfont.h", BTW, is just a header file, associating cursor names with numbers.)

Replies are listed 'Best First'.
Re^2: Modifying Standard Tk Cursors?
by Albannach (Monsignor) on Oct 08, 2004 at 00:39 UTC
    If you really want to, you might be able to get a Windows resource editor to hack at the cursors themselves, stored in tk.dll (here it is in c:\perl\site\lib\auto\tk\tk.dll). Another option would be to recompile Tk yourself, but that is too much work for me. Of course neither of these options is very portable, but I too did a bit of looking (because it doesn't seem like it should be this hard) and there doesn't appear to be a way to do what you want on the fly under Windows.

    One other possibility would be to see how Win32::API or perhaps one of the Win32 GUI toolkits might let you do this. Please do let us know if you get a decent solution!

    --
    I'd like to be able to assign to an luser