A full screen window

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
jcvignoud
Knows some wx things
Knows some wx things
Posts: 28
Joined: Wed Apr 20, 2005 4:50 pm

A full screen window

Post by jcvignoud » Thu May 19, 2005 3:54 pm

Hi everyone,

I use DialogBlocks to generate my frames (I genarate the xrc file). I want a full screen frame so I select the flag wxMAXIMIZE for my dialogblocks frame but when my soft is running and when I try to open that window I have an error message : unknown flag style wxMAXIMIZE !!!!

So how must I do to have my full screen window ?

Regards

JC

Tyler
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 246
Joined: Fri Sep 03, 2004 12:37 am
Contact:

Post by Tyler » Fri May 20, 2005 5:30 am

Do you get this same error if you create the frame by hand?

wimvanherp
Knows some wx things
Knows some wx things
Posts: 34
Joined: Fri Nov 19, 2004 10:16 am
Location: Belgium

Post by wimvanherp » Fri May 20, 2005 7:23 am

with this function, you can get a fullscreen

bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL)

Depending on the value of show parameter the window is either shown full screen or restored to its normal state. style is a bit list containing some or all of the following values, which indicate what elements of the window to hide in full-screen mode:


wxFULLSCREEN_NOMENUBAR
wxFULLSCREEN_NOTOOLBAR
wxFULLSCREEN_NOSTATUSBAR
wxFULLSCREEN_NOBORDER
wxFULLSCREEN_NOCAPTION
wxFULLSCREEN_ALL (all of the above)

jcvignoud
Knows some wx things
Knows some wx things
Posts: 28
Joined: Wed Apr 20, 2005 4:50 pm

Post by jcvignoud » Fri May 20, 2005 9:47 am

Thank you for your help, the fonction ShowFullScreen() is exactly what I'm looking for.

I just have a new problem.

Now when my full-screen frame appear, the low of that is hide by Windows task bar. How must I do to adjust my frame to the right size or which flag I must use to specify than my frame is in front of the window's task bar?

Regards,

JC

Aardbei
Earned a small fee
Earned a small fee
Posts: 23
Joined: Thu Mar 31, 2005 9:01 am

Post by Aardbei » Fri May 20, 2005 10:28 am

Not sure, but I think this will do:

Code: Select all

long styleflag = GetWindowStyle();
SetWindowStyle(styleflag | wxSTAY_ON_TOP);
(seems to be Windows-only, according to the docs)

jcvignoud
Knows some wx things
Knows some wx things
Posts: 28
Joined: Wed Apr 20, 2005 4:50 pm

Post by jcvignoud » Tue May 24, 2005 7:54 am

Thank you for your help wimvanherp and Aardbei,

it works perfectly, :D

Regards,

JC

Post Reply