Click here to Skip to main content
15,914,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Some stupid question.. Pin
JohnCz13-Mar-05 13:22
JohnCz13-Mar-05 13:22 
GeneralRe: Some stupid question.. Pin
Romashki15-Mar-05 7:41
Romashki15-Mar-05 7:41 
GeneralRe: Some stupid question.. Pin
JohnCz18-Mar-05 5:44
JohnCz18-Mar-05 5:44 
GeneralRe: Some stupid question.. Pin
Romashki18-Mar-05 9:45
Romashki18-Mar-05 9:45 
GeneralRect Value AGAIN!!!!!!! Pin
13-Mar-05 11:26
suss13-Mar-05 11:26 
GeneralRe: Rect Value AGAIN!!!!!!! Pin
Ravi Bhavnani13-Mar-05 11:35
professionalRavi Bhavnani13-Mar-05 11:35 
GeneralRe: Rect Value AGAIN!!!!!!! Pin
gdocherty13-Mar-05 13:28
gdocherty13-Mar-05 13:28 
GeneralWord wrap puzzle Pin
Ravi Bhavnani13-Mar-05 11:24
professionalRavi Bhavnani13-Mar-05 11:24 
Admission of guilt
This is a shameless ploy to get my fellow CPians help this sleep deprived developer meet yet another (self-imposed) insanely aggressive deadline.


Anyone care to provide the implementation of (or a pointer to) this word wrap method?

//! Wraps a line of text at (or before) a specified boundary.
//! The line is guaranteed to be non empty and contain words
//! separated by one or more space characters.
//! @param strText  Line to be wrapped.
//! @param nWrap    Wrap boundary.
//! @param lines    Array to receive collection of wrapped lines.
void wordWrap
  (CString strText,
   int nWrap,
   CPtrArray& lines);
Example:
CString strText = "The quick brown fox jumps over the lazy dog";
CPtrArray lines;
wordWrap (strText, 17, lines);
ASSERT (lines.GetSize() == 3);
ASSERT (lines[0] == "The quick brown");
ASSERT (lines[1] == "fox jumps over");
ASSERT (lines[2] == "the lazy dog");
Many thanks! Rose | [Rose]

/ravi

My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com

GeneralRe: Word wrap puzzle Pin
Graham Bradshaw13-Mar-05 11:51
Graham Bradshaw13-Mar-05 11:51 
GeneralRe: Word wrap puzzle Pin
Ravi Bhavnani13-Mar-05 13:13
professionalRavi Bhavnani13-Mar-05 13:13 
GeneralRe: Clarification Pin
PJ Arends13-Mar-05 11:56
professionalPJ Arends13-Mar-05 11:56 
GeneralRe: Clarification Pin
PJ Arends13-Mar-05 12:43
professionalPJ Arends13-Mar-05 12:43 
GeneralRe: Clarification Pin
Ravi Bhavnani13-Mar-05 13:12
professionalRavi Bhavnani13-Mar-05 13:12 
GeneralRe: Clarification Pin
Ravi Bhavnani24-Mar-05 4:14
professionalRavi Bhavnani24-Mar-05 4:14 
GeneralRe: Clarification Pin
Ravi Bhavnani13-Mar-05 12:57
professionalRavi Bhavnani13-Mar-05 12:57 
QuestionNetwork problem? Pin
dSolariuM13-Mar-05 10:11
dSolariuM13-Mar-05 10:11 
AnswerRe: Network problem? Pin
Ravi Bhavnani13-Mar-05 10:24
professionalRavi Bhavnani13-Mar-05 10:24 
GeneralComunications with Dialogs Pin
HackPrince13-Mar-05 6:08
HackPrince13-Mar-05 6:08 
GeneralRe: Comunications with Dialogs Pin
John R. Shaw13-Mar-05 6:25
John R. Shaw13-Mar-05 6:25 
GeneralRe: Comunications with Dialogs Pin
Ravi Bhavnani13-Mar-05 7:58
professionalRavi Bhavnani13-Mar-05 7:58 
GeneralFind the files in a folder Pin
Cedric Moonen13-Mar-05 6:00
Cedric Moonen13-Mar-05 6:00 
GeneralRe: Find the files in a folder Pin
Steve Mayfield13-Mar-05 6:03
Steve Mayfield13-Mar-05 6:03 
GeneralRe: Find the files in a folder Pin
Cedric Moonen13-Mar-05 6:08
Cedric Moonen13-Mar-05 6:08 
GeneralRe: Find the files in a folder Pin
John R. Shaw13-Mar-05 6:31
John R. Shaw13-Mar-05 6:31 
QuestionHow to get Rect value ????? HELP !!!! Pin
13-Mar-05 5:39
suss13-Mar-05 5:39 

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.