Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Display Destination Path in a non-editable field


5 replies to this topic

isgeek

isgeek
  • Members
  • 9 posts

Posted 17 April 2001 - 19:42

Does anybody know how to show destination path in a non-editable field using SdShowDestPath?  In the other words, how to make a field non-editable and disable the browse button?  Or do I need a custom dialog for it?

Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

Posted 18 April 2001 - 01:00

Hi,

You'll need a custom dialog to accomplish this. Copy the screen from _isres.dll to _isuser.dll, and  copy the code from the .rul-script containing the code for SdShowDestPath. Make your changes in the copied code.

Success, Ide


isgeek

isgeek
  • Members
  • 9 posts

Posted 19 April 2001 - 20:21

I am trying to disable the Browse... button, I've located the code for SdShowDeskPath, however there is no IS function setting the state of a push button.  Does that mean I have to implement the disable state from the resource file?  Can I do it from the script?

isgeek

isgeek
  • Members
  • 9 posts

Posted 19 April 2001 - 20:25

I am trying to disable the Browse... button, I've located the code for SdAskDestPath, however there is no IS function to set the state of a push button.  Does that mean I have to implement the disable state from the resource file?  Can I do it from the script?

Ide Nentjes

Ide Nentjes
  • Members
  • 222 posts

Posted 20 April 2001 - 09:36

Yes, you can do it from the script. Find the ID of the Browse button (i believe it's 196), and disable it using the following function.

prototype DialogFieldDisable( STRING, INT, INT);

function DialogFieldDisable( svDlg, iFieldId, iAction)
   HWND    hwndFieldName, hwndDlg;
   BOOL    bvEnableFieldName;
begin
   hwndDlg          = CmdGetHwndDlg( svDlg );
   hwndFieldName    = GetDlgItem( hwndDlg, iFieldId );

   bvEnableFieldName = ( iAction == ENABLE );
   EnableWindow( hwndFieldName, bvEnableFieldName  );
end;

Call like :
DialogFieldDisable(svDialog, ControlID, ENABLE);
or
DialogFieldDisable(svDialog, ControlID, DISABLE);

Ide