One of our applications includes a lot of icon commands and associated CmdItemListRsc's. According to the documentation the CmdItemListRsc's should be added like this:
Unknown said: the first line gives me a compiler error saying: "error: not an integer constant"
I notice that theDialogBoxDemo example does not #include "command.h" generated from the command table, which would explain that message. The DialogBoxDemo example DItem_IconCmdRsc IDs are just a list of values, unconnected with the command table.
Does it work if you include the command header and use the command macro (CMD_XXX)?
I notice that the example includes tests like this:
#if defined (MSVERSION) && (MSVERSION >= 0x550)
MicroStation SE passed by many years ago. That test will always succeed for CONNECT and should be removed. An example that contains pointless code is not a good example.
Unknown said:The dlogdemo example uses an enum value instead of the command number
You can use an enum to define resource IDs such as dialog item numbers. That's long been possible and became available in V8. It saves a lot of typing (all those #defines) and helps to ensure that modifications to an enum list don't result in duplicate IDs.
Regards, Jon Summers LA Solutions
Is there a help document to reference for the cmditemlistrsc element? I do not understand the parts of it and would like to use the help docs as much as possible
Steven Watson said:Is there a help document to reference for the cmditemlistrsc element?
It's described in MicroStation API documentation. To check relevant header file (I guess it's dlogbox.r.h in this case) also helps.
Regards,
Jan
Bentley Accredited Developer: iTwin Platform - AssociateLabyrinth Technology | dev.notes() | cad.point
Got it! thank you