in reply to Re^2: How to change the default (ok) button in Win32::GUI
in thread How to change the default (ok) button in Win32::GUI

I did a little testing, and Enter did nothing when it was a Win32::GUI::Window, but it pressed button 1 when it was a Win32::GUI::DialogBox.

I also could not change the default button. I suspect it cannot be changed once the window is created.

That doesn't mean it's hopeless. What you can do is capture Enter and give it the behaviour you want. In fact, I think CDialog in MFC does just that. You could check the MFC sources for CDialog If you have access to VC++.

  • Comment on Re^3: How to change the default (ok) button in Win32::GUI

Replies are listed 'Best First'.
Re^4: How to change the default (ok) button in Win32::GUI
by ChrisR (Hermit) on Apr 21, 2005 at 02:13 UTC
    I had thought of using Win32::GUI::AcceleratorTable but was hoping there was a more direct way. Using AcceleratorTable will require a bit more coding but I'm pretty sure it will work even if it wasn't my first choice for a solution.