Click here to Skip to main content
15,895,667 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerCross-post (2/3) Pin
Wendelius27-Oct-08 9:20
mentorWendelius27-Oct-08 9:20 
AnswerCP IGNORE THIS USER Pin
leckey27-Oct-08 10:01
leckey27-Oct-08 10:01 
Generaltetris source file. Pin
kwondaebong26-Oct-08 15:31
kwondaebong26-Oct-08 15:31 
GeneralRe: tetris source file. Pin
CPallini26-Oct-08 23:24
mveCPallini26-Oct-08 23:24 
GeneralRe: tetris source file. Pin
Rajesh R Subramanian27-Oct-08 19:58
professionalRajesh R Subramanian27-Oct-08 19:58 
QuestionRe: tetris source file. Pin
David Crow27-Oct-08 3:28
David Crow27-Oct-08 3:28 
AnswerRe: tetris source file. Pin
bolivar12328-Oct-08 2:42
bolivar12328-Oct-08 2:42 
QuestionSCI_GETTEXT - Scintilla, how do I get the text ? Pin
gabbana26-Oct-08 5:37
gabbana26-Oct-08 5:37 
Hi,

I am wondering how I can get the text from an scintilla text control ? This is my code, but the debugger says that data has a bad pointer and I have no text in it.

            TCHAR *data;
UINT nLength;
nLength = SendMessage(hWndEditor,SCI_GETLENGTH,0,0);

// allocate buffer;

memset(&data,0,sizeof(TCHAR)*nLength+1);

// get the data

data = (TCHAR*)SendMessage(hWndEditor, SCI_GETTEXT,nLength+1,0);

// show the data

MessageBox(NULL,data,L"MyApp",0);

// clear the buffer
free(data);


Thanks for help.

bye,
gabbana
QuestionRe: SCI_GETTEXT - Scintilla, how do I get the text ? [modified] Pin
CPallini26-Oct-08 7:50
mveCPallini26-Oct-08 7:50 
AnswerRe: SCI_GETTEXT - Scintilla, how do I get the text ? Pin
gabbana26-Oct-08 8:25
gabbana26-Oct-08 8:25 
GeneralRe: SCI_GETTEXT - Scintilla, how do I get the text ? Pin
CPallini26-Oct-08 8:45
mveCPallini26-Oct-08 8:45 
GeneralRe: SCI_GETTEXT - Scintilla, how do I get the text ? Pin
gabbana26-Oct-08 17:03
gabbana26-Oct-08 17:03 
GeneralRe: SCI_GETTEXT - Scintilla, how do I get the text ? Pin
SandipG 26-Oct-08 20:58
SandipG 26-Oct-08 20:58 
GeneralRe: SCI_GETTEXT - Scintilla, how do I get the text ? Pin
gabbana26-Oct-08 22:29
gabbana26-Oct-08 22:29 
GeneralRe: SCI_GETTEXT - Scintilla, how do I get the text ? [modified] Pin
SandipG 26-Oct-08 22:35
SandipG 26-Oct-08 22:35 
GeneralRe: SCI_GETTEXT - Scintilla, how do I get the text ? Pin
gabbana26-Oct-08 23:01
gabbana26-Oct-08 23:01 
GeneralRe: SCI_GETTEXT - Scintilla, how do I get the text ? Pin
gabbana27-Oct-08 20:28
gabbana27-Oct-08 20:28 
GeneralRe: SCI_GETTEXT - Scintilla, how do I get the text ? Pin
Larry Mills Sr30-Oct-08 7:48
Larry Mills Sr30-Oct-08 7:48 
QuestionHeader File: stdint.h Pin
bigdenny20026-Oct-08 3:44
bigdenny20026-Oct-08 3:44 
Questiondistinguish between physical drive and logical drive ? Pin
devider26-Oct-08 3:29
devider26-Oct-08 3:29 
QuestionMoveFile: Access denied ??? Pin
gabbana26-Oct-08 1:44
gabbana26-Oct-08 1:44 
AnswerRe: MoveFile: Access denied ??? Pin
Perspx26-Oct-08 1:51
Perspx26-Oct-08 1:51 
GeneralRe: MoveFile: Access denied ??? Pin
gabbana26-Oct-08 2:33
gabbana26-Oct-08 2:33 
GeneralRe: MoveFile: Access denied ??? Pin
Larry Mills Sr30-Oct-08 7:57
Larry Mills Sr30-Oct-08 7:57 
QuestionConvert Strings Pin
akshay.is.gr825-Oct-08 23:12
akshay.is.gr825-Oct-08 23:12 

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.