Click here to Skip to main content
15,916,378 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: problem with thread Pin
Ryan_Roberts22-Oct-03 12:02
Ryan_Roberts22-Oct-03 12:02 
GeneralSystem.SByte* is inaccessible... Pin
almogaver22-Oct-03 11:06
almogaver22-Oct-03 11:06 
QuestionArray of pointers on the heap? Pin
Rickard Andersson2022-Oct-03 9:07
Rickard Andersson2022-Oct-03 9:07 
AnswerRe: Array of pointers on the heap? Pin
David Crow22-Oct-03 9:22
David Crow22-Oct-03 9:22 
GeneralRe: Array of pointers on the heap? Pin
Rickard Andersson2022-Oct-03 9:26
Rickard Andersson2022-Oct-03 9:26 
GeneralRe: Array of pointers on the heap? Pin
Rickard Andersson2022-Oct-03 9:35
Rickard Andersson2022-Oct-03 9:35 
GeneralRe: Array of pointers on the heap? Pin
David Crow22-Oct-03 9:59
David Crow22-Oct-03 9:59 
GeneralRe: Array of pointers on the heap? Pin
Jeryth30-Oct-03 10:54
Jeryth30-Oct-03 10:54 
AnswerRe: Array of pointers on the heap? Pin
Nitron23-Oct-03 8:07
Nitron23-Oct-03 8:07 
GeneralSubclassing a CListCtrl derived class in CDialog Pin
b_girl22-Oct-03 8:56
b_girl22-Oct-03 8:56 
GeneralRe: Subclassing a CListCtrl derived class in CDialog Pin
Atlantys22-Oct-03 11:19
Atlantys22-Oct-03 11:19 
GeneralRe: Subclassing a CListCtrl derived class in CDialog Pin
b_girl23-Oct-03 3:20
b_girl23-Oct-03 3:20 
Generalanother question about command.com Pin
includeh1022-Oct-03 8:23
includeh1022-Oct-03 8:23 
Generalc++ and c# in .NET Pin
HudsonKane22-Oct-03 7:56
HudsonKane22-Oct-03 7:56 
GeneralRe: c++ and c# in .NET Pin
Ryan_Roberts22-Oct-03 11:55
Ryan_Roberts22-Oct-03 11:55 
GeneralRe: c++ and c# in .NET Pin
HudsonKane23-Oct-03 10:09
HudsonKane23-Oct-03 10:09 
GeneralUpdating a list box w/ progress data Pin
jimNLX22-Oct-03 7:30
jimNLX22-Oct-03 7:30 
GeneralRe: Updating a list box w/ progress data Pin
David Crow22-Oct-03 7:43
David Crow22-Oct-03 7:43 
QuestionHow to open a notepad file in a edit box Pin
Deepak Samuel22-Oct-03 6:05
Deepak Samuel22-Oct-03 6:05 
AnswerRe: How to open a notepad file in a edit box Pin
David Crow22-Oct-03 7:52
David Crow22-Oct-03 7:52 
I assume you mean "open a text file." Typically, .TXT files are associated with Notepad, but that is not always the case. So to say something is a Notepad file is meaningless at best.

If you are not using MFC, try something like:

HANDLE hFile = CreateFile(...);
if (INVALID_HANDLE_VALUE != hFile)
{
    DWORD dwSize;
    GetFileSize(hFile, &dwSize);
 
    char *Buffer;
    Buffer = new char[dwSize];
 
    ReadFile(hFile, Buffer, dwSize, ...);
 
    CloseHandle(hFile);
    
    SendMessage(hWnd, EM_SETTEXT, 0, Buffer);
}



Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?

GeneralRe: How to open a notepad file in a edit box Pin
Deepak Samuel22-Oct-03 8:42
Deepak Samuel22-Oct-03 8:42 
GeneralRe: How to open a notepad file in a edit box Pin
David Crow22-Oct-03 8:48
David Crow22-Oct-03 8:48 
GeneralRe: How to open a notepad file in a edit box Pin
Atlantys22-Oct-03 11:30
Atlantys22-Oct-03 11:30 
GeneralProblem with editbox Pin
Deepak Samuel22-Oct-03 6:03
Deepak Samuel22-Oct-03 6:03 
GeneralRe: Problem with editbox Pin
Ravi Bhavnani22-Oct-03 6:12
professionalRavi Bhavnani22-Oct-03 6: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.