John Carson
This is a small matter but it drives me crazy. I have my computer set up so that the mouse cursor automatically moves to the default button in any dialog (this option can be set in the Control Panel mouse applet on most Windows versions --- and on all Windows versions if a sufficiently recent version of Microsoft's Intellipoint software has been installed). This works with almost every program but not with SmartFTP.
With a little investigation, the source of the problem is clear. SmartFTP associates multiple buttons with a given dialog template but only shows a subset of them depending on what the dialog is meant to do. This has led to the lack of any proper default button.
What seems to be happening is that the focus is set to a particular button with SetFocus. To get the mouse to work properly, however, you need to send the DM_SETDEFID message to the dialog instead.
With a little investigation, the source of the problem is clear. SmartFTP associates multiple buttons with a given dialog template but only shows a subset of them depending on what the dialog is meant to do. This has led to the lack of any proper default button.
What seems to be happening is that the focus is set to a particular button with SetFocus. To get the mouse to work properly, however, you need to send the DM_SETDEFID message to the dialog instead.