|
++ DirectX 9
C++ Microsoft Visual Studio 2008
|
|
|
|
|
|
C++ DirectX
9
Microsoft Visual Studio 2005 2008
( ),
DirectX SDK 9 , - DirectX SDK August 2008.
|
|
|
|
|
|
[]
[] [ ] |
|
|
|
|
|
C++ Microsoft
Visual Studio 2008 |
|
|
|
|
|
- [ ], [
], [ ]
,
directx Microsoft Visual Studio 2008 -
,
|
|
|
|
|
|
:
:
(label).
.
:
label ?
: , Text
Form1.h
private:
System::Void button1_Click(System::Object^ sender, System::EventArgs^
e) {
//int i = 0;
//MessageBox::Show("Hello, World!");
//Sender.Text = "1";
button1->Text = "1";
}
,
- :
1 |
|
|
|
|
|
?
itow
( int Unicode)
.Net Framework - System::Convert::ToString
private:
System::Void button1_Click(System::Object^ sender, System::EventArgs^
e) {
int i = 0;
button1->Text = Convert::ToString(i);
} |
|
|
|
|
|
0 !
C++ |
|
|
|
|
|
-
,
- , , ,
,
+, -, *, /, =
: , ,
, =
|
|
|
|
|
|
- Button (5 ),
TextBox
( Name Properties),
plus_button,
minus_button, mult_button, div_button, result_button, EnterFieldtextBox
Text +, -, *, /, = |
|
|
|
|
|
|
|
|
|
|
|
- + * /
(x),
(code_op), =
(y), (res)
|
|
|
|
|
|
x, y, res code_op
- Clear |
|
|
|
|
|
Windows Forms MSVS 2008
Delphi 7!
Say Hello. MSVS ?
. Delphi
-
. MSVS
2008 . MSVS
Delphi 7. ,
Form1.h.
, .
Delphi 7 *.dfm
,
Windows Forms Microsoft
Delphi. ? |
|
|
|
|
|
private:
static int x, y, res, code_op; |
|
|
|
|
|
(
HelloWorldCLR) - |
|
|
|
|
|
private:
System::Void plus_button_Click(System::Object^ sender, System::EventArgs^
e) { |
|
|
//
EnterFieldtextBox
x = Convert::ToInt32(EnterFieldtextBox->Text);
//
code_op = 1;
|
|
|
} |
|
|
private:
System::Void clear_button_Click(System::Object^ sender, System::EventArgs^
e) { |
|
|
x
= 0;
y = 0;
res = 0;
code_op = 0;
EnterFieldtextBox->Text = "0";
|
|
|
} |
|
|
private:
System::Void result_button_Click(System::Object^ sender, System::EventArgs^
e) { |
|
|
//
y = Convert::ToInt32(EnterFieldtextBox->Text);
//
switch (code_op)
{
case 1:
|
|
|
res
= x + y;
break;
|
|
|
case
2:
|
|
|
res
= x - y;
break;
|
|
|
case
3:
|
|
|
res
= x * y;
break;
|
|
|
case
4:
|
|
|
if
(y != 0)
res = x / y;
break;
|
|
|
default:
;
|
|
|
}
//
EnterFieldtextBox->Text = Convert::ToString(res);
|
|
|
} |
|
|
private:
System::Void minus_button_Click(System::Object^ sender, System::EventArgs^
e) { |
|
|
//
EnterFieldtextBox
x = Convert::ToInt32(EnterFieldtextBox->Text);
//
code_op = 2;
|
|
|
} |
|
|
private:
System::Void mult_button_Click(System::Object^ sender, System::EventArgs^
e) { |
|
|
//
EnterFieldtextBox
x = Convert::ToInt32(EnterFieldtextBox->Text);
//
code_op = 3;
|
|
|
} |
|
|
private:
System::Void div_button_Click(System::Object^ sender, System::EventArgs^
e) { |
|
|
//
EnterFieldtextBox
x = Convert::ToInt32(EnterFieldtextBox->Text);
//
code_op = 4;
|
|
|
} |
|
|
|
|
|
, |
|
|
|
|
|
,
, - |
|
|
|
|
|
|
|
|
|
|
|
, ,
, ,
, .
clear x, y, res, code_op
"0" Text EnterFieldtextBox
!!! .. MSVS C++
(/),
, !
..
- ReS
ReS, res Res
RES !!!!!
, ++.
Delphi 7, MSVS
.
. |
|
|
|
|
|
C++ |
|
|
|
|
|
[]
[] [ ] |
|