The "Hello World" Program

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
mybofy
Knows some wx things
Knows some wx things
Posts: 28
Joined: Fri Aug 07, 2015 2:09 pm

The "Hello World" Program

Post by mybofy » Mon Nov 11, 2019 10:55 am

Bonjour

macOS 10.14 - wxWidgets 3.1.2

The "Hello World" Program (https://docs.wxwidgets.org/3.1.2/overvi ... world.html) works well. But it is not conform the recommandation from Apple.

I am searching the same program specifically coded for macOS. All examples I find content a wxFrame, which is specific to Windows. In MacOS such a wxFrame is not needed : much applications launch with the menus of application in the menu bar and no one window need to be open.

Could someone give me an exemple of a very good well formed code to initiate an application macOS ? More precisely without a wxFrame, but with MacSetCommonMenuBar, and may be wxTopLevelWindowMac.

Merci

User avatar
doublemax
Moderator
Moderator
Posts: 14314
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: The "Hello World" Program

Post by doublemax » Tue Nov 12, 2019 6:26 am

much applications launch with the menus of application in the menu bar and no one window need to be open
I don't work under OSX, but AFAIK the menu bar of a frame is moved to the menu bar on the screen under OSX. And you need a place to handle the events, so i think you need a frame. What if you just set the frame size to 0,0? Doesn't that give the result you're looking for?
Use the source, Luke!

ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 3607
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: The "Hello World" Program

Post by ONEEYEMAN » Tue Nov 12, 2019 3:21 pm

Hi,
mybofy wrote:
Mon Nov 11, 2019 10:55 am
Bonjour

macOS 10.14 - wxWidgets 3.1.2

The "Hello World" Program (https://docs.wxwidgets.org/3.1.2/overvi ... world.html) works well. But it is not conform the recommandation from Apple.

I am searching the same program specifically coded for macOS. All examples I find content a wxFrame, which is specific to Windows. In MacOS such a wxFrame is not needed : much applications launch with the menus of application in the menu bar and no one window need to be open.
I don't think Apple UI guidelines tells this - any Mac application upon launch will have a window.
Can you give an example of such application where window will not show upon launch?
Thank you.

Post Reply