Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1020729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:12:11+00:00 2026-05-16T11:12:11+00:00

How to well use the WinAPI to manage the fullscreen mode on windows’s window

  • 0

How to well use the WinAPI to manage the fullscreen mode on windows’s window ?

Here is my problem :

I have an application which has to be fullscreen.
I use ChangeDisplaySettings() function (winuser.h) with the CDS_FULLSCREEN value to put my window to fullscreen mode when receiving a WM_ACTIVATE with (wParam == WA_ACTIVE || wParam == WA_CLICKACTIVE) :

DEVMODE dmScreenSettings;
memset (&dmScreenSettings, 0, sizeof (dmScreenSettings));
dmScreenSettings.dmSize = sizeof (dmScreenSettings);   
dmScreenSettings.dmPelsWidth = 1280;
dmScreenSettings.dmPelsHeight = 720;    
dmScreenSettings.dmBitsPerPel = 32;      
dmScreenSettings.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
ChangeDisplaySettings(&dmScreenSettings, CDS_FULLSCREEN);

I use the same function with the CDS_RESET value to put it back in “normal” mode when receiving a WM_ACTIVATE with (wParam == WA_INACTIVE) :

ChangeDisplaySettings(&dmScreenSettings, CDS_RESET);

When I first launch my application, it is in fullscreen.
I use ALT+TAB to switch to another application on my computer. My application minimized itself. It works well.
Then, I switch back to my application, and it comes up in fullscreen mode. Again, it works well.
But if I want to switch back to another application one more time, my application statys in fullscreen mode, hiding all others applications on my computer.

NB : My window is created using CreateWindowEx() function with the following parameters :

DWORD dwExStyle = WS_EX_TOPMOST;
DWORD dwStyle = WS_VISIBLE | WS_POPUP;

1) Is there another way than using ChangeDisplaySettings() to change the fullscreen mode ?

2) Am I using it the good values ?

3) Is there anything to do that I forgot ?

Thanks in advance for all your answers.
Best regards,

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:12:12+00:00Added an answer on May 16, 2026 at 11:12 am

    These guys seem to cover all the options.

    Win32: full-screen and hiding taskbar


    New Edit: Based on a new comment, try this.

    Trap the WM_ACTIVATE event in you app for that window. In that event call the GetWindowPlacement Function and hopefully you’ll be on your way. Note the link to “SetWindowPlacement” at the bottom.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

well this is my problem i use 2 source first query (select * from
well i do not know how to use sql union properly . i have
I have a class CContainer that has some members CMemberX , CMemberY , which
We have built a Windows Service that is running on client's machines, which occasionally
I have the very well-known WinAPI function: BOOL WINAPI RegisterHotKey( __in_opt HWND hWnd, __in
I have a page in which I want to include frameset, as well as
I use boost trim function and find it perform very well in single-thread environment.
Well, for integers I would use NSNumber . But YES and NO aren't objects,
Well I'm trying to set a variable to use in a thread, it works
Well, I am trying to use an element of function list.But i am having

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.