I'm looking for something like
LPARAM is actually an integer btw, right?Code:SendMessage(hStatic, WM_SETTEXT, 0, cast<LPARAM>("mytext"));
Printable View
I'm looking for something like
LPARAM is actually an integer btw, right?Code:SendMessage(hStatic, WM_SETTEXT, 0, cast<LPARAM>("mytext"));
Why not
reinterpret_cast< LPARAM >( "abc" )
or
(LPARAM)"abc"
typedef LONG_PTR LPARAM;Quote:
Originally Posted by paprica
typedef long LONG_PTR, *PLONG_PTR;
of course long can be any byte size >= char
I've been taught that c-style casts are bad.
Are you sure that reinterpret_cast is the right choice? It just converts pointer to pointer or pointer to integer and vice versa...