PDA

View Full Version : LPSTR



$nooc
03-23-2006, 03:26 AM
hello guys!

i'm not so good in english.. so don't wonder ^^

well..

i want to learn how to program with OpenGL.

i started with some Win32 applications... i made a simply window which doesnt screens anything..


well.. my question is:

what is the type LPSTR in the WinMain function?


int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nShowCmd)
{
return 0;
}
and what is the last parameter for? "int nShowCmd"


please explain what LPSTR is doing exactly and what is "int nShowCmd" for?

:rolleyes:

Komat
03-23-2006, 04:18 AM
See this documentation (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/winmain.asp)

jide
03-23-2006, 04:32 AM
If you want to program with OpenGL I can advise you not to use the Windows native library, at least not now. Use glut, this is the best to start.

songho
10-19-2006, 11:34 AM
Originally posted by $nooc:
what is the type LPSTR in the WinMain function?LPSTR stands for Long Pointer to STRing. It is same as char* in ISO/ANSI C/C++. More precisely, it should be called "far pointer" not long pointer.

jide
10-19-2006, 12:32 PM
Originally posted by songho:

Originally posted by $nooc:
what is the type LPSTR in the WinMain function?LPSTR stands for Long Pointer to STRing. It is same as char* in ISO/ANSI C/C++. More precisely, it should be called "far pointer" not long pointer. Hopefully will it be helpful for him now, more than 6 months later :)