 |
|
| Computers Forum Index » Computer Languages (TCL) » how to use cursor defined in a .dll? |
|
Page 1 of 1 |
|
| Author |
Message |
| Dave Bodenstab |
Posted: Fri Feb 24, 2006 10:44 am |
|
|
|
Guest
|
I got the idea that it might be easier to have one .dll
containing my custom cursors and the app's icon rather
than having the whole collection of .cur and .ico files.
So, could this be done? (I'm using the -no-cygwin option
of gcc -- so I guess it's mingw or msys? -- under cygwin). I've
been able to recompile and link tclmagick's dll's and it
works, so I think I've got the gcc part down right.
If the answer's on google, it's drowned in the noise. I
tried looking for "cursor in resource file for tcl". The
wiki search didn't seem to like a two-word search, I tried
"cursor dll*"
I then looked at tk_base.rc and tkWinCursor.c and cobbled
together a test. Since I don't know what I'm doing, I'm
not surprised it didn't work. It fails at a
LoadCursor(Tk_GetHINSTANCE(), string)
where string is the name I put in the .rc file. If anyone
cares to take the time to look, I've tar'ed up my
test at http://www.bodenstab.org/files/cursor.tgz
I had to compile against the internal Tk headers, so I'm
not really pleased with this approach.
So, is it possible to define custom cursors/icons in
a loaded .dll and *use* them from a wish script? ...probably
with some C glue also in the .dll as a package perhaps.
If so, would there be an example somewhere?
Thanks.
PS. Another approach comes to mind: link the .rc file and
glue into a .exe and then just Tcl_Eval("source myscript.tcl").
Then the question becomes "how does one use custom cursors/icons
from a .rc file in a compiled wish application?" |
|
|
| Back to top |
|
|
|
|
|
All times are GMT
The time now is Wed Dec 02, 2009 3:56 am
|
|