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

C / C++ / MFC

 
GeneralRe: API Call to find the installed Default Email Client ?? Pin
Robert Palma Jr.17-Jun-05 10:07
Robert Palma Jr.17-Jun-05 10:07 
GeneralRe: API Call to find the installed Default Email Client ?? Pin
David Crow17-Jun-05 10:13
David Crow17-Jun-05 10:13 
GeneralRe: API Call to find the installed Default Email Client ?? Pin
Robert Palma Jr.17-Jun-05 10:54
Robert Palma Jr.17-Jun-05 10:54 
GeneralRe: API Call to find the installed Default Email Client ?? Pin
David Crow17-Jun-05 17:02
David Crow17-Jun-05 17:02 
GeneralMessage Box Pin
Anonymous17-Jun-05 5:53
Anonymous17-Jun-05 5:53 
GeneralRe: Message Box Pin
RChin17-Jun-05 5:59
RChin17-Jun-05 5:59 
GeneralRe: Message Box Pin
Anonymous17-Jun-05 6:04
Anonymous17-Jun-05 6:04 
GeneralRe: Message Box Pin
Ravi Bhavnani17-Jun-05 6:22
professionalRavi Bhavnani17-Jun-05 6:22 
Here you go. Smile | :)
<code>//! Wraps a string at a user specified boundary and and stores
//! each individual line in a CStringArray.
//! @param  strString   The string to be wrapped.
//! @param  nWrap       Wrap margin.
//! @param  lines       Collection of wrapped lines.</code>
void wrapString
  (CString strString,
   int nWrap,
   CStringArray& lines)
{
  int nStart = 0;
  int nEnd = 0;
  do {
 
    <code>// Determine boundaries of next line</code>
    nEnd = nStart + nWrap;
    if (nEnd >= strString.GetLength())
       nEnd = strString.GetLength() - 1;
 
    <code>// If we're not at the end of the string, make sure we're
    // at a word break</code>
    if (nEnd != strString.GetLength() - 1)
       while ((nEnd >= 0) && (strString.GetAt (nEnd) != _T(' ')))
             nEnd--;
 
    <code>// Extract the next line</code>
    CString strNextLine;
    if ((nEnd - nStart) > 0) {
       strNextLine = strString.Mid (nStart, (nEnd - nStart) + 1);
       strNextLine.TrimLeft();
       strNextLine.TrimRight();
       lines.Add (strNextLine);
    }
 
    <code>// Set the start of the next boundary</code>
    nStart = nEnd + 1;
 
  } while (nStart < strString.GetLength());
  return;
/ravi

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

GeneralRe: Message Box Pin
ryuki17-Jun-05 6:58
ryuki17-Jun-05 6:58 
GeneralRe: Message Box Pin
Ravi Bhavnani17-Jun-05 7:27
professionalRavi Bhavnani17-Jun-05 7:27 
GeneralRe: Message Box Pin
James R. Twine17-Jun-05 7:33
James R. Twine17-Jun-05 7:33 
GeneralRe: Message Box Pin
Ravi Bhavnani17-Jun-05 7:37
professionalRavi Bhavnani17-Jun-05 7:37 
GeneralCHTMLView Flicker on resize Pin
HaraldS17-Jun-05 5:48
HaraldS17-Jun-05 5:48 
GeneralRe: CHTMLView Flicker on resize Pin
Shog917-Jun-05 11:57
sitebuilderShog917-Jun-05 11:57 
GeneralProcessWindowMessage and lResult Pin
McClamm17-Jun-05 5:13
McClamm17-Jun-05 5:13 
GeneralRe: ProcessWindowMessage and lResult Pin
Blake Miller17-Jun-05 6:46
Blake Miller17-Jun-05 6:46 
GeneralRe: ProcessWindowMessage and lResult Pin
McClamm17-Jun-05 6:53
McClamm17-Jun-05 6:53 
GeneralHook GDI functions Pin
xhzxlqt17-Jun-05 5:05
xhzxlqt17-Jun-05 5:05 
GeneralRe: Hook GDI functions Pin
David Crow17-Jun-05 5:19
David Crow17-Jun-05 5:19 
GeneralRe: Hook GDI functions Pin
xhzxlqt17-Jun-05 14:13
xhzxlqt17-Jun-05 14:13 
GeneralRe: Hook GDI functions Pin
David Crow20-Jun-05 2:31
David Crow20-Jun-05 2:31 
QuestionBest way To Do? Pin
Pazzuzu17-Jun-05 5:00
Pazzuzu17-Jun-05 5:00 
AnswerRe: Best way To Do? Pin
ryuki17-Jun-05 7:14
ryuki17-Jun-05 7:14 
GeneralRe: Best way To Do? Pin
Pazzuzu19-Jun-05 20:15
Pazzuzu19-Jun-05 20:15 
Generalusing image scanner in a programe Pin
Ghasrfakhri17-Jun-05 4:21
Ghasrfakhri17-Jun-05 4:21 

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.