Menu

grayed buttons

2002-08-31
2012-09-26
  • Nobody/Anonymous

    I need help.  How do I set a button in a dialog box as grayed? The buttons are created in a .rc file.
    I know it's something like SendMessage(whatever).
    I don't know what to put in the parynthesis.  Thanks for the help!

     
    • Nobody/Anonymous

      You can use BOOL EnableWindow(HWND,BOOL) ,where HWND is the handle to your control, BOOL is TRUE to enable, FALSE to disable (ie grayed) and the return value (BOOL) is the previous state.

      Or set the WS_DISABLED window style for the control in your resource script for the dialog and use EnableWindow as described above to re-enable it as required.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.