Windows Programming Dictionary


Prefixes

b

bool

by

byte

c

char / wchar / tchar

dw

double word

f

flag (just a bool)

fn

function

h

handle

lp

long pointer (32-bit)

lpctstr

long pointer (32-bit) to constant string

p

pointer

s

string

sz

null terminated string


WinMain()

int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR cmdLine, int cmdShow)

HINSTANCE hInst

handle to this instance of the program
You can also get this via a function call (see GetModuleHandle()).

HINSTANCE hPrevInst

handle to the previous instance of the program
I've never needed this.

LPSTR cmdLine

command line arguments passed to the application
This is a little tricky... if you were using regular int main(int argc, char* argv[]) you will get an array of arguments, the first of which (argv[0]) is the name of your executable. With the string you get passed in LPSTR cmdLine, you only get the additional arguments (those starting from argv[1]). This might not seem like too big of a deal, but its an important distinction especially when coding cross platform applications.
You can also get the command line string via a function call (see GetCommandLine()).

int cmdShow

integer holding the information of how Windows wants your application window to initially show. This is a SW_ value.
I usually ignore this too.