This tutorial is part of a Collection: 01. DirectX 9 - Braynzar Soft Tutorials
rate up
0
rate down
1820
views
bookmark
04. Fullscreen

This lesson will show you what you have to do to go fullscreen.

There are no files for this tutorial
This is just a short quick little tutorial on how to change your code to be in fullscreen mode. First change we need to make is in the part where we create the window, using the CreateWindowEx() function. Find this code... HWND hwnd = CreateWindowEx( NULL, WndClassName, "Window Title", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, width, height, NULL, NULL, hInstance, NULL ); And where it says... WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, Change it to... WS_EX_TOPMOST | WS_POPUP, 0, 0, This tells windows that your window is going to overlap everything else on the screen, even the start menu. Also that your window will not have the default windows border. The 0,0 is the top left corner of the screen. After you do that, goto the WinMain() function and find where you call InitializeD3DWindow and change the fifth parameter from true to false. if(!InitializeD3DWindow(hInstance, nShowCmd, Width, Height, false, D3DDEVTYPE_HAL, &d3dDevice)) And i ALMOST forgot, goto the WndProc() function, and find this... if(MessageBox(0, "Are you sure you want to exit?", "Really?", MB_YESNO | MB_ICONQUESTION) == IDYES) After you find that, just delete it or comment it out cause you won't be able to see it in fullscreen, and then you can't pick yes and then you'll just be stuck in fullscreen. Hope you got it workin!