( Index )

Brief Information about the October '12 CSIG Meeting


Topic "Latest Microsoft Compilers and Tools" - Meeting Cancelled

by Bruce Arnold

Welcome to the CSIG, a Special Interest Group of the ACGNJ. This is an exciting time for the C Language programming since Microsoft now has 4 different language compilers: C++, C++ Express, C-Sharp, and C-Sharp Express. These are all capable of creating Windows (tm) programs. (Some are FREE!)

This month's regularly scheduled meeting of the Windows C++ Special Interest Group (CSIG) has been cancelled.  The next meeting will be November 20th. Be sure to bring your programming questions at that time.

As a homework assignment for those interested, be sure to download and install the latest free MS compiler. I have heard rumors that this will compile Windows 8 applications too. Microsoft has released the 2012 edition of Visual Studio Express for Windows Desktop. This is a free download and includes C#, Visual Basic, and C++.  http://www.microsoft.com/visualstudio/eng/downloads

There are a number of ways to refer to Microsoft's latest compilers and code. Here's what Wikipedia says: The Common Language Infrastructure (CLI) is an open specification developed by Microsoft that describes the executable code and runtime environment that form the core of the Microsoft .NET Framework. The specification defines an environment that allows multiple high-level languages to be used on different computer platforms without being rewritten for specific architectures.

Microsoft .Net Framework 3.5, etc.
C++ 9.0, etc.
.Net 3.5, etc.
Common Language Infrastructure

Sample Code

// // Paint Message Handler // private: System::Void Form1_Paint(System::Object^ sender, System::Windows::Forms::PaintEventArgs^ e) { e; sender; // avoid unreferenced parameter error message during compilation. Rectangle windowRect = ClientRectangle; // Get size of window. Graphics ^g = e->Graphics; g->FillEllipse(BalloonBrush, // Fill the whole balloon with color BalloonCenter.X - BalloonRadius, BalloonCenter.Y - BalloonRadius, 2 * BalloonRadius, 2 * BalloonRadius); g->DrawEllipse(Pens::Black, // Draw a black line around it. BalloonCenter.X - BalloonRadius, BalloonCenter.Y - BalloonRadius, 2 * BalloonRadius, 2 * BalloonRadius); g->DrawEllipse(Pens::White, // Draw a white line around it. BalloonCenter.X - BalloonRadius - 1, BalloonCenter.Y - BalloonRadius - 1, 2 * BalloonRadius + 2, 2 * BalloonRadius + 2); Drawing::Font ^mFont = gcnew Drawing::Font("Arial", 24, Drawing::FontStyle::Bold); String ^mString = gcnew String("Catch Me!"); Drawing::SizeF mFontSize = g->MeasureString(mString,mFont); g->DrawString(mString, mFont, Brushes::Yellow, (float)BalloonCenter.X-(mFontSize.Width/2), (float)BalloonCenter.Y-(mFontSize.Height/2) ); } // // Randomize the center of the balloon // Point Form1_GetRandPoint(Rectangle rr) { Point pp; if ((rr.Right - rr.Left) < 1 || (rr.Bottom - rr.Top) < 1) { pp.X; pp.Y = 0; return pp; // trap potential divide by zero } pp.X = rr.Left + pRand->Next(rr.Right - rr.Left); pp.Y = rr.Top + pRand->Next(rr.Bottom - rr.Top); return pp; } // // Randomize the color of the Balloon to descrete values. // Color Form1_GetRandColor() { int arg[3]; arg[0] = 0; arg[1] = 128; arg[2] = 192; int alpha[3]; alpha[0] = 0xEF; alpha[1] = 0xF0; alpha[2] = 0xFF; return Color::FromArgb( alpha[2], // leave alpha solid. arg[pRand->Next(3)], arg[pRand->Next(3)], arg[pRand->Next(3)] ); }


Source Code Files

For help, email me at b a r n o l d @ i e e e . o r g
Back to C++ Main Page