Click here to Skip to main content
15,891,712 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CPU Usage Pin
David Crow3-Mar-10 3:06
David Crow3-Mar-10 3:06 
Questionto change user name of windows Pin
zon_cpp2-Mar-10 23:15
zon_cpp2-Mar-10 23:15 
AnswerRe: to change user name of windows Pin
Rajesh R Subramanian2-Mar-10 23:31
professionalRajesh R Subramanian2-Mar-10 23:31 
QuestionSetting a CToolBar Button's Label to take multiple lines of text Pin
David Ferreira2-Mar-10 22:54
David Ferreira2-Mar-10 22:54 
AnswerRe: Setting a CToolBar Button's Label to take multiple lines of text Pin
KarstenK2-Mar-10 23:43
mveKarstenK2-Mar-10 23:43 
GeneralRe: Setting a CToolBar Button's Label to take multiple lines of text Pin
David Ferreira2-Mar-10 23:54
David Ferreira2-Mar-10 23:54 
GeneralRe: Setting a CToolBar Button's Label to take multiple lines of text Pin
KarstenK3-Mar-10 0:36
mveKarstenK3-Mar-10 0:36 
GeneralRe: Setting a CToolBar Button's Label to take multiple lines of text Pin
David Ferreira3-Mar-10 1:14
David Ferreira3-Mar-10 1:14 
I used the wrong slash in the reply i apologize but i'm assuming you mean in the CString so what i meant in the replay is that i mistakenly used \r instead of \n in the CString.

so in
strButtonText.Replace(" ","\n");
SetButtonText( nIndex, strButtonText);


Where CString strButtonText is the CString destine for the label of the button
I originally had = "Customer Details"
After Replace i have "Customer\nDetails"
So i'm sending "Customer\nDetails" to the label, however i'm just getting "Customer" and the "Details" part of the string is missing instead of appearing on the next line.
If i Omit:
bar.SetMaxTextRows(3);
DWORD dwSIZE = bar.SetDrawTextFlags( 0xffffffff,  DT_WORDBREAK|DT_CENTER|DT_MODIFYSTRING );


I get "CustomerDetails"(no space) in the label after replacing the space with a \n in the string. So the \n from the CString is ignored like it would be in a normal button with its multiline text property were set to false.

Basically it seems as though the text is going to the next line but not visable even thought the buttons size is greater than that of the text.

Sorry if i'm missing your point but i've never used \n anywhere but in a string and strButton is the only string there which as mentioned at the time of going to the label contains a \n should it have originally contained a space. The DT_WORDBREAK also treats a space as a \n when the text is 2 long to fit on one line.(at least that is what i'm led to believe.)

Thank you again for the response i get one step closer to the solution with every one Smile | :)
GeneralRe: Setting a CToolBar Button's Label to take multiple lines of text Pin
KarstenK3-Mar-10 1:30
mveKarstenK3-Mar-10 1:30 
QuestionHow to compute Islamic prayer time everyday? [modified] Pin
fantasy12152-Mar-10 21:41
fantasy12152-Mar-10 21:41 
AnswerRe: How to compute Islamic prayer time everyday? Pin
Rajesh R Subramanian2-Mar-10 22:47
professionalRajesh R Subramanian2-Mar-10 22:47 
QuestionRe: How to compute Islamic prayer time everyday? Pin
David Crow3-Mar-10 3:14
David Crow3-Mar-10 3:14 
AnswerRe: How to compute Islamic prayer time everyday? Pin
fantasy12153-Mar-10 16:23
fantasy12153-Mar-10 16:23 
GeneralRe: How to compute Islamic prayer time everyday? Pin
Game-point3-Mar-10 19:05
Game-point3-Mar-10 19:05 
QuestionMFC Drag & Drop Between two Tree control [modified] Pin
vkpMark2-Mar-10 20:39
vkpMark2-Mar-10 20:39 
AnswerRe: MFC Drag & Drop Between two Tree control [modified] Pin
SandipG 2-Mar-10 21:14
SandipG 2-Mar-10 21:14 
GeneralRe: MFC Drag & Drop Between two Tree control Pin
vkpMark2-Mar-10 21:50
vkpMark2-Mar-10 21:50 
GeneralRe: MFC Drag & Drop Between two Tree control Pin
vkpMark3-Mar-10 0:37
vkpMark3-Mar-10 0:37 
QuestionwxWidgets and themes Pin
zqueezy2-Mar-10 19:50
zqueezy2-Mar-10 19:50 
QuestionHow To Serailize collection class object Pin
adityarao312-Mar-10 19:45
adityarao312-Mar-10 19:45 
AnswerRe: How To Serailize collection class object Pin
Eugen Podsypalnikov2-Mar-10 20:41
Eugen Podsypalnikov2-Mar-10 20:41 
QuestionAT commands gives +CMS Error: 303 for Sony Ericssion Phones. Pin
Le@rner2-Mar-10 19:01
Le@rner2-Mar-10 19:01 
AnswerRe: AT commands gives +CMS Error: 303 for Sony Ericssion Phones. Pin
Roger Stoltz3-Mar-10 2:04
Roger Stoltz3-Mar-10 2:04 
GeneralRe: AT commands gives +CMS Error: 303 for Sony Ericssion Phones. Pin
Le@rner3-Mar-10 17:09
Le@rner3-Mar-10 17:09 
GeneralRe: AT commands gives +CMS Error: 303 for Sony Ericssion Phones. Pin
Roger Stoltz3-Mar-10 21:17
Roger Stoltz3-Mar-10 21:17 

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.