Click here to Skip to main content
16,004,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHelp: Visual Studio 2005 - CString issues Pin
fasteddie2039-Oct-06 12:36
fasteddie2039-Oct-06 12:36 
AnswerRe: Help: Visual Studio 2005 - CString issues Pin
Mark Salsbery9-Oct-06 12:51
Mark Salsbery9-Oct-06 12:51 
GeneralRe: Help: Visual Studio 2005 - CString issues Pin
fasteddie2039-Oct-06 13:56
fasteddie2039-Oct-06 13:56 
GeneralRe: Help: Visual Studio 2005 - CString issues Pin
Mark Salsbery9-Oct-06 14:25
Mark Salsbery9-Oct-06 14:25 
GeneralRe: Help: Visual Studio 2005 - CString issues Pin
fasteddie2039-Oct-06 14:40
fasteddie2039-Oct-06 14:40 
QuestionOpenGL: How do I use idle func in Windows without using glutIdleFunc() Pin
scody9-Oct-06 12:30
scody9-Oct-06 12:30 
AnswerRe: OpenGL: How do I use idle func in Windows without using glutIdleFunc() Pin
El Corazon9-Oct-06 14:34
El Corazon9-Oct-06 14:34 
QuestionProblem using static solidbrush in GDI+ [modified] Pin
Stick^9-Oct-06 12:05
Stick^9-Oct-06 12:05 
If I setup a static variable like this:

[CODE]
// .h file
class DisplayLine
{
static SolidBrush s_solidBrush;
...
};
[/CODE]
and initialize it like this:
[CODE]
// .cpp file
SolidBrush DisplayLine::s_solidBrush(Color(255, 0, 255, 0));
[/CODE]
and then in the draw() routine do this:

[CODE]
void DisplayLine::Draw(Graphics *pGraphics)
{
// Draw the text
pGraphics->DrawString(buf, -1, &font_big, lineRect, &sFormat, &s_solidBrush);
}
[/CODE]

that the text will not draw due to the brush. Weird.

What am I doing wrong? Why is the brush not getting initialized?

I even tried adding this:

s_solidBrush.SetColor(Color(255, 0, 255, 0));

but that didn't help.




-- modified at 18:51 Monday 9th October, 2006
AnswerRe: Problem using static solidbrush in GDI+ Pin
Mark Salsbery9-Oct-06 12:19
Mark Salsbery9-Oct-06 12:19 
GeneralRe: Problem using static solidbrush in GDI+ Pin
Stick^9-Oct-06 12:26
Stick^9-Oct-06 12:26 
GeneralRe: Problem using static solidbrush in GDI+ Pin
Mark Salsbery9-Oct-06 12:46
Mark Salsbery9-Oct-06 12:46 
GeneralRe: Problem using static solidbrush in GDI+ Pin
Stick^9-Oct-06 12:50
Stick^9-Oct-06 12:50 
GeneralRe: Problem using static solidbrush in GDI+ Pin
Mark Salsbery9-Oct-06 12:56
Mark Salsbery9-Oct-06 12:56 
QuestionProblem with output redirect Pin
eusto9-Oct-06 11:13
eusto9-Oct-06 11:13 
AnswerRe: Problem with output redirect Pin
James R. Twine9-Oct-06 11:29
James R. Twine9-Oct-06 11:29 
GeneralRe: Problem with output redirect Pin
eusto9-Oct-06 12:06
eusto9-Oct-06 12:06 
AnswerRe: Problem with output redirect Pin
Mark Salsbery9-Oct-06 12:33
Mark Salsbery9-Oct-06 12:33 
GeneralRe: Problem with output redirect Pin
eusto9-Oct-06 22:30
eusto9-Oct-06 22:30 
AnswerRe: Problem with output redirect Pin
Naveen9-Oct-06 17:43
Naveen9-Oct-06 17:43 
QuestionWell like I said... Pin
Learn2LikeIt9-Oct-06 10:59
Learn2LikeIt9-Oct-06 10:59 
AnswerRe: Well like I said... Pin
led mike9-Oct-06 11:06
led mike9-Oct-06 11:06 
GeneralRe: Well like I said... Pin
Nibu babu thomas9-Oct-06 17:43
Nibu babu thomas9-Oct-06 17:43 
AnswerRe: Well like I said... Pin
Galatei10-Oct-06 2:50
Galatei10-Oct-06 2:50 
QuestionFunctions Pin
Learn2LikeIt9-Oct-06 10:54
Learn2LikeIt9-Oct-06 10:54 
AnswerRe: Functions Pin
Hamid_RT9-Oct-06 18:32
Hamid_RT9-Oct-06 18:32 

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.