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

Disable/hide controls on custom dialog


2 replies to this topic

Meurton

Meurton
  • Members
  • 1 posts

Posted 16 September 2002 - 10:49

I've created a custom dialog in a standard project. Now I want to disable and hide some of the controls on my dialog when certain conditions are met. How can I disable or hide controls (other than the NEXT and CANCEL buttons)??

For example: I want to disable a browse button when a checkbox is unchecked.



cmcintosh

cmcintosh
  • Members
  • 7 posts

Posted 11 December 2002 - 21:33

try this

          _WinSubEnableControl (hwndDlg, IDC_EDIT_SYSTEMNAME, FALSE);

volitan

volitan
  • Members
  • 1 posts

Posted 25 January 2003 - 00:46

Here's a link to a KB article on this subject that worked for me. KB article

Here's is some of my working code following that example.  This particular bit of code hides one of my text fields.

Code Sample

case DLG_INIT:

hwndDlg = CmdGetHwndDlg("CSDialog");
hCtrl = GetDlgItem(hwndDlg, 9000);
nResult = USER32.ShowWindow(hCtrl, SW_HIDE);