Sunday, 8 September 2013

how to convert int to LPARAM c/c++?

how to convert int to LPARAM c/c++?

Here is what I have tried. It builds and runs fine but prints blank.
function:
void wmessage(LPARAM msg, HWND hwnd)
{
SendMessage(hwnd,
WM_SETTEXT,
NULL,
msg);
}
usage:
//wmessage((LPARAM)"Not logged in22", noEdit); //prints
//wmessage((LPARAM)555, noEdit); //prints blank
int num= 555;
wmessage((LPARAM)num, noEdit); //prints blank
So i searched but I cant seem to find any mention of how to do this.
The purpose is for this textbox to print a time in seconds as it counts
down, so it needs to be an int

No comments:

Post a Comment