Results 1 to 18 of 18

Thread: Windows Programming

  1. #1

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650

    Windows Programming

    I read a book, it taught me programming in dos. How do i move it up to windows?

  2. #2
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    Programming Windows by Charles Petzold. Simply the best book on Windows programming I have read.
    Or if you don't want to read a book with 1500 pages, then look at the winprog tutorial: www.winprog.org
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  3. #3
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    theres an example in the faq

  4. #4
    Let me in .. techyspecy's Avatar
    Join Date
    Aug 2002
    Location
    Back to VBF.
    Posts
    2,456
    Charles petzold is the best book on Visual C++, i guess.

    Other good c++ concept book is, c++ inside out by bruce eckel.

  5. #5

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    winprog.com is great, but i wanted c++, some of the stuff they use my compiler doesnt understand

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Originally posted by Mushroom Realm
    winprog.com is great, but i wanted c++, some of the stuff they use my compiler doesnt understand
    winprog.org uses C I think, some of which won't compile as C++ (the type checking has been tightened).
    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

  7. #7
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    But pure windows programming is in C like the SDK. You can use C++ yourself but you won't learn more about windows this way.
    Hint: to make your compiler compile C examples put it into a .c file, not .cpp
    This will make the compiler compile it as C.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  8. #8

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    i dont mind not learning more about windows, im already stressed abot school then throw in vb, and c++, im learning enough, i dont want to add the more complicated and less usefull c to the mix

  9. #9
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    What I mean is: you get no advantage in understanding windows from using C++ in favor of C. You'll get it later.
    You don't need to learn C. The incompatibilities are minor syntactical issues, so you can simply copy and paste the examples to a .c file to compile them and see what they do and then recreate them with C++ to modify them and learn.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  10. #10

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    How do u call api in C++, ive been trying to use the ShowCursor api like this:

    #include <windows.h>
    #include <iostream.h>

    int WinMain()
    int command;
    {
    cout>>"Terminal Activated\n";
    while(command!="end")
    cin<<command;
    if(command=="cursor")
    ShowCursor("False");
    if(command=="show")
    ShowCursor("True");
    loop
    }

    Im using a cheap, free compiler from borland, and it gives me 2 errors. One is a declaration syntax error, and the other is declaration terminated incorectly. What am i doing wrong?

  11. #11
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    just try
    ShowCursor(false);

    all lowercase no quotes needed


  12. #12

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    Still gives me the same error


    Is there any really good easily atainable books/sites that will teach me c++, I know a little, too much to the point where i dont want to spend $50 on a book thats beginner to advanced, and too little to understand winprog. Its just going right over my head.

  13. #13
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    cin uses >> and cout uses << you've got them backwards

  14. #14

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    LOL im new to c++ ive been doing it for 3 weeks, and ive done this atleast once a day.

  15. #15

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    hold up, its still not working.

  16. #16
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    int WinMain()
    int command;
    {
    cout>>"Terminal Activated\n";


    You have the
    int command;
    line before the start of the function body.


    Don't use <iostream.h>, use <iostream> and
    using namespace std;
    This is the modern standard, the other is deprecated. If it doesn't work, download the newest free compiler from borland, I'm sure it supports the new STL.

    Pass TRUE or FALSE to windows functions requiring a BOOL. Don't use quotes, and put it all in capitals.
    If a bool is required somewhere, pass true or false (all lowercase).
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  17. #17

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    My internet is slower than the speed that u would think possible. It takes me atleast a full 20 min to download a mb of data, and thats when its not busy. What would the advantages of using the none .h version be?

  18. #18
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Originally posted by Mushroom Realm
    My internet is slower than the speed that u would think possible. It takes me atleast a full 20 min to download a mb of data, and thats when its not busy. What would the advantages of using the none .h version be?
    It's standard, and they're all templated so they fit in more neatly with the rest of the Standard Library.
    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

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