如何以编程方式删除关闭按钮(右上角的"X"按钮)? [英] How to Remove close Button (Right top corner 'X' button) programmatically?

查看:91
本文介绍了如何以编程方式删除关闭按钮(右上角的"X"按钮)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我知道如何禁用或删除系统菜单以及如何禁用
关闭(``X'')按钮.

但是如何删除关闭按钮或将关闭按钮的可见性设置为FALSE?

关闭按钮是否分配了ID?

如何通过编程做到这一点?

谢谢

Hello,

I know how to disable or remove the system menu and how to disable the
close(''X'') button.

But how to remove or setting visibility of close button to FALSE?

Is there any ID assigned to the close button?

How I can do it through programming?

Thanks

推荐答案

在OninitDialog中编写以下内容

ModifyStyle(WS_SYSMENU,0,0);
write following in OninitDialog

ModifyStyle(WS_SYSMENU,0,0);


我过去曾遇到过这种情况,并且有一种感觉,如果您从系统菜单中删除Close选项,则关闭按钮将变得残废.有关 DeleteMenu() [
I have encountered this in the past and have a feeling that if you delete the Close option from the system menu, then the close button will get disabled. See the MSDN entries for DeleteMenu()[^]


这篇关于如何以编程方式删除关闭按钮(右上角的"X"按钮)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆