Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Windows Programming

Okay, I'm new to Win programming. I know C and C++ pretty well, and I have

VB down some, but I don't get all these new datatypes in Win programming, for

example, hWnd, DWORD, LPCTSTR, all that stuff. Is there a site that lists all

these structs, classes, types... and has a good tutorial? I really don't want to

be a programmer that just copys stuff out of a book but does'nt know why it

works. I want to know what's in a DWORD, and why why why. Can anyone help me?



--Jimbo


Comments

  • : Okay, I'm new to Win programming. I know C and C++ pretty well, and I have

    : VB down some, but I don't get all these new datatypes in Win programming, for

    : example, hWnd, DWORD, LPCTSTR, all that stuff. Is there a site that lists all

    : these structs, classes, types... and has a good tutorial? I really don't want to

    : be a programmer that just copys stuff out of a book but does'nt know why it

    : works. I want to know what's in a DWORD, and why why why. Can anyone help me?

    :

    : --Jimbo

    :

    Jimbo,



    Well.........I don't know anything about Windows Programming. But I do

    know some ASM basics.



    A "DWORD" is a "DoubleWORD".........it is used for defining a piece of code.

    DWORDs are 4 bytes long. What's in them is ANYTHING that is put in them.

    There is no predefind DWORDs.........if it's 4 bytes.....you can put in a DWORD.

    Go to the site below and it will explain what WORDS, QWORDS, PARAGRAPHS,

    ect. are. HWND.........i'm not positive, but I think that is the WINDOW

    HANDLE.



    http://webster.cs.ucr.edu/Page_asm/ArtofAssembly/CH01/CH01-1.html#HEADING1-86



    Hope that helps,

    ~psyber




  • hey JIMBO~



    you NEED to buy Petzold's book on Programming Windows 95 or 98. Excellent resource. he not only explains HOW things work, but also WHY.



    for the time being however, this may help a bit...

    UINT => unsigned int

    PSTR => pointer to a character string (char *)

    LRESULT => long

    WPARAM => UINT

    LPARAM => long

    LPCTSTR => Long pointer to a null

    terminated string

    DWORD => 32 bit unsigned int

    MSG => message structure

    WNDCLASSEX => window class structure

    PAINTSTRUCT => paint structure

    RECT => rectangle structure

    HINSTANCE => handle to an "instance" - the program

    itself

    HWND => handle to a window

    HDC => handle to a device context



    most of these are named with what is called Hungarian Notation where the prefix to the name describes the type.

    examples :

    sz => string terminated by zero (0 == '')

    h => handle

    i => integer

    ui => unsigned integer

    p => pointer

    x => int (x coordinate)

    y => int (y coordinate)



    etc... etc...

    you get the picture i'm sure.






Sign In or Register to comment.