|
From: Daniel G. <sp...@ho...> - 2002-09-23 14:14:07
|
Ah I remember this with HBRUSHes, you need to add the type or something...I
can't remember what exactly it was though. Has this jogged anyone's memory?
>From: "Vlada Djurovic" <dj...@im...>
>To: "DevC++ help" <dev...@li...>
>Subject: [Dev-C++] ANSI problem
>Date: Mon, 23 Sep 2002 14:44:16 +0200
>
>Hi, everybody
>I wrote this function:
>
>void CLine::Draw(HDC hdc)
>{
> HPEN hPen,hOldPen;
> hPen=CreatePen(PS_SOLID,m_iWidth,m_crColor);
> hOldPen=SelectObject(hdc,hPen); //this is where I
>get error message
>
> MoveToEx(hdc,m_ptFrom.x,m_ptFrom.y,NULL);
> LineTo(hdc,m_ptTo.x,m_ptTo.y);
> SelectObject(hdc,hOldPen);
> DeleteObject(hPen);
> DeleteObject(hOldPen);
>}
>
>When I try to compile it, I get the message ANSI C++ forbids implicit
>conversion from `void *' in assignment in commented line. What is the
>problem?
_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com
|