I want to display a photo in full-screen mode in my program. Currently I maximize my form and in this way I use the maximum area I can; but I want my form not to have any frame(including minimize, maximize and close buttons) and also I want the screen to contain only my form(not the task bar and ...).
This is exactly what MS-IE(internet explorer) or ACDSee does in full-screen mode.
Please let me know how I can have a full-screen mode in my program.
thank you very much.
If this is a windows application, theres a couple of techniques to do this. To get rid of the minimize and maximize buttons, put the following line in your CreateWindow function as the 3rd parameter:
WS_POPUP | WS_VISIBLE
That gets rid of the tool bar area of the window. For fullscreening the window, the following code will do the trick:
bool m_bFullScreen = true;
dmScreenSettings.dmSize = sizeof(dmScreenSettings);
dmScreenSettings.dmPelsWidth = 1024;
dmScreenSettings.dmPelsHeight = 768; dmScreenSettings.dmBitsPerPel = 32;
if (ChangeDisplaySettings(&dmScreenSettings, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL)
// setting display mode failed, switch to windowed
MessageBox(NULL, "Display mode failed", NULL, MB_OK);
dwExStyle=WS_EX_APPWINDOW | WS_EX_WINDOWEDGE;
Putting that code before the call to CreateWindow will do it.
I hope this information is helpful.