Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 6

Blanking out text in a Control

Installscript project.

I've added a third text box in the SdFinish dialog which adds additional information that I want. Works great.

But when I go to uninstall, that third text box appears. I do not want it there for the uninstall.

I understand that szMsg1 and szMsg2 are controllable from within the OnFirstUIAfter and OnMainUIAfter routines but how do I blank out the third box in the OnMainUIAfter?
Labels (1)
0 Kudos
(4) Replies
Level 8

Have you tried something like this???

function My_ControlVisible(hDlg, nControlID, bState)
number hCtrl;
hCtrl = GetDlgItem(hDlg, nControlID);
if bState then
ShowWindow(hCtrl, SW_SHOW);
ShowWindow(hCtrl, SW_HIDE);

Here is how to use it...

HWND hDlg;
NUMBER ctrl_IDNumber;
ctrl_IDNumber = 1201; // THis is the control ID of the object on the form.
szDlg = "MyDialogName"
hDlg = CmdGetHwndDlg(szDlg);
My_ControlVisible(hDlg, ctrl_IDNumber, TRUE );
0 Kudos
Level 6

So is the dialog name I'm after called "SdFinish"?

I tried a quick test on the SdWelcome dialog and when I tried it to get the handle I got a -1 return to the call. (both before the appearance and while it was displayed).

How does one get the handle before it appears? If you can't, then won't there be a blip on the screen while you SW_HIDE the text box you want to hide?
0 Kudos
Level 8

I used this function in my custom dialogs that I made from scratch. I have code that creates the dialog and in doing that, I can get the dialog handle.

So I guess we should start as to how you added this text box to the SdFinish dialog?
0 Kudos
Level 6

I just added a text box to the SdFinish dialog (DialogId_12032) and
called it ControlId_712 (Text).
In my project if you look at the String table it appears as

I want it to appear when I do a regular install, which it does.

What I want to do is prevent it from showing up when the SdFinish dialog is called from a Remove or Uninstall.

0 Kudos