Jump to content

Dialog - Show Logo


Recommended Posts

I am using the 'Dialogs - Modern' functions (CreateLayout, CreateRadioButton etc) to create a custom dialog in my script. It works great, but I'd like to add our logo to it.

 

I presume I need CreateImageControl, but I have no idea how to start making this happen. I distribute plugins to our users as .vsm files, would an image file have to be sent along with it?

 

Could someone just give a quick intro of what is required to do this, please?

Link to comment

CreateImageControl will work but only if you have your logo image loaded in as a drawing resource.  In which case, you would use vs.GetObject to get a handle to the Image resource to pass into vs.CreateImageControl.  You would accomplish this by shipping your plug-in with a VW file containing an image resource of your file.  When your command is run, it would determine if your logo image exists in the drawing and if it doesn't, it would use vs.BuildResourceListN and vs.ImportResourceToCurrentFile to import the image into the active file.  If you don't want to have to import your logo every time someone runs your command, you could instead use vs.CreateImageControl2, which can take in a file path to a VWR file.

 

The key in this case is to ship your plug-in with a VWR file.  VWR files are pretty easy to make once you know what it's looking for.  You basically setup a folder with all the resources you need and then zip it.  Then you change the file extension from .ZIP to .VWR.  More information can be found here:

 

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...