how to make my code looks like any windows program? i mean i want to my code open just like any other windows program and no in the command prompt windows. i would like to runs the code in a windows with file, tool, option, etc.. this code below is an example from my book with some change i made it to learn how struct works . any thoughts. thanks
you actually can change the project to make it a non console app, like mutexe said, but you cant expect it to do anything worth while, unless you learn an api, such as win32, sfml, sdl, allegro, or openg
Ok some questions:
what are the different is both are written in C++?
what is the next step?
is there any simple program, some "hello world" but running in win32 api ? //please forgive my lack of knowledge!
While the srticle refers to Visual Studio, as it starts of with an empty project all the code will be equally usable with any other IDE which provides Windows SDK support (e.g. Code::Blocks, CodeLite, ...) Or even on the command line, if you're keen enough.
Note that while Windows API apps can be written in C++, the API itself is (or at least a lot of it is) actually C.
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
TCHAR greeting = _T("Hello, World!");
hdc = BeginPaint(hWnd, &ps);
// Here your application is laid out.
// For this introduction, we just print out "Hello, World!"
// in the top left corner.
// End application-specific layout section.
return DefWindowProc(hWnd, message, wParam, lParam);
@MarketAnarchist: do you mean making your own graphics api? of course its possible, but why would you do it? its like wanting to make your own version of the stl? and no its not possible using what op was using. you would need to use more lower level stuff
your getting terms mixed up. consoles not a level of programming. its an interface. the code you write is the level. you get lower level by not using abstracted things like i/ostream or printf and instead using code that is closer to the hardware