Customized Dialogs

<< Click to Display Table of Contents >>

Navigation:  WinLicense > Protecting an application >

Customized Dialogs

 

CustomizedDialogs_01

 

The Customized Dialog window allows changing the messages that may be shown by SecureEngine® when certain situations occur.

 

 

Languages

 

You can add several languages to each specific message, so the message will be displayed in the user's system language. In order to add a new language for a specific message, just right click on the desired message and select Add Language.

 

The [DEFAULT] language is the one that will be displayed in case that the current system language does not match with any of the defined languages for the current message to display. For example, you edit the MSG_ID_DEBUGGER message and define the [DEFAULT] and [GERMAN] message. If the application is running in a PC with Windows language set to German, the message will be displayed in German (as you defined for [GERMAN]). If another customer is running your protected application on a PC with Windows language set to Spanish, the message will be displayed as defined in [DEFAULT]

 

 

Changing a custom message

 

To change a custom message, double-click on a specific message to start editing.

 

CustomizedDialogs_02

 

 

Changing the custom message icon

 

Each message is displayed by default as a Windows MessageBox. You can change the MessageBox icon for each message by selecting the specific message and right-click on it, after that use the option Set Message Icon.

 

CustomizedDialogs_03

 

 

Changing the general caption for all messages

 

All messages are shown with a general caption that can also be customized. The general caption message is the MSG_ID_GLOBAL_CAPTION. This caption message can be customized in the same way as the rest of the messages, by double clicking it.

 

 

Disabling a message from being displayed

 

The different customized dialogs can be treated as events. When a specific event occurs (like "a debugger found", "trial expired", etc), WinLicense displays the message for the specific event. If you don't want that WinLicense displays a message (do not handle the event) you can disable specific events (messages) from not being handled. For example, if you set the MSG_ID_TRIAL_DAYS_EXPIRED message as disabled, WinLicense will not handle the days expiration event, so the message will not be displayed and your application will keep running as "normal". You are responsible of taking care of that event in runtime (for example by calling WLTrialGetStatus) and check if the application is expired, so you can perform your desired actions from within your application.

 

We recommend that you carefully select which messages are going to be handled by you and make sure that you call the WinLicense SDK to check when that specific event occurs in your application to do the actions that you consider. For example, if you set the MSG_ID_LICENSE_STOLEN as disabled and from within your application you don't call the WinLicense SDK to know the registration status (WLRegGetStatus), your application will keep running with the stolen license.

 

The plugin system in SecureEngine can also be used to handle each specific event (message), so you perform your desired actions from your plugin DLL when a specific event occurs. Please, refer to the Plugins section for more information.

 

 

Importing and exporting your customized messages

 

WinLicense offers the possibility to export your customized messages to a single file so they can be imported in other project files without the need of retype all the messages again. To export all your messages to a file you just need to press the Export button and select the name of the file in which your messages will be saved. When you want to import your customized messages to the current project file, just press the Import button and select where the file with all your customized messages is located.

 

 

Variables in WinLicense messages

 

In all trial/registration messages you can insert the following variables that will be replaced with corresponding values:

 

Variable Name

Description

%daysleft

[Trial] Number of days left

%execleft

[Trial] Number of executions left

%totaldays

[Trial] Total days for current trial period

%totalexec

[Trial] Total executions for current trial period

%expdate

[Trial] Expiration date for current trial period. Displayed date format is "dd/mm/yyyy"

%us-expdate

[Trial] Expiration date for current trial period. Displayed in US format "yyyy/mm/dd"

%name

[Registered] Registered user's name for current license key

%company

[Registered] Registered user's company for current license key

%machineid

[Registered] Current Hardware ID for current machine

%regexpdate

[Registered] Expiration date for current trial period. Displayed date format is "dd/mm/yyyy"

%us-regexpdate

[Registered] Expiration date for current trial period. Displayed in US format "yyyy/mm/dd"

 

NOTE: All variables must be in lowercase.