icons from resource files ?!

Status
Not open for further replies.

Michael Stark

Usenet Archive
Joined
Aug 3, 2000
Messages
50
Reaction score
0
Hello all !

I'd like to make an icon-frame which I define in a mdl-resource-file but take the icons from a (maybe fixed) resource file. Is this possible ? I could open the resource-file (plus the once from the application) but once they tell me that they could not find the icon with the id, or they could not find the dialog

in the .r-file i define a
DialogBoxRsc DIALOGID_DWDbrFrame
with inside a
DItem_IconCmdFrameXRsc ICONCMDFRAMEID_MyApp =
{
1, 3, NOHELP, MHELP, 0, TXT_CmdFrameTitle,
{
{IconCmd, 10001, ""},
{ToolBox, TOOLBOXID_MyCommands, "MYAPP"},
{IconCmd, 10002, ""},
}
};
......

in mdl i do:
mdlDialog_open (NULL, DIALOGID_DWDbrFrame) (or the same with the opened second resource-file)

any suggestions ?
Thanks Michael

PS: I'd like to let the icons be built by a user, with the icon editor, and call them only with the id or name (if possible)
 
Michael,

How are you reading the resource file?

If you make calls to mdlResource_queryClass(...) using RSC_QRY_COUNT and RSC_QRY_ID as arguments to queryID you should be able to get enough information to load the toolbox resources.

How did you plan to attach the tools to the frame? I don't see any functions that would make this easy. I haven't worked with toolboxes this way before.

Dan

On Wed, 28 Nov 2001 18:36:33 +0100, "Michael Stark"
wrote:

Hello all !

I'd like to make an icon-frame which I define in a mdl-resource-file but take the icons from a (maybe fixed) resource file. Is this possible ? I could open the resource-file (plus the once from the application) but once they tell me that they could not find the icon with the id, or they could not find the dialog

in the .r-file i define a
DialogBoxRsc DIALOGID_DWDbrFrame
with inside a
DItem_IconCmdFrameXRsc ICONCMDFRAMEID_MyApp =
...
 
Dan,

That's my problem to, I'd hoped somebody herein had done such thinks, but at least I'll do it in the same way all other seem to do it: declare the whole menu and icon-toolboxes in the main-app resource-file (all I questioned about, used that way - but this means that every change at any of the icons or menu-entries needs a recompilation of all) all other dialogs can be called from any resource-file, it's not nice but ...

Thanks Michael

PS: If someone from Bentley read this, think about a possibility to create ALL resources outside the source-code and give a function to call them.

"Dan MacNeil" <dan.42@shaw{dot}ca> schrieb im Newsbeitrag ...


How are you reading the resource file?

If you make calls to mdlResource_queryClass(...) using RSC_QRY_COUNT and

RSC_QRY_ID as arguments to queryID you should be able to get enough

information to load the toolbox resources.

How did you plan to attach the tools to the frame? I don't see any
functions

that would make this easy. I haven't worked with toolboxes this way
before.

 
Hi,

.rsc with icons do NOT need to be a part of your .ma.

You *can* have it separately.

Best!
/Chris Z.

"Michael Stark" wrote:
Dan,

That's my problem to, I'd hoped somebody herein had done such thinks, but at least I'll do it in the same way all other seem to do it: declare the whole menu and icon-toolboxes in the main-app resource-file (all I questioned about, used that way - but this means that every change at any of the icons or menu-entries needs a recompilation of all) all other dialogs can be called from any resource-file, it's not nice but ...

Thanks Michael

PS: If someone from Bentley read this, think about a possibility to create ...
 
Status
Not open for further replies.

Latest threads

Back
Top