How to disable system menu for windows application

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
Frank111
Earned a small fee
Earned a small fee
Posts: 12
Joined: Thu Dec 11, 2014 3:14 am

How to disable system menu for windows application

Post by Frank111 »

Hi guys,

I'm using a wxframe to create a windows application, is there anyone know how to disable the window system menu? I have tried to remove the system menu flag from window style setting, but when pressing "alt+space", the system menu is still popped up.

[img]system%20menu.png[/img]
Attachments
system menu.png
system menu.png (40.72 KiB) Viewed 1922 times
User avatar
doublemax
Moderator
Moderator
Posts: 19160
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: How to disable system menu for windows application

Post by doublemax »

There is no wxWidgets way for that.

I found this article that describes how to add items to the system menu:
http://www.codeguru.com/csharp/csharp/c ... sing-C.htm

Maybe you can use DeleteMenu to also remove entries from the menu:
https://msdn.microsoft.com/en-us/librar ... 85%28.aspx

Untested, give it a try.
Use the source, Luke!
Nunki
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 235
Joined: Fri Sep 14, 2012 8:26 am
Location: Kontich, Belgium
Contact:

Re: How to disable system menu for windows application

Post by Nunki »

Remove the wxSYSTEM_MENU flag from the style option of your application's frame while creating or from the resource file if you're using XRC files.

regards,
Nunki
Frank111
Earned a small fee
Earned a small fee
Posts: 12
Joined: Thu Dec 11, 2014 3:14 am

Re: How to disable system menu for windows application

Post by Frank111 »

Nunki wrote:Remove the wxSYSTEM_MENU flag from the style option of your application's frame while creating or from the resource file if you're using XRC files.

regards,
Nunki
I had tried this, but it's still popped up.
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7479
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: How to disable system menu for windows application

Post by ONEEYEMAN »

Hi,
You probably need to get rid of the title bar or try to catch "ALT+F4" in the wxEVT_CHAR_HOOK.

Thank you.
Post Reply