You should not pass an integer value where a string is expected, because your integer value is interpreted as the address of (pointer to) the expected string.
If you want to show an integer as window title, then you have to: 'convert' the integer value to its string representation and then pass the obtained string to the
CreateWindow
function.
For instance
TCHAR title[_MAX_U64TOSTR_BASE2_COUNT]; _itot_s((12 * 34), title, _MAX_U64TOSTR_BASE2_COUNT, 10); HWND hWnd = CreateWindow(szWindowClass, title, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, nullptr, nullptr, hInstance, nullptr);