MCPcopy Create free account
hub / github.com/davideberly/GeometricTools / wmain

Function wmain

GTE/Tools/BitmapFontCreator/BitmapFontCreator.cpp:249–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249int wmain()
250{
251 wchar_t const* className = L"BitmapFontCreator";
252 WNDCLASS wc{};
253 wc.style = CS_OWNDC;
254 wc.lpfnWndProc = DefWindowProc;
255 wc.cbClsExtra = 0;
256 wc.cbWndExtra = 0;
257 wc.hInstance = nullptr;
258 wc.hIcon = LoadIcon(nullptr, IDI_APPLICATION);
259 wc.hCursor = LoadCursor(nullptr, IDC_ARROW);
260 wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
261 wc.lpszClassName = className;
262 wc.lpszMenuName = nullptr;
263 RegisterClass(&wc);
264
265 HWND hWnd = CreateWindow(className, className, WS_OVERLAPPEDWINDOW,
266 0, 0, gWindowWidth, gWindowHeight, nullptr, nullptr, nullptr, nullptr);
267
268 ShowWindow(hWnd, SW_SHOW);
269 UpdateWindow(hWnd);
270
271 std::wstring fontName = L"Arial";
272 DWORD italic = 0;
273
274 for (auto size : { 12, 14, 16, 18 })
275 {
276 for (auto weight : { FW_NORMAL, FW_BOLD })
277 {
278 ProcessFont(hWnd, fontName, weight, size, italic);
279 }
280 }
281
282 DestroyWindow(hWnd);
283 UnregisterClass(className, nullptr);
284 return 0;
285}
286

Callers

nothing calls this directly

Calls 1

ProcessFontFunction · 0.85

Tested by

no test coverage detected