Results 1 to 10 of 10

Thread: Bored with C++...

  1. #1

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    I am reading the book called:

    simons teach yourself C++ in 21 days second edition

    I have read first 5 chapter of this book and I am bored with it. It want to learn windows programming in C++ as quickly as possible. I know about some what about

    pointers
    classes
    functions

    Am I able to begin programming in windows. I have read a code to create a simple windows app. It uses a lot of windows API calls which I have done some in visual basic.
    Please suggest something or some site to learn windows programming.
    Baaaaaaaaah

  2. #2
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    one of the best (probably the best) for windows programming is http://www.winprog.org

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  3. #3
    PowerPoster sail3005's Avatar
    Join Date
    Oct 2000
    Location
    Chicago, IL, USA
    Posts
    2,340
    OK...what the heck happened with that UBB?

    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA
    USAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSAUSA

  4. #4
    Frenzied Member Vlatko's Avatar
    Join Date
    Aug 2000
    Location
    Skopje, Macedonia
    Posts
    1,409
    http://www.winprog.org/tutorial

    But i should warn you that you may get lost in win apps if you are not very familiar with functions and pointers. Also win32 programming will look like a whole new language to you.
    I am become death, the destroyer of worlds.
    mail:[email protected]

    • Visual Basic 6.0 & .NET
    • Visual C++ 6.0 & .NET
    • ASP
    • LISP
    • PROLOG
    • C
    • Pascal

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    The main problem with Win32 programming is you have to understand exactly how type sizes affect what you do. You need to keep track of what the difference between LONG_PTR and INT_PTR is, and you need to be ready for 64-bit programming

    Plus they make very heavy use of function pointers
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  6. #6

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827

    www.winpro.org is best but

    www.winprog.com
    is a good site but when I paste the code to create a window in my compiler, and I run it, it shows a dos window and the other window which I wanted. It looks messy. How do I get rid of the dos window.
    I am using DEV-C++.

    My compiler gives me an option to make a window but it's good is a little diffrent then the code in www.winprog.com.

    What are resource files, and source files.

    What is LONG_PTR and INT_PTR.

    I can make funtction with some parameters or without.

    I can make pointer which point to the address of another variable and then if I change the pointer's value, it change that variable's value.

    That is all I know about pointers and functions
    Baaaaaaaaah

  7. #7
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    You need to make sure that you link it as a windows program, not console. This means that you will need to use WinMain as well.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  8. #8

    Thread Starter
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    LRESULT CALLBACK WndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)

    Do I change "wndproc" to Winmain or what do I use instead of this.

    What is "LRESULT CALLBACK" I does look like a function and also what is this thing:
    "HWND hwnd" I have read somewhere that in vb it is like this:

    Dim HWND as hwnd

    but after declaring "HWND" why do you use "hwnd" instead of "HWND"
    Baaaaaaaaah

  9. #9
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    WinMain is the Windows equivalent of main.
    In C/C++ functions take the form:
    Code:
    <type> <attributes> FunctionName(<params>)
    <type> is the type returned from the function.
    <attributes> specify things like calling convention. For Windows programs it's usually CALLBACK (technically it's the __stdcall convention).

    The parameters are specified as type varname. HWND is the type name, and hWnd is the name of the variable.

    (these sorts of problems are the ones overcome by getting lots of non-windows experience)
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  10. #10
    Lively Member
    Join Date
    May 2000
    Posts
    123
    i am certainly no expert as some of the other posters are, but I believe you should get a very solid foundation in C++ classes, methods, functions, along with everything about pointers and data structures before moving to any sort of windows programming. I have JUST started MFC programming but that year or two of C++ experience has helped alot.

    just my $.02

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width