Systemmenu in Dialog - Closing Window Button

Systemmenu in Dialog - Closing Window Button

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,



3 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

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.


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,


Laisser un commentaire

Veuillez ouvrir une session pour ajouter un commentaire. Pas encore membre ? Rejoignez-nous dès aujourd’hui