Software Archive
Read-only legacy content
17061 Discussions

Systemmenu in Dialog - Closing Window Button

faidor
Novice
722 Views
Hi, I have anotehr problem, and I hope, somebody can help me ;-). I built a dialog application for Windows under VF6.0. Now I included the "systemmenu", containing the minimize,maximize and clos-button at the right top of the dialog. Maximize is greyed (yes, done with intention), minimize works, but the problem is: the closing/exit button (the one with the "x") doesnt work at all. I tried to find something out, then I checked the examples shipped on the DF-Cd. But even in the dialog examples, the button is without any function.
How can I activate the button - or better, how can check for this button? Try for example the "Therm"-example. How could I integrate this systemmenu-closing-button.
thanks a lot in advance,

greetings,

Andre
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
722 Views
System menu "Close" button does not close the dialog by default. Instead, it generates a WM_COMMAND/IDCANCEL message. I think you have to have a button with IDCANCEL id. It may be hidden, but it has to be present. If it's not DFLOGM-based applicaton, but a pure API, you might try to trap WM_CLOSE in DialogProc.
0 Kudos
faidor
Novice
722 Views
Hi Jugoslav,

thanks for your answer. It is a dflogm-based application, and you were right, I had to include a hidden Button with the ID=IDCANCEL, and now it works. On the other hand thanks for your tip to modify the dflogm to include menus in the dialog-based-application. All works perfect now!!!!!

All the best,

Andre
0 Kudos
Reply