case WM_LBUTTONDOWN:
x1=LOWORD(z);
y1=HIWORD(z);
d=GetDC (w);
TextOut(d,x1,y1,"AMITA",6);
ReleaseDC (w,&d);
break;
Error:: error C2664: 'ReleaseDC' : cannot convert parameter 2
from 'struct HDC__ ** ' to 'struct HDC__ *
views:
21answers:
2
+2
A:
Use:
ReleaseDC (w,d);
instead.
It's because GetDC
returns an HDC
and ReleaseDC
is expecting an HDC
as well, but you're giving it the address of your HDC
.
Cannot convert from X** to X*
and Cannot convert from X* to X**
are two of the canonical error messages you will hopefully be able to spot immediately at some point in your life :-) It's almost always the same problem (too many, or too few, levels of indirection).
paxdiablo
2010-07-07 05:46:54