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 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione

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,


Lascia un commento

Eseguire l'accesso per aggiungere un commento. Non siete membri? Iscriviti oggi