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

Managed C++/CLI

 
QuestionRe: Use C++ to make database application Pin
jingguangdadao28-Nov-06 1:56
jingguangdadao28-Nov-06 1:56 
GeneralRe: Use C++ to make database application Pin
George L. Jackson28-Nov-06 12:55
George L. Jackson28-Nov-06 12:55 
GeneralRe: Use C++ to make database application Pin
jingguangdadao29-Nov-06 3:55
jingguangdadao29-Nov-06 3:55 
AnswerRe: Use C++ to make database application Pin
Christian Graus18-Nov-06 14:18
protectorChristian Graus18-Nov-06 14:18 
GeneralRe: Use C++ to make database application Pin
jingguangdadao29-Nov-06 3:55
jingguangdadao29-Nov-06 3:55 
GeneralRe: Use C++ to make database application Pin
Christian Graus29-Nov-06 8:37
protectorChristian Graus29-Nov-06 8:37 
AnswerRe: Logger Pin
led mike16-Nov-06 5:17
led mike16-Nov-06 5:17 
QuestionInverted/changed textcolor when bar passes over Pin
zoleero15-Nov-06 15:36
zoleero15-Nov-06 15:36 
This is the OnPaint function in my progressbar-class:

virtual void OnPaint(System::Windows::Forms::PaintEventArgs^ e) override
{
Graphics^ g = e->Graphics;
SolidBrush^ brush = gcnew SolidBrush(progressBarColor);
float percent = (float)(value - minimum) / (float)(maximum - minimum);
Rectangle rect = this->ClientRectangle;

// Calculate area for drawing the progress.
rect.Width = (int)((float)rect.Width * percent);

// Draw the progress meter.
g->FillRectangle(brush, rect);

// Creating font for progresstext
System::Drawing::Font^ drawFont = this->Font;

// Creating brush
System::Drawing::Brush^ drawBrush = System::Drawing::Brushes::Black;

// Creating string format
System::Drawing::StringFormat^ strFormat = gcnew System::Drawing::StringFormat();

// Center text
strFormat->Alignment = StringAlignment::Center;
strFormat->LineAlignment = StringAlignment::Center;

// Drawing string on top of progressbar
g->DrawString(this->percentCompletedText,drawFont,drawBrush,this->ClientRectangle,strFormat);

// Draw a border around the control.
DrawBorder(g);

// Clean up.
delete brush;

// Can not use despose Graphics object when using DoubleBuffer
//delete g;
}

Now my progressbar have a percent completed written over it in black all the time. How do i get the color of the text to change or invert when the progressbar passes over it?? I have been looking around on the web for this task but I can't find other then MFC code in native C++. How is it done with managed C++ or C#??

AnswerRe: Inverted/changed textcolor when bar passes over Pin
Christian Graus15-Nov-06 15:50
protectorChristian Graus15-Nov-06 15:50 
QuestionRe: Inverted/changed textcolor when bar passes over Pin
zoleero16-Nov-06 3:32
zoleero16-Nov-06 3:32 
AnswerRe: Inverted/changed textcolor when bar passes over Pin
Christian Graus16-Nov-06 8:18
protectorChristian Graus16-Nov-06 8:18 
QuestionRe: Inverted/changed textcolor when bar passes over Pin
zoleero17-Nov-06 12:38
zoleero17-Nov-06 12:38 
AnswerRe: Inverted/changed textcolor when bar passes over Pin
Christian Graus17-Nov-06 12:42
protectorChristian Graus17-Nov-06 12:42 
QuestionRe: Inverted/changed textcolor when bar passes over Pin
zoleero19-Nov-06 18:10
zoleero19-Nov-06 18:10 
AnswerRe: Inverted/changed textcolor when bar passes over Pin
Christian Graus19-Nov-06 18:23
protectorChristian Graus19-Nov-06 18:23 
GeneralRe: Inverted/changed textcolor when bar passes over Pin
zoleero20-Nov-06 13:27
zoleero20-Nov-06 13:27 
GeneralRe: Inverted/changed textcolor when bar passes over Pin
Christian Graus20-Nov-06 13:31
protectorChristian Graus20-Nov-06 13:31 
QuestionProgressChanged not being called? Pin
Miro L15-Nov-06 8:54
Miro L15-Nov-06 8:54 
Questionak english very wellplease help me Pin
pedarebad15-Nov-06 0:12
pedarebad15-Nov-06 0:12 
AnswerRe: ak english very wellplease help me Pin
Christian Graus15-Nov-06 9:48
protectorChristian Graus15-Nov-06 9:48 
Questionfile conversion Pin
Shriya Kapoor14-Nov-06 22:17
Shriya Kapoor14-Nov-06 22:17 
AnswerRe: file conversion Pin
Christian Graus15-Nov-06 9:49
protectorChristian Graus15-Nov-06 9:49 
AnswerRe: Need Programs Pin
Bram van Kampen14-Nov-06 17:04
Bram van Kampen14-Nov-06 17:04 
Question[Message Deleted] Pin
abhiramsss14-Nov-06 12:56
abhiramsss14-Nov-06 12:56 
AnswerRe: #define Pin
Christian Graus14-Nov-06 13:19
protectorChristian Graus14-Nov-06 13:19 

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.