Click here to Skip to main content
15,912,897 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: question re. portability of an MFC app Pin
Christian Graus6-Jun-05 12:41
protectorChristian Graus6-Jun-05 12:41 
GeneralRe: question re. portability of an MFC app Pin
joseph19507-Jun-05 4:54
joseph19507-Jun-05 4:54 
GeneralRe: question re. portability of an MFC app Pin
Christian Graus7-Jun-05 12:04
protectorChristian Graus7-Jun-05 12:04 
GeneralRe: question re. portability of an MFC app Pin
toxcct6-Jun-05 20:20
toxcct6-Jun-05 20:20 
GeneralRe: question re. portability of an MFC app Pin
joseph19507-Jun-05 4:54
joseph19507-Jun-05 4:54 
GeneralRe: question re. portability of an MFC app Pin
joseph19507-Jun-05 9:02
joseph19507-Jun-05 9:02 
GeneralRe: question re. portability of an MFC app Pin
Christian Graus7-Jun-05 12:01
protectorChristian Graus7-Jun-05 12:01 
GeneralDrawing simple shapes and controlling them Pin
Hmmkk5-Jun-05 1:23
Hmmkk5-Jun-05 1:23 
Hi... Sorry if this becomes a long message but, Please look throught this code:
#using <mscorlib.dll>
#using <System.dll>
#using <System.Drawing.dll>
#using <System.Windows.Forms.dll>

using namespace System;
using namespace System::Drawing;
using namespace System::Windows::Forms;

__gc class SimpleForm : public Form
{
public:
SimpleForm();
private:
Button *btnMe;

void CloseClick(Object *Sender, EventArgs *Args);
};

SimpleForm::SimpleForm()
{
this->BackColor = System::Drawing::Color::Azure;
this->Text = S"Ett litet Test";
btnMe = new Button;
btnMe->Location = Point(115, 225);
btnMe->Text = S"&Close";
btnMe->Click += new EventHandler(this,CloseClick);
this->Controls->Add(btnMe);
}

void SimpleForm::CloseClick(Object *Sender, EventArgs *Args)
{
Close();
}

int __stdcall WinMain()
{
SimpleForm *SF = new SimpleForm();
Application::Run(SF);

return 0;
}

What do I need to add in the class to draw something using GDI+ or whatever way that might be the best. I just want to draw some circles or rectangles or lines onload or onbuttonclick. I have searched all over for some EASY samples of this, but no there are only expert solutions that performs 1000 operations more than I really want to do and which also makes the code VERY hard for an inexperienced programmer to understand.
Any help is appreciated, thanks in advance.

Regards,
Hmmkk
GeneralRe: Drawing simple shapes and controlling them Pin
Hmmkk5-Jun-05 2:15
Hmmkk5-Jun-05 2:15 
GeneralFrom, "Windows Forms Programming in C#" Pin
ursus zeta5-Jun-05 10:50
ursus zeta5-Jun-05 10:50 
GeneralRe: From, &quot;Windows Forms Programming in C#&quot; Pin
Hmmkk6-Jun-05 11:01
Hmmkk6-Jun-05 11:01 
Generalconfusing Pin
ursus zeta7-Jun-05 8:16
ursus zeta7-Jun-05 8:16 
GeneralRe: confusing Pin
Hmmkk7-Jun-05 11:43
Hmmkk7-Jun-05 11:43 
Generaltoo much info Pin
ursus zeta10-Jun-05 10:50
ursus zeta10-Jun-05 10:50 
General3 occurences of error C2039 Pin
joseph19503-Jun-05 4:36
joseph19503-Jun-05 4:36 
GeneralRe: 3 occurences of error C2039 Pin
toxcct5-Jun-05 3:33
toxcct5-Jun-05 3:33 
GeneralRe: 3 occurences of error C2039 Pin
joseph19506-Jun-05 2:52
joseph19506-Jun-05 2:52 
GeneralRe: 3 occurences of error C2039 Pin
toxcct6-Jun-05 2:57
toxcct6-Jun-05 2:57 
GeneralRe: 3 occurences of error C2039 Pin
joseph19506-Jun-05 7:38
joseph19506-Jun-05 7:38 
Generalremoving variable Pin
joseph19503-Jun-05 2:56
joseph19503-Jun-05 2:56 
GeneralRe: removing variable Pin
toxcct3-Jun-05 3:33
toxcct3-Jun-05 3:33 
GeneralRe: removing variable Pin
joseph19503-Jun-05 4:15
joseph19503-Jun-05 4:15 
GeneralLabel Text problems Pin
Hmmkk2-Jun-05 8:34
Hmmkk2-Jun-05 8:34 
GeneralRe: Label Text problems Pin
Christian Graus2-Jun-05 10:02
protectorChristian Graus2-Jun-05 10:02 
GeneralRe: Label Text problems Pin
Hmmkk2-Jun-05 10:25
Hmmkk2-Jun-05 10:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.