Is there a guide to using Windows icons (e.g. MyIcon.ico) in MDL dialogs? I don't see anything in the MDL Programmer's Guide.
I found this PDF in the archives: Using Icons in MDL Dialogs.
What I'd like to do is to show a Windows icon in an Extended Push Button (DItem_PushButtonXRsc).
Where does MicroStation look to find icon resources? I have found references to four config. variables in various web publications. Three of those are defined in MicroStation's default workspace:
Is no. 4 a valid config. variable?
Unknown said: Is no. 4 a valid config. variable?
I've not seen it. I do use MS_ICONLIBRARYLIST, which is a list of .dll's that have embedded icons. It's not the easiest to get the icons inserted, though. I also have placed (imported) icons into a .dgnlib. Seems to me I then appended my .dgnlib with icons onto the MS_GUIDGNLIBLIST.
Bruce
Unknown said:I've not seen MS_ICONLIBRARYPATH
Thanks! I received confirmation from a Bentley staffer that it's a non-existent CfgVar.
Regards, Jon Summers LA Solutions
I would set up the button like this:
IconCmdSmallRsc ICONID_MyIconCmd =
{
16, 16, ICONFORMAT_WINDOWS, BLACK_INDEX, "", "MyIconHere"
};
DItem_PushButtonXRsc PUSHBUTTONID_MyExtendedButton =
NOT_DEFAULT_BUTTON | PBUTATTR_THINBORDER, NOHELP, MHELP, HOOKID_ButtonDialogItem, 0, NOCMD, LCMD,
Icon, ICONID_MyIconCmd, "", ""
I would then append my ICO file to either the MS_ICONPATH or MS_ICONLIBRARYLIST (like my old slide says)
HTH,
mark anderson [Bentley]
Visit me at https://communities.bentley.com/communities/other_communities/bentley_innovation/default.aspx
Thanks! That works OK. I've summarised the steps to use Windows icons.
Unknown said: 16, 16, ICONFORMAT_WINDOWS, BLACK_INDEX, "", "MyIconHere"
I don't know if it's mentioned anywhere, but the icon name "MyIconHere" is the same as the icon file name "MyIconHere.ico" without the extension.
Unknown said:NOT_DEFAULT_BUTTON | PBUTATTR_THINBORDER
I had not noticed the PBUTATTR_XXX options. I don't see any difference between PBUTATTR_THINBORDER and the default behaviour, at least for V8i on Windows 7. PBUTATTR_DYNAMICBORDER is more glamourous, and makes the button behave like Microsoft Windows toolbar buttons (2D when not selected, 3D when sensitized or pressed).
There's an option I haven't tried, PBUTATTR_DIALOGWIDTH, that presumably does what it says.