本文介绍了禁用MFC应用程序的esc键退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,专家,我在MFC中有一个使用单个对话框窗口的应用程序.

我面临的问题是,当我按退出键时,它就会退出.

i希望当我按下自己制作的退出"按钮并同时按下窗口右上角的"x"(对话框中提供的默认关闭按钮)按钮但不按下"esc"键时退出它.

请帮助我,当我不小心按下exit并关闭窗口时,这非常烦人.

如果可能,请告诉我添加方式,最小化按钮以及顶部的"x"(关闭)按钮.

请注意,
Swinder....

Hi experts,

I have an Application in MFC using single dialog window.

Problem i am facing is, it exits when i press escape key.

i want it to exit when i press "Exit" button that i made my self and also by pressing "x"(default close button provided in dialog) button on top right corner of window but not by "esc" key.

I tried emptying the implementation of "OnCancel" function. It solves the problem of "esc" key, but it also disables, exit when i press "x" button.

Please help me, it is very annoying when i accidentally press exit and window goes away.

If possible, tell me way to add, minimize button along with "x"(close) button on the top.

Regards,
Swinder....

推荐答案




这篇关于禁用MFC应用程序的esc键退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-11 21:43