| 247 | } |
| 248 | |
| 249 | int 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 |
nothing calls this directly
no test coverage detected