ritulranjan
Level 5

How to send custom messages to InstallShield custom dialog from an external DLL

Hi,

Is there a way to post custom messages to InstallShield custom dialog from an external DLL?

The external DLL function called during DLG_INIT is supposed to send custom messages to InstallShield custom dialog from separate thread.

regards,
RR.
Labels (1)
0 Kudos
2 Replies
ritulranjan
Level 5

Use PostMessage() / SendMessage() from external DLL:

BOOL PostMessage(
HWND hWnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam
);

LRESULT SendMessage(
HWND hWnd,
UINT Msg,
WPARAM wParam,
LPARAM lParam
);


hWnd = Handle of the InstallShield Dialog to send the message to [use: CmdGetHwndDlg ( szDialogName );]
Msg = WM_* message you want to send to the control [with EzDefineDialog() use WM_COMMAND; with DefineDialog() and DLG_MSG_ALL other messages can also be used]
wParam = Resource ID of the control to send message to [this can also be a 'custom' number which is being appropriately handled in WaitOnDialog()'s while-endwhile (message) loop]
lParam = Handle of the control you want to send the message to [use: HWND GetDlgItem(HWND hDlg, int nIDDlgItem); to get the handle of the control]

regards,
RR.
0 Kudos
sachin_a_pawar
Level 4

Hi,

Can you please upload sample code for the same ? because I tried to use the steps but I am not able to get message from the external dll.

Thanks
Sachin Pawar
0 Kudos