Systemmenu in Dialog - Closing Window Button

Systemmenu in Dialog - Closing Window Button

Ritratto di faidor

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

3 post / 0 new
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di Jugoslav Dujic

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.

Jugoslav www.xeffort.com
Ritratto di faidor

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

Accedere per lasciare un commento.