Jrdman said:
what's the minimum code should i add to this code:
#include<windows.h>
int APIENTRY WinMain(HINSTANCE hinstane,
HINSTANCE hpinstance,
LPSTR lpcmdline,
int cmdshow){
while(1)
;
}
to get a window not a console?
This group only discusses a C language which has an unspecified input (eg
papertape reader) and an unspecified output (eg a teletype).
So even discussion of keyboards and screens is off-topic!
So a win32 group is best although you may find that your compiler, and the C
language, are off-topic there...
To get started, you need a minimalist program in C that just creates a
window. Try looking for "hellowin.c" or anything by Petzold.
If compiling with gcc, try using the -mwindows switch if there are problems
(this is one of those things you need to pick up from anywhere other than
the gcc help files, which are totally useless for or a beginner).
If using dev-cpp as you mentioned elsewhere, all you need to do is a choose
a new 'Windows Application' project! This will give you exactly what you
need (it didn't work when I tried it, but I'm not an IDE expert; if you have
the same problem, extract the code they give you into a separate file and
compile that).