Board index » cppbuilder » Loading a custom Cursor from RC (not RES!)...

Loading a custom Cursor from RC (not RES!)...


2003-12-27 05:33:21 AM
cppbuilder109
How can a custom cursor be loaded from a RC file?
(I know how to load it from compiled RES). I cannot
find any way to load it using it's ID like bitmap's
LoadFromResourceID(). LoadCursor() requires some
string identifier which I do not know how to set in pure
RC file.
Vladimir.
 
 

Re:Loading a custom Cursor from RC (not RES!)...

Vladimir Stefanovic wrote:
Quote
How can a custom cursor be loaded from a RC file?
(I know how to load it from compiled RES).
You can't. It must be compiled to .res first. But adding the .rc file to
your project in BCB ought to call the resource compiler automatically,
AFAIK (at least in BCB6, I think).
--
Rudy Velthuis (TeamB)
"Imagine if every Thursday your shoes exploded if you tied them
the usual way. This happens to us all the time with computers,
and nobody thinks of complaining." -- Jeff Raskin
 

Re:Loading a custom Cursor from RC (not RES!)...

"Vladimir Stefanovic" < XXXX@XXXXX.COM >wrote in message
Quote
How can a custom cursor be loaded from a RC file?
The same way you do with a .RES file.
Quote
I know how to load it from compiled RES
Whether a resource is in a .RES or an .RC file, it still ends up in the
compiled executable's resources one way or the other. At runtime, the
executable won't know the difference, because there is no difference -
everything is stored to the same place.
Quote
I cannot find any way to load it using it's ID like bitmap's
LoadFromResourceID(). LoadCursor() requires some
string identifier which I do not know how to set in pure
RC file.
Look at the MAKEINTRESOURCE macro in the Win32 API, it will convert an
integer into the necessary string value.
Gambit
 

{smallsort}

Re:Loading a custom Cursor from RC (not RES!)...

Quote
Look at the MAKEINTRESOURCE macro in the Win32 API, it will convert an
integer into the necessary string value.
Thanks, I'll try...