The following program gives error while attempted to compile using Pelles C:
#include<windows.h>
int _stdcall WinMain ( HINSTANCE hinstance, HINSTANCE hPrevInstance,
LPSTR lpszCmdline, int nCmdShow )
{
HWND h[10] ;
int x ;
for ( x = 0; x <= 9 ; x++ )
{
h[x] = CreateWindow ( "BUTTON" , "Press Me" ,
WS_OVERLAPPEDWINDOW , x *20,
x*20 , 150 , 100 , 0 , 0 , h , 0 ) ;
ShowWindow ( h[x] , nCmdShow );
}
MessageBox ( 0 , "Hi !" , "Waiting" , 0 ) ;
return 0 ;
The compiling error is as under :
error #2140: Type error in argument 11 to 'CreateWindowExA'; expected 'struct HINSTANCE__ *' but found 'HWND'.
*** Error code: 1 ***
Solution solicited