Click here to Skip to main content
15,921,884 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSetWindowRgn With CButton Pin
nlecren1-Jul-03 3:47
nlecren1-Jul-03 3:47 
GeneralRe: SetWindowRgn With CButton Pin
basementman1-Jul-03 4:53
basementman1-Jul-03 4:53 
GeneralRe: SetWindowRgn With CButton Pin
nlecren1-Jul-03 10:57
nlecren1-Jul-03 10:57 
GeneralRe: SetWindowRgn With CButton Pin
basementman1-Jul-03 11:57
basementman1-Jul-03 11:57 
QuestionGetBuffer?? ReleaseBuffer?? Pin
skinnyreptile1-Jul-03 3:30
skinnyreptile1-Jul-03 3:30 
AnswerRe: GetBuffer?? ReleaseBuffer?? Pin
David Crow1-Jul-03 3:48
David Crow1-Jul-03 3:48 
GeneralRe: GetBuffer?? ReleaseBuffer?? Pin
skinnyreptile1-Jul-03 4:28
skinnyreptile1-Jul-03 4:28 
GeneralRe: GetBuffer?? ReleaseBuffer?? Pin
David Crow1-Jul-03 6:03
David Crow1-Jul-03 6:03 
Read the documentation carefully. Note the requirement that the first word of the buffer must specify the maximum number of bytes that can be copied into the buffer. You need something like:

int i, nLineLength, nLineCount;
char szBuffer[64];

nLineCount = m_edit.GetLineCount();

for (i=0;i < nLineCount ;i++)
{
    nLineLength = m_edit.LineLength(i);

    m_edit.GetLine(i, szBuffer, nLineLength);

    szBuffer[nLineLength] = '\0';

    TRACE("%s\n", szBuffer);
}

or

int i, nLineLength, nLineCount;
char szBuffer[64];

nLineCount = m_edit.GetLineCount();

for (i=0;i < nLineCount ;i++)
{
    nLineLength = m_edit.LineLength(i);

    *((int *) szBuffer) = nLineLength;

    m_edit.GetLine(i, szBuffer);

    szBuffer[nLineLength] = '\0';

    TRACE("%s\n", szBuffer);
}

AnswerRe: GetBuffer?? ReleaseBuffer?? Pin
Ryan Binns1-Jul-03 5:13
Ryan Binns1-Jul-03 5:13 
GeneralRe: GetBuffer?? ReleaseBuffer?? Pin
skinnyreptile1-Jul-03 5:34
skinnyreptile1-Jul-03 5:34 
AnswerRe: GetBuffer?? ReleaseBuffer?? Pin
Joan M1-Jul-03 5:44
professionalJoan M1-Jul-03 5:44 
GeneralRe: GetBuffer?? ReleaseBuffer?? Pin
skinnyreptile1-Jul-03 5:51
skinnyreptile1-Jul-03 5:51 
AnswerRe: GetBuffer?? ReleaseBuffer?? Pin
Kelly Herald1-Jul-03 6:43
Kelly Herald1-Jul-03 6:43 
GeneralRe: GetBuffer?? ReleaseBuffer?? Pin
skinnyreptile1-Jul-03 6:45
skinnyreptile1-Jul-03 6:45 
General?? displaying data Pin
shirleyLo1-Jul-03 3:09
shirleyLo1-Jul-03 3:09 
GeneralRe: ?? displaying data Pin
Joan M1-Jul-03 5:49
professionalJoan M1-Jul-03 5:49 
GeneralRe: Window styles Pin
Ravi Bhavnani1-Jul-03 3:15
professionalRavi Bhavnani1-Jul-03 3:15 
GeneralAllocating memory for a multidimensionnal array Pin
Jerome Conus1-Jul-03 1:54
Jerome Conus1-Jul-03 1:54 
GeneralRe: Allocating memory for a multidimensionnal array Pin
Ryan Binns1-Jul-03 2:10
Ryan Binns1-Jul-03 2:10 
GeneralRe: Allocating memory for a multidimensionnal array Pin
Jerome Conus1-Jul-03 2:12
Jerome Conus1-Jul-03 2:12 
GeneralRe: Allocating memory for a multidimensionnal array Pin
Ryan Binns1-Jul-03 2:24
Ryan Binns1-Jul-03 2:24 
General.doc to .txt Pin
martin_j1-Jul-03 1:54
martin_j1-Jul-03 1:54 
GeneralRe: .doc to .txt Pin
David Crow1-Jul-03 3:20
David Crow1-Jul-03 3:20 
GeneralRe: .doc to .txt Pin
martin_j1-Jul-03 3:43
martin_j1-Jul-03 3:43 
GeneralAbout PINT Pin
FlyingDancer1-Jul-03 1:51
FlyingDancer1-Jul-03 1:51 

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.