Why the buttons for closing the window don work in the “new-style” dialog?
“Old-style” ones don’t have a handler. It’s no wonder that their behavior should be the same as in FAR 1.65 and earlier. “New-style” ones use a handler. You should handle the dialog closing yourself, except for: Ctrl-Break – always closes, Ctrl-Enter – closes if there exists at least one button with field DefaultButton=1, then a Close request with Param1 = current element number, Esc and F10 can be handled from the handler – should the dialog close or not. • Q: Should I close the dialog myself from now on? A: If you use a dialog handler – YES, you should: catch the DN_BTNCLICK event, check Param1 for match with required number and send the DM_CLOSE message to the dialog core. • Q: If I use the mouse, should I catch the DN_MOUSECLICK? A: It’s to your discretion 🙂 First, a mouse message comes (ignore it), then the DN_BTNCLICK comes right after it… • Q: Should I handle the DefaultButton myself as well? A: No, you don’t have to. For DefaultButton, the sequence is like that: [DN_MOUSECL