MCPcopy Create free account
hub / github.com/GameTechDev/PresentMon / CreateBrowserWindow

Function CreateBrowserWindow

IntelPresentMon/AppCef/source/winmain.cpp:119–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119HWND CreateBrowserWindow(HINSTANCE instance_handle, int show_minimize_or_maximize)
120{
121 WNDCLASSEX wcex = { 0 };
122 wcex.cbSize = sizeof(wcex);
123 wcex.style = CS_HREDRAW | CS_VREDRAW;
124 wcex.lpfnWndProc = BrowserWindowWndProc;
125 wcex.hInstance = instance_handle;
126 wcex.hCursor = LoadCursor(nullptr, IDC_ARROW);
127 wcex.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
128 wcex.lpszClassName = BrowserWindowClassName;
129 wcex.hIcon = static_cast<HICON>(LoadImage(
130 instance_handle, MAKEINTRESOURCE(IDI_ICON1),
131 IMAGE_ICON, 32, 32, 0
132 ));
133 RegisterClassEx(&wcex);
134
135 HWND hwnd = CreateWindow(
136 BrowserWindowClassName, "Intel PresentMon",
137 WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, 200, 20,
138 1360, 1020, nullptr, nullptr, instance_handle, nullptr
139 );
140
141 BOOL useDarkMode = TRUE;
142 DwmSetWindowAttribute(hwnd, 20, &useDarkMode, sizeof(useDarkMode));
143
144 ShowWindow(hwnd, show_minimize_or_maximize);
145 UpdateWindow(hwnd);
146
147 return hwnd;
148}
149
150HWND CreateMessageWindow(HINSTANCE instance_handle)
151{

Callers 1

WinMainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected