Guess I was trying to make it simple, but the answer is dependent on the information.
My goal is to draw a test set of text on a GUI written using C++ d in Visual Studio.
That said I am also in a learning curve . I did some digging around before all this and found:
The generic form is:
After coping/ pasting in to my do- nothing program/window- just to make it easy - .this example does not make the connection between the arguments in the parenthesis of the function : DrawStringPointF(ByVal e As PaintEventArgs) and calling this function - DrawStringPointF(?).
void DrawString (
For whomever replies, Could you supply a complete set of code from top to bottom that just "puts text in a GUI" in C++ using Visual Studio. If I have complete set of code, then I can figure the link.I have been reading text pages forteh last 3 days and have had to slowly build programs becasue the authors do't give it all at once.
I am not asking for any help - seriously- but to show my entire problem. My other problem is reading a text file to display , sort, 3 ways and then redisplay.
The following code example is designed for use with Windows Forms, and it requires PaintEventArgs^e, which is a parameter of the Paint event handler. The code performs the following actions:
Creates a text string to draw.
Defines the font as Arial (16pt).
Creates a solid, black brush to draw with.
Creates a point for the upper-left corner at which to draw the text.
C++ Copy Code
void DrawStringPointF( PaintEventArgs^ e )
// Create string to draw.
String^ drawString = "Sample Text";
// Create font and brush.
System::Drawing::Font^ drawFont = gcnew System::Drawing::Font( "Arial",16 );
SolidBrush^ drawBrush = gcnew SolidBrush( Color::Black );
// Create point for upper-left corner of drawing.
PointF drawPoint = PointF(150.0F,150.0F);
// Draw string to screen.
e->Graphics->DrawString( drawString, drawFont, drawBrush, drawPoint );