Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert int to LPCWSTR by using wsprintf

Tags:

As the following code:

int a = 16;
wchar_t *buffer = {0};
wsprintf(buffer,L"%d", a);

MessageBox(NULL, buffer, buffer, MB_OK);

I want to covert int to LPCWSTR in order to put MessageBox. I really newbie in using wsprintf. Any one can help me explain clearly for me using this function??? (Please, I also read MSDN but still dont't clear)

I mean, I want to print "16" in MessageBox