Click here to Skip to main content
16,011,868 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: I have alittle problem(so I hope) in my code . Please try help me !!!!! Pin
Ben Burnett20-Jun-01 10:08
Ben Burnett20-Jun-01 10:08 
GeneralForm Resizing in SDI app. Pin
Fady Elias20-Jun-01 7:53
Fady Elias20-Jun-01 7:53 
QuestionMultiple application icons? Pin
Chris Losinger20-Jun-01 7:39
professionalChris Losinger20-Jun-01 7:39 
AnswerRe: Multiple application icons? Pin
Tomasz Sowinski20-Jun-01 8:56
Tomasz Sowinski20-Jun-01 8:56 
Questionin- or out-of-process ? Pin
20-Jun-01 6:17
suss20-Jun-01 6:17 
AnswerRe: in- or out-of-process ? Pin
20-Jun-01 15:38
suss20-Jun-01 15:38 
QuestionWriteFile problem??? Pin
20-Jun-01 5:41
suss20-Jun-01 5:41 
GeneralMultiLine and Owner Drawn Control Pin
20-Jun-01 4:14
suss20-Jun-01 4:14 
I have created a button control that has an Enable property. I also have a MultiLine property. When the button's Enable property is set to false, the image (caption in this case) is embossed.

// Now draw the caption
if (NewState & ODS_DISABLED)
{
// BUG with multiline when the button is disabled
CPoint pt = CPoint(ClientRect.left, ClientRect.top);
CSize NewcsSize = pDC->GetTextExtent(NewCaption);
pDC->DrawState(pt, NewcsSize, NewCaption, DSS_DISABLED, TRUE, 0, (HBRUSH)NULL);
}
else
{
pDC->SetTextColor (GetSysColor(COLOR_BTNTEXT));
pDC->DrawText (NewCaption, &ClientRect, DT_WORDBREAK);
}

This works fine until I set the MultiLine property to true. The Caption is still embossed, but instead of breaking the word I get the '|' symbol where the wordbreak should be. Of course MultiLine works fine if the Enable property is set to true. Does anyone know what I am doing wrong here? I am using DrawSate if the button is disabled and DrawText if it is enabled. Any suggestions would be great.
GeneralCommand Line problems Pin
20-Jun-01 4:09
suss20-Jun-01 4:09 
GeneralRe: Command Line problems Pin
Chris Losinger20-Jun-01 4:38
professionalChris Losinger20-Jun-01 4:38 
GeneralRe: Command Line problems Pin
Carlos Antollini20-Jun-01 4:48
Carlos Antollini20-Jun-01 4:48 
GeneralRe: Command Line problems Pin
20-Jun-01 5:04
suss20-Jun-01 5:04 
GeneralRe: Command Line problems Pin
Chris Losinger20-Jun-01 5:10
professionalChris Losinger20-Jun-01 5:10 
GeneralRe: Command Line problems Pin
20-Jun-01 5:24
suss20-Jun-01 5:24 
GeneralRe: Command Line problems Pin
Chris Losinger20-Jun-01 7:38
professionalChris Losinger20-Jun-01 7:38 
GeneralProblems using functions in structs in MSVC++ Pin
Jason Hihn20-Jun-01 3:52
Jason Hihn20-Jun-01 3:52 
GeneralRe: Problems using functions in structs in MSVC++ Pin
Dark Angel20-Jun-01 4:08
Dark Angel20-Jun-01 4:08 
GeneralRe: Problems using functions in structs in MSVC++ Pin
Jason Hihn20-Jun-01 7:00
Jason Hihn20-Jun-01 7:00 
GeneralRe: Problems using functions in structs in MSVC++ Pin
Ben Burnett20-Jun-01 7:32
Ben Burnett20-Jun-01 7:32 
GeneralRe: Problems using functions in structs in MSVC++ Pin
Jason Hihn20-Jun-01 8:21
Jason Hihn20-Jun-01 8:21 
GeneralMy documents directory Pin
jerry0davis20-Jun-01 3:37
jerry0davis20-Jun-01 3:37 
GeneralRe: My documents directory Pin
Matt Gullett20-Jun-01 3:44
Matt Gullett20-Jun-01 3:44 
GeneralRe: My documents directory Pin
jerry0davis20-Jun-01 3:48
jerry0davis20-Jun-01 3:48 
QuestionGetWindowLong????? Pin
20-Jun-01 3:00
suss20-Jun-01 3:00 
Generalsimple array question Pin
20-Jun-01 2:44
suss20-Jun-01 2:44 

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.