Click here to Skip to main content
15,904,153 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: XP theme visual c++ application Pin
#realJSOP16-Feb-07 3:33
professional#realJSOP16-Feb-07 3:33 
AnswerRe: XP theme visual c++ application Pin
#realJSOP16-Feb-07 8:31
professional#realJSOP16-Feb-07 8:31 
GeneralDynamically loading one dll from another dynamically loaded dll Pin
Johan Pretorius15-Feb-07 23:48
Johan Pretorius15-Feb-07 23:48 
GeneralRe: Dynamically loading one dll from another dynamically loaded dll Pin
Suresh H15-Feb-07 23:53
Suresh H15-Feb-07 23:53 
GeneralRe: Dynamically loading one dll from another dynamically loaded dll Pin
Johan Pretorius15-Feb-07 23:57
Johan Pretorius15-Feb-07 23:57 
GeneralRe: Dynamically loading one dll from another dynamically loaded dll Pin
Suresh H16-Feb-07 0:01
Suresh H16-Feb-07 0:01 
GeneralRe: Dynamically loading one dll from another dynamically loaded dll Pin
Blake Miller16-Feb-07 12:10
Blake Miller16-Feb-07 12:10 
QuestionList Box & Rich Edit box [modified] Pin
Suresh H15-Feb-07 23:03
Suresh H15-Feb-07 23:03 
Hello all,

I have List Box and rich edit box in my Dialog IDC_SLIST & IDC_FILECONT

List Box contains the text file names , When the user double click on the list box that file content should be displayed in the rich edit box.

Can u please tell me what all the changes I have to make and how to do the double click event in Api application ??

<br />
case WM_COMMAND:<br />
switch(LOWORD(wParam))<br />
{			    <br />
	case LBN_DBLCLK:<br />
       {<br />
HWND hwndListBox = GetDlgItem(hwnd, IDC_SLIST);<br />
int iCurSel =::SendMessage(hwndListBox,LB_GETCURSEL,0,0);<br />
TCHAR FName[25];<br />
SendMessage(hwndListBox,LB_GETTEXT,(WPARAM)iCurSel,(LPARAM)FName);<br />
				<br />
<br />
	CStdioFile file(FName, CFile::modeRead);<br />
		DWORD dwSize = file.GetLength();<br />
		char *pBuffer = new char[dwSize + 1];<br />
		UINT uRead = file.Read(pBuffer, dwSize);<br />
		pBuffer[uRead] = '\0';<br />
		file.Close();<br />
              <br />
               HWND hwndRichEdit   = GetDlgItem(hwnd, IDC_FILECONT);<br />
  	       SendMessage(hwndRichEdit,EM_SETTEXTMODE, pBuffer,0);<br />
	       delete [] pBuffer;<br />
}<br />
<br />
Thanking you,<br />
Suresh HC<br />
<br />
<br />



-- modified at 5:37 Friday 16th February, 2007
AnswerRe: List Box & Rich Edit box Pin
prasad_som15-Feb-07 23:14
prasad_som15-Feb-07 23:14 
GeneralRe: List Box &amp; Rich Edit box Pin
Suresh H15-Feb-07 23:26
Suresh H15-Feb-07 23:26 
GeneralRe: List Box &amp;amp; Rich Edit box Pin
Hamid_RT16-Feb-07 0:30
Hamid_RT16-Feb-07 0:30 
GeneralRe: List Box &amp;amp; Rich Edit box Pin
Suresh H16-Feb-07 0:34
Suresh H16-Feb-07 0:34 
GeneralRe: List Box & Rich Edit box Pin
Hamid_RT16-Feb-07 0:44
Hamid_RT16-Feb-07 0:44 
GeneralRe: List Box & Rich Edit box Pin
Suresh H16-Feb-07 0:53
Suresh H16-Feb-07 0:53 
GeneralRe: List Box & Rich Edit box Pin
Hamid_RT16-Feb-07 1:00
Hamid_RT16-Feb-07 1:00 
GeneralRe: List Box & Rich Edit box Pin
Suresh H16-Feb-07 1:08
Suresh H16-Feb-07 1:08 
GeneralRe: List Box & Rich Edit box Pin
prasad_som16-Feb-07 1:20
prasad_som16-Feb-07 1:20 
AnswerRe: List Box & Rich Edit box Pin
prasad_som16-Feb-07 1:18
prasad_som16-Feb-07 1:18 
GeneralRe: List Box & Rich Edit box Pin
Suresh H16-Feb-07 1:21
Suresh H16-Feb-07 1:21 
GeneralRe: List Box &amp; Rich Edit box Pin
Hamid_RT16-Feb-07 1:27
Hamid_RT16-Feb-07 1:27 
GeneralRe: List Box &amp; Rich Edit box Pin
Suresh H16-Feb-07 1:32
Suresh H16-Feb-07 1:32 
GeneralRe: List Box &amp; Rich Edit box Pin
Hamid_RT16-Feb-07 1:45
Hamid_RT16-Feb-07 1:45 
AnswerRe: List Box & Rich Edit box Pin
prasad_som16-Feb-07 1:30
prasad_som16-Feb-07 1:30 
GeneralRe: List Box &amp; Rich Edit box Pin
Suresh H16-Feb-07 1:34
Suresh H16-Feb-07 1:34 
GeneralRe: List Box &amp; Rich Edit box Pin
Hamid_RT16-Feb-07 1:46
Hamid_RT16-Feb-07 1:46 

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.