Quote:
quote:
1.With vc++ 2005 Express Edition I don't have the MFC, is that true?
So what do I loose (for graphics, classes e.t.c.), what is that I cannot do? What should+can I download, for free, to have full functionality?
2.What is the difference between : Microsoft Platform SDK ,Visual Studio and .NET ?
|
Well if you download Platform SDK, you get afx libraries in the MFC folder. I haven't tried to compile MFC source in the VC++ express so I can't personally tell you if it works. But I know that the wizards for MFC aren't there.
The .NET framework can be programmed in any language that supports it: C++ (at least microsoft's version), J# (the ms version of java), C#, and
VB are the primary languages.
Quote:
quote:
3. In a window form, created with the WindowForm project generator of VC++ 2005 EXPRESS, I want to add an array, as property, to keep track of the coordinates, x and y, of some (about 20 )user's clicks on my form , and so to be able to redraw the form on a paint message.I add the property as a two dimension array and I get errors.Can I , and how should, add array in my form properties?Here is the code:
|
http://msdn2.microsoft.com/en-us/library/xhfb39es.aspx
I suppose that your best bet is to use a List, I suppose
Code:
using namespace System::Collections::Generic;
// .......
public ref class Form1 : public System::Windows::Forms::Form
{
public:
List<Point> ^points;
Form1(void)
{
InitializeComponent();
points = gcnew List<Point> ();
}
// .......
Then, whenever you need to add a new point:
Code:
points->Add(Point(x, y));
The thing about .NET is that all the rules you learned about memory management goes strait out the window. Although you still need to delete points in the destructor. .NET uses managed code, which you'll have to look up (it's a whole separate topic).
Quote:
quote:
4.How could I open another form2 from a button in a form1?
|
In the form design, drag a button into the form and when you're ready double click on the button. VS will write a new method for you, for example:
Code:
private: System::Void button1_Click(System::Object^ sender, System::EventArgs^ e) {
}
You'll have to write the code into this method:
Code:
{
OtherForm form2 = new OtherForm();
form2.Show(this);
}
This assumes that you've already created another form using the the Add New Item button.
Quote:
quote:
5.In order not to ask you all the time, where can I find info about the classes,their properties and member functions (for graphics,database manipulation e.t.c.) ?
|
MSDN of course.. and usually google will link directory to MSDN if you search for the method name.
http://msdn2.microsoft.com/en-us/library/default.aspx
For reference, in VS you can also get information on the classes you use by pressing F1 on the selected text.