From: sudipta b. <tup...@ya...> - 2008-06-27 18:20:29
|
Hi all, I am learning C programing under windows.I was trying to compile the following code. #include <windows.h> int _stdcall WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpszCmdline,int nCmdShow) { HWND h; h=CreateWindow("BUTTON","Press Me",WS_OVERLAPPEDWINDOW,10,10,150,100,0,0,h,0); ShowWindow(h,nCmdShow); MessageBox(0,"Hi!","Waiting",MB_OK); return 0; } But I am getting an error as follows:- 5 C:\Dev-Cpp\tupai\Winapp3.cpp cannot convert `HWND__*' to `HINSTANCE__*' for argument `11' to `HWND__* CreateWindowExA(DWORD, const CHAR*, const CHAR*, DWORD, int, int, int, int, HWND__*, HMENU__*, HINSTANCE__*, void*)' . I have worked with C programs under DOS but not under windows, so I am unable to understand what it means and what rectification is needed in the program. And also can someone suggest me some books/websites from where I can learn C under windows efficiently. Regards Sudipta Lal Basu Student, M.Tech (Structural Engineering) G-51, Jawahar Bhawan IIT Roorkee Ph-9897509977 Send instant messages to your online friends http://uk.messenger.yahoo.com |