Thread: Re: [Dev-C++] ANSI C++ forbids implicit conversion from `void *' in argument passing
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Benjamin W. <ben...@ho...> - 2002-02-10 18:42:01
|
<html><div style='background-color:'><DIV>
<P>Flavio,</P>
<P>Have you tried replacing the "0" with a default flag such as: LR_DEFAULTCOLOR</P>
<P>LR_DEFAULTCOLOR is just a default flag that really doesn't do anything except assure that your bitmap or image is loaded non-black and white.</P>
<P>I hope that helps out.</P></DIV>
<DIV><FONT face="Geneva, Arial, Sans-serif" size=2>Benjamin Wheeless</FONT></DIV>
<DIV></DIV>
<DIV><FONT face="Geneva, Arial, Sans-serif" size=2><STRONG>Network Systems - Delta Airlines, Inc.</STRONG></FONT></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2><STRONG>Atlanta, GA - USA 30320</STRONG></FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2><STRONG>============================</STRONG></FONT></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>
<DIV></DIV>>From: Flavio de Souza <FLA...@NE...>
<DIV></DIV>>To: Dev-cpp <DEV...@LI...>
<DIV></DIV>>Subject: [Dev-C++] ANSI C++ forbids implicit conversion from `void *' in argument passing
<DIV></DIV>>Date: Sun, 10 Feb 2002 15:41:07 -0300
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>I am trying to compile a windows program and I am getting the following compiler error:
<DIV></DIV>>
<DIV></DIV>> ANSI C++ forbids implicit conversion from `void *' in argument passing
<DIV></DIV>>
<DIV></DIV>>This error occurs two times in the following piece of code where I have the value "0" (see below).
<DIV></DIV>>
<DIV></DIV>>void WinClass::SetResIcons (int resId)
<DIV></DIV>>{
<DIV></DIV>> _class.hIcon = reinterpret_cast<HICON> (
<DIV></DIV>> ::LoadImage (
<DIV></DIV>> _class.hInstance,
<DIV></DIV>> MAKEINTRESOURCE (resId),
<DIV></DIV>> IMAGE_ICON,
<DIV></DIV>> ::GetSystemMetrics (SM_CXICON),
<DIV></DIV>> ::GetSystemMetrics (SM_CYICON),
<DIV></DIV>> 0)); <------------------------------------------------------------------------------where i got the error
<DIV></DIV>> // Small icon can be loaded from the same resource
<DIV></DIV>> _class.hIconSm = reinterpret_cast<HICON> (
<DIV></DIV>> ::LoadImage (
<DIV></DIV>> _class.hInstance,
<DIV></DIV>> MAKEINTRESOURCE (resId),
<DIV></DIV>> IMAGE_ICON,
<DIV></DIV>> ::GetSystemMetrics (SM_CXSMICON),
<DIV></DIV>> ::GetSystemMetrics (SM_CYSMICON),
<DIV></DIV>> 0)); <------------------------------------------------------------------------------where i got the error
<DIV></DIV>>
<DIV></DIV>>}
<DIV></DIV>>
<DIV></DIV>>Does anyone know a possible cause? What should I do to compile it correctly?
<DIV></DIV>>
<DIV></DIV>>Please, help me.
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>Flavio de Souza
<DIV></DIV>>fla...@ne...
<DIV></DIV>>ICQ:78458203
<DIV></DIV>>Sertãozinho - SP - Brasil
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>
<DIV></DIV>>_______________________________________________
<DIV></DIV>>Dev-cpp-users mailing list
<DIV></DIV>>Dev...@li...
<DIV></DIV>>https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
<DIV></DIV></div><br clear=all><hr>Send and receive Hotmail on your mobile device: <a href='http://go.msn.com/bql/hmtag2_etl_EN.asp'>Click Here</a><br></html>
|
|
From: Flavio de S. <fla...@ne...> - 2002-02-12 20:30:20
|
I still got the same error.
Any ideas?
Fl=E1vio.
10/02/02 15:41:49, "Benjamin Wheeless" <ben...@ho...> wrote:
>
>
> From: "Benjamin Wheeless" <ben...@ho...>
> To: fla...@ne..., dev...@li...
>
> Subject:Re: [Dev-C++] ANSI C++ forbids implicit conversion from `void =
*' in
> argument passing
> Date: Sun, 10 Feb 2002 13:41:49 -0500
>
>
>
>
> Flavio,
>
> Have you tried replacing the "0" with a default flag such as:
> LR_DEFAULTCOLOR
>
>
> LR_DEFAULTCOLOR is just a default flag that really doesn't do anything
> except assure that your bitmap or image is loaded non-black and white.
>
> I hope that helps out.
>
>
> Benjamin Wheeless
> Network Systems - Delta Airlines, Inc.
> Atlanta, GA - USA 30320
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
> >From: Flavio de Souza
> >To: Dev-cpp
> >Subject: [Dev-C++] ANSI C++ forbids implicit conversion from `void *'=
in
> argument passing=20
> >Date: Sun, 10 Feb 2002 15:41:07 -0300=20
> >=20
> >=20
> >I am trying to compile a windows program and I am getting the followi=
ng
> compiler error:=20
> >=20
> > ANSI C++ forbids implicit conversion from `void *' in argument passi=
ng=20
> >=20
> >This error occurs two times in the following piece of code where I ha=
ve the
> value "0" (see below).=20
> >=20
> >void WinClass::SetResIcons (int resId)=20
> >{=20
> > _class.hIcon =3D reinterpret_cast (=20
> > ::LoadImage (=20
> > _class.hInstance,=20
> > MAKEINTRESOURCE (resId),=20
> > IMAGE_ICON,=20
> > ::GetSystemMetrics (SM_CXICON),=20
> > ::GetSystemMetrics (SM_CYICON),=20
> > 0)); <--------------------------------------------------------------=
------
> ----------where i got the error=20
> > // Small icon can be loaded from the same resource=20
> > _class.hIconSm =3D reinterpret_cast (=20
> > ::LoadImage (=20
> > _class.hInstance,=20
> > MAKEINTRESOURCE (resId),=20
> > IMAGE_ICON,=20
> > ::GetSystemMetrics (SM_CXSMICON),=20
> > ::GetSystemMetrics (SM_CYSMICON),=20
> > 0)); <--------------------------------------------------------------=
------
> ----------where i got the error=20
> >=20
> >}=20
> >=20
> >Does anyone know a possible cause? What should I do to compile it
> correctly?=20
> >=20
> >Please, help me.=20
> >=20
> >=20
> >Flavio de Souza=20
> >fla...@ne...=20
> >ICQ:78458203=20
> >Sert=E3ozinho - SP - Brasil=20
> >=20
> >=20
> >=20
> >_______________________________________________=20
> >Dev-cpp-users mailing list=20
> >Dev...@li...=20
> >https://lists.sourceforge.net/lists/listinfo/dev-cpp-users=20
>
>
>
> Send and receive Hotmail on your mobile device: Click Here
Flavio de Souza
fla...@ne...
ICQ:78458203
Sert=E3ozinho - SP - Brasil
|