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
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.
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.
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.
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
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.
Originally Posted by JollyMoose
Have a look at
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.
Last edited by PeterS2; 09-03-2005 at 04:51 AM.
Thanks that helps me understand a lot.
By Yair Alan Griver [MSFT] in forum vb.announcements
Last Post: 04-04-2002, 09:28 PM
By Seth Grossman [MSFT] in forum vb.announcements
Last Post: 03-13-2002, 07:32 PM
By David Chu in forum VB Classic
Last Post: 04-25-2001, 01:48 PM
By Bernardo Melendez in forum Talk to the Editors
Last Post: 10-28-2000, 04:39 PM
By Paul R. Wilde in forum vb.announcements
Last Post: 08-13-2000, 08:35 PM
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center