Anyone know where I can find some basic examples?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7

Thread: Anyone know where I can find some basic examples?

  1. #1
    Join Date
    Sep 2005
    Posts
    8

    Anyone know where I can find some basic examples?

    I mean really really basic stuff. I'm using Visual Studio Express edition and I just don't know how to do many things, all I have figured out so far is this

    MessageBox::Show("WEEEEE");

    I'd like to figure out how to:

    Display Text in a text box
    Take the value from a drop down menu / radio buttons etc.
    Create a pseudo-random number
    Display an image somewhere when such and such happens


    Etc, etc. All those basic things that somehow I can't find any tutorials on. I understand the basics of C++ but I just can't find out how to do these really simple commands.

    Thanks!

  2. #2
    Join Date
    Dec 2003
    Posts
    3,366
    rand(); -- not terribly random numbers built into language
    image -- specific to platform not c++

    read radio/drop down -- you have to connect a variable to to the object (under add variable in the class wizard) and just read the data variable or call a getdata type function.

    Same for text box, you connect a variable. Then its variable.SetWindowText("text");


    MSDN has many examples, but most are very poorly written (written by experts not really clearly outlined for a beginner). Web has other examples just search.

  3. #3
    Join Date
    Sep 2005
    Posts
    8
    I have been doing A LOT of searching and the examples are like the MSDN library... very hard to understand because they don't actually provide a working example, they leave out things that they expect you to know...and I just don't know those things. I learn by visually seeing the code usually and not by someone explaining it.

  4. #4
    Join Date
    Aug 2005
    Location
    Slough
    Posts
    52
    I learnt enough about MFC to do some basics by reading and doing the excercies in one of those 21 days books - this one in fact - http://www.amazon.com/exec/obidos/tg...87334?v=glance

  5. #5
    Join Date
    Sep 2005
    Posts
    8
    I wish I knew what MFC had to do with C++ lol :eek:

    Ya thats how much of a novice I am.

  6. #6
    Join Date
    Aug 2005
    Location
    Slough
    Posts
    52
    Quote Originally Posted by JollyMoose
    I wish I knew what MFC had to do with C++ lol :eek:

    Ya thats how much of a novice I am.
    It's the part of Microsofts Visual C++ development environment that allows you to do dialog boxes and forms -the graphical bit. I think that's what you're interested in. There's an associated form designer that you can drag radio boxes, text boxes, drop down menu's etc. onto a form. It generates stub C++ code for you to fill in and add your functionality. I managed to do quite a bit with only knowing C since it genrates the classes for you.

    Have a look at

    http://www.functionx.com/visualc/

    for example.

    In the book that I recommended it teaches you C++ and MFC. C++ is the language and MFC (Microsoft Foundation Class) is just a library that allows you to display boxes etc. on Windows PC's.

    I've just realised that you said you're using the express edition of visual studio - not sure if that supports the form designer bit. So you might have to do a lot by hand - that's a pain! You might find C#/.net easier if you're just trying to develop a windows app and don't care what it's written in - I did.

    You might be in the wrong forum since C++ doesn't do most of what you're asking about.

    Peter
    Last edited by PeterS2; 09-03-2005 at 04:51 AM. Reason: correction

  7. #7
    Join Date
    Sep 2005
    Posts
    8
    Thanks that helps me understand a lot.

Similar Threads

  1. yag's status report - April 4, 2002
    By Yair Alan Griver [MSFT] in forum vb.announcements
    Replies: 0
    Last Post: 04-04-2002, 09:28 PM
  2. YAG's public status report - March 7, 2002
    By Seth Grossman [MSFT] in forum vb.announcements
    Replies: 1
    Last Post: 03-13-2002, 07:32 PM
  3. Find Executable Application
    By David Chu in forum VB Classic
    Replies: 0
    Last Post: 04-25-2001, 01:48 PM
  4. Basic Culture
    By Bernardo Melendez in forum Talk to the Editors
    Replies: 0
    Last Post: 10-28-2000, 04:39 PM
  5. New Site For Visual Basic Developers
    By Paul R. Wilde in forum vb.announcements
    Replies: 0
    Last Post: 08-13-2000, 08:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center