The solution given didn't work. The error message was :
[Warning] In function `int WinMain(void *, void *, CHAR *, int)':
ANSI C++ forbids implicit conversion from `void *' in argument passing
hwnd = CreateWindow(szAppName, //window class name
"HELLO Program", //windows caption
WS_OVERLAPPEDWINDOW, //window style
CW_USEDEFAULT, //inital x position
CW_USEDEFAULT, //inital y position
CW_USEDEFAULT, //inital x size
CW_USEDEFAULT, //inital y size
NULL, //parent window handle
NULL, //window menu handle
hInstance, //program instance handle
(LPVOID)NULL); //creation paramaters
//error hear
From: Joe Greenawalt <js...@ca...>
To: Dev...@li...
Subject: [Dev-C++] RE: Windows Application
Date: Mon, 24 Nov 2003 10:48:33 -0600
Try casting to LPVOID, or void *
hwnd = CreateWindow(szAppName, //window class name
"HELLO Program", //windows caption
WS_OVERLAPPEDWINDOW, //window style
CW_USEDEFAULT, //inital x position
CW_USEDEFAULT, //inital y position
CW_USEDEFAULT, //inital x size
CW_USEDEFAULT, //inital y size
NULL, //parent window handle
NULL, //window menu handle
hInstance, //program instance handle
(LPVOID)NULL); //creation paramaters, or
try (void *)
Norrez Kassam wrote:
There is a problem with this windows application. I'm getting an invalid
conversion from void* message at the marked line.
<snip>
hwnd = CreateWindow(szAppName, //window class name
"HELLO Program", //windows caption
WS_OVERLAPPEDWINDOW, //window style
CW_USEDEFAULT, //inital x position
CW_USEDEFAULT, //inital y position
CW_USEDEFAULT, //inital x size
CW_USEDEFAULT, //inital y size
NULL, //parent window handle
NULL, //window menu handle
hInstance, //program instance handle
NULL); //creation paramaters //invalid
conversion from void
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
Dev-cpp-users mailing list
Dev...@li...
TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm
https://lists.sourceforge.net/lists/listinfo/dev-cpp-users
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
|