Salut, j'ai suivit un tuto : http://jeux.developpez.com/tutoriels...re-de-travail/ pour m'initier à DIRECTX

Cependant lorsque je passe ma variable "FULLSCREEN" a "true" (ligne 30) la fenêtre en plein écran ne recouvre qu'à peine plus de la moitié de l'écran.

voici le code d'initialisation de ma fenêtre :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
void SystemClass::InitializeWindows(int & screenWidth, int & screenHeight)
{
	WNDCLASSEX wc;
	DEVMODE dmScreenSettings;
	int posX, posY;
 
	ApplicationHandle = this;
 
	m_hinstance = GetModuleHandle(NULL);
	m_applicatoinName = L"Engine";
 
	wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
	wc.lpfnWndProc = WndProc;
	wc.cbClsExtra = 0;
	wc.cbWndExtra = 0;
	wc.hInstance = m_hinstance;
	wc.hIcon = LoadIcon(NULL, IDI_WINLOGO);
	wc.hIconSm = wc.hIcon;
	wc.hCursor = LoadCursor(NULL, IDC_ARROW);
	wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
	wc.lpszMenuName = NULL;
	wc.lpszClassName = m_applicatoinName;
	wc.cbSize = sizeof(WNDCLASSEX);
 
	RegisterClassEx(&wc);
 
	screenHeight = GetSystemMetrics(SM_CXSCREEN);
	screenWidth = GetSystemMetrics(SM_CYSCREEN);
 
	if (FULL_SCREEN)
	{
		memset(&dmScreenSettings, 0, sizeof(dmScreenSettings));
		dmScreenSettings.dmSize = sizeof(dmScreenSettings);
		dmScreenSettings.dmPelsWidth = (unsigned long)screenWidth;
		dmScreenSettings.dmPelsHeight = (unsigned long)screenHeight;
		dmScreenSettings.dmBitsPerPel = 32;
		dmScreenSettings.dmFields = DM_BITSPERPEL | DM_PELSWIDTH;
 
		ChangeDisplaySettings(&dmScreenSettings, CDS_FULLSCREEN);
 
		posX = posY = 0;
	}
	else
	{
		screenWidth = 800;
		screenHeight = 600;
 
		posX = (GetSystemMetrics(SM_CXSCREEN) - screenWidth) / 2;
		posY = (GetSystemMetrics(SM_CYSCREEN) - screenHeight) / 2;
	}
 
	m_hwnd = CreateWindowEx(WS_EX_APPWINDOW, m_applicatoinName, m_applicatoinName, WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_POPUP, posX, posY, screenWidth, screenHeight, NULL, NULL, m_hinstance, NULL);
 
	ShowWindow(m_hwnd, SW_SHOW);
	SetForegroundWindow(m_hwnd);
	SetFocus(m_hwnd);
 
	ShowCursor(false);
 
	return;
}
Si quelqu'un peut m'expliquer pourquoi la fenêtre ne recouvre pas la totalité de la largeur de l'écran.

Je dit surement une bêtise mais cela aurait-il à voir avec ma variable 'screenWidth' (ligne 28) que j'initialise avec la fonction GetSystemMetrics(SM_CYSCREEN) et que j'affecte au membre dmPelWidth de la struct DEVMODE ?

Merci d'avance