I have a problem. I wanted to document my tool development, so instead of mspaint-ing a date on top of screenshot, I wanted to make the window name carry the date and time data. But instead of the string I've got only chinese characters.
Here is my code where I want to assign the string to CreateWindowEx():
char *wndName = "Asphyx V0.01 (Build Date: " __DATE__ " " __TIME__ ")\0";
hWnd = CreateWindowEx(NULL,
L"WindowClass",
(LPCWSTR)wndName,
WS_OVERLAPPEDWINDOW,
300,
300,
wr.right - wr.left,
wr.bottom - wr.top,
NULL,
NULL,
hInstance,
NULL);
EDIT: Guys, I appreciate your answers, but all of them gives me this
Error 29 error C2308: concatenating mismatched strings
and the only somewhat working stuff was a yet deleted answer, but it gave me this:
he used this code:
char title[256];
sprintf(title, "Asphyx V0.01 (Build Date: %s - %s)", __DATE__, __TIME__);
hWnd = CreateWindowEx(NULL,
L"WindowClass",
title,
WS_OVERLAPPEDWINDOW,
300,
300,
wr.right - wr.left,
wr.bottom - wr.top,
NULL,
NULL,
hInstance,
NULL);