3rd Tuesday of the month. 7:30PM - C/C++ Group, SPRS
Welcome to the CSIG, a Special Interest Group of the ACGNJ. This group is a "Special Interest Group" of the ACGNJ devoted to discussing programming languages in general and C, C++, and C++ for Windows programming in particular. Each month a small but hopefully useful program (complete with source code) is presented for discussion.
This month we will be reviewing the .NET programs that were discussed over the last 6 months using the latest Microsoft compilers. The programs may be compiled using the C++ .Net compiler included with Visual Studio 2005 as well as the free (!!!) C++ Express compiler. Additionally, since C++ has many similarities with C# or C-Sharp, these compilers may also be used with modifications to the source files. Microsoft provides a C-Sharp compiler with Visual Studio 2005 as well as the free (!!!) C-Sharp Express compiler. Be sure to bring questions about the code and the language.
Microsoft .NET Framework Version 2.0
This is a large package, about 24 Megs. Most people running updated versions of WinXP will already have it on their computer. If not, it may be downloaded from Microsoft.
Here's the download address for the Microsoft Framework:There are a number of ways to refer to this compiler and code.
At the meeting on Tuesday night we will be discussing these items and more.
Sample Code =========== // Paint the screen. Paint the screen. Paint the screen. private: System::Void Form1_OnPaint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e) { int topBalloon = -1; Rectangle windowRect = ClientRectangle; if (firstime) { Form1_InitBalloonArray(windowRect); firstime = false; } Graphics ^g = e->Graphics; for (int i = 0; i < MAXBALLOONS; i++) { if (pBaloonCenter[i]->X < 0) continue; SolidBrush^ balloonBrush = gcnew SolidBrush(*pBaloonColor[i]); g->FillEllipse(balloonBrush, (*pBaloonCenter[i]).X - *pBalloonRadius[i], (*pBaloonCenter[i]).Y - *pBalloonRadius[i], 2 * (*pBalloonRadius[i]), 2 * (*pBalloonRadius[i])); g->DrawEllipse(Pens::Black, (*pBaloonCenter[i]).X - *pBalloonRadius[i], (*pBaloonCenter[i]).Y - *pBalloonRadius[i], 2 * (*pBalloonRadius[i]), 2 * (*pBalloonRadius[i])); // ~balloonBrush(); or balloonBrush->Dispose(); topBalloon = i; } if (-1 != topBalloon) // Put a X in the center of the top balloon. { Pen ^ myBlackPen = gcnew Pen(Color::Black, 10); myBlackPen->StartCap = System::Drawing::Drawing2D::LineCap::Round; myBlackPen->EndCap = System::Drawing::Drawing2D::LineCap::Round; Pen ^ myWhitePen = gcnew Pen(Color::White, 5); myWhitePen->StartCap = System::Drawing::Drawing2D::LineCap::Round; myWhitePen->EndCap = System::Drawing::Drawing2D::LineCap::Round; g->DrawLine(myBlackPen, (*pBaloonCenter[topBalloon]).X - 10, (*pBaloonCenter[topBalloon]).Y - 10, (*pBaloonCenter[topBalloon]).X + 10, (*pBaloonCenter[topBalloon]).Y + 10); g->DrawLine(myBlackPen, (*pBaloonCenter[topBalloon]).X - 10, (*pBaloonCenter[topBalloon]).Y + 10, (*pBaloonCenter[topBalloon]).X + 10, (*pBaloonCenter[topBalloon]).Y - 10); g->DrawLine(myWhitePen, (*pBaloonCenter[topBalloon]).X - 10, (*pBaloonCenter[topBalloon]).Y - 10, (*pBaloonCenter[topBalloon]).X + 10, (*pBaloonCenter[topBalloon]).Y + 10); g->DrawLine(myWhitePen, (*pBaloonCenter[topBalloon]).X - 10, (*pBaloonCenter[topBalloon]).Y + 10, (*pBaloonCenter[topBalloon]).X + 10, (*pBaloonCenter[topBalloon]).Y - 10); //myBlackPen->Dispose(); //myWhitePen->Dispose(); } }