Click here to Skip to main content
15,909,466 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralReply # 2 Pin
Garth J Lancaster30-Jul-05 1:50
professionalGarth J Lancaster30-Jul-05 1:50 
GeneralRe: Reliable date and time of Windows startup Pin
pradeepchinnasamy30-Jul-05 2:09
pradeepchinnasamy30-Jul-05 2:09 
GeneralRe: Reliable date and time of Windows startup Pin
User 1278230-Jul-05 12:36
User 1278230-Jul-05 12:36 
GeneralRe: Reliable date and time of Windows startup Pin
Alexander M.,1-Aug-05 1:21
Alexander M.,1-Aug-05 1:21 
GeneralRe: Reliable date and time of Windows startup Pin
johannks2-Aug-05 19:35
johannks2-Aug-05 19:35 
GeneralUnicode class Pin
ThaSaVa29-Jul-05 23:57
ThaSaVa29-Jul-05 23:57 
GeneralRe: Unicode class Pin
Jack Puppy30-Jul-05 1:08
Jack Puppy30-Jul-05 1:08 
GeneralRe: Unicode class Pin
ThaSaVa1-Aug-05 1:09
ThaSaVa1-Aug-05 1:09 
Generaldetecting the input from a receiver Pin
Nilegna29-Jul-05 22:56
Nilegna29-Jul-05 22:56 
GeneralMSHTML Editing problem Pin
Scozturk29-Jul-05 22:37
professionalScozturk29-Jul-05 22:37 
GeneralRe: MSHTML Editing problem Pin
Scozturk30-Jul-05 4:08
professionalScozturk30-Jul-05 4:08 
GeneralMixing technologies Pin
pc_dev29-Jul-05 21:22
pc_dev29-Jul-05 21:22 
GeneralRe: Mixing technologies Pin
Scozturk29-Jul-05 22:40
professionalScozturk29-Jul-05 22:40 
GeneralSome problems related to Rich edit and Tree Pin
Aqueel29-Jul-05 21:19
Aqueel29-Jul-05 21:19 
Hello
I have few questions related to MFC.
1. I have added a tree control and a rich edit control in Dialog based application. My aim is that when i click an item in tree control, text is displayed in rich edit control. I have modified the code of NM_CLICK event handler for a tree control. So that when i click an item in tree control, an operation is perfomed. But i have to click that item two or three times to display text in rich edit control where as text should be displayed in rich edit control by clicking item just one time. Can anyone please tell me where i am doing mistake? I have given my code below

void CTreeDlg::OnClickTree(NMHDR* pNMHDR, LRESULT* pResult)
{
CTreeCtrl* pCtrl = (CTreeCtrl*) GetDlgItem(IDC_TREE);
HTREEITEM hCurSel = pCtrl->GetSelectedItem();

if (pCtrl->GetItemText(hCurSel) == "Aqueel") // if i clicked on Aqueel in tree control
{
// displaying contents of a file in rich edit
CFile cFile(TEXT("myfile.rtf"), CFile::modeRead);
EDITSTREAM strm;
strm.dwCookie = (DWORD) &cFile;
strm.pfnCallback = WriteEditData;
m_Info.StreamIn(SF_RTF, strm);
}
*pResult = 0;
}


2. How can i clear the contents of a rich edit control.
3. After i have included a .rtf file as a resourse in my project, how can i display it in rich edit control.

Please help me
Thank you.

Aqueel A. Mirza

We Believe in Excellence
GeneralRe: Some problems related to Rich edit and Tree Pin
Anonymous30-Jul-05 4:36
Anonymous30-Jul-05 4:36 
GeneralRe: Some problems related to Rich edit and Tree Pin
Anonymous31-Jul-05 8:03
Anonymous31-Jul-05 8:03 
GeneralDialog Position Pin
khlins29-Jul-05 20:49
khlins29-Jul-05 20:49 
GeneralRe: Dialog Position Pin
vishalmore29-Jul-05 21:28
vishalmore29-Jul-05 21:28 
GeneralRe: Dialog Position Pin
khlins30-Jul-05 15:50
khlins30-Jul-05 15:50 
GeneralRe: Dialog Position Pin
ThatsAlok30-Jul-05 4:00
ThatsAlok30-Jul-05 4:00 
Generallinker error Pin
sebinfrancis29-Jul-05 20:11
sebinfrancis29-Jul-05 20:11 
GeneralRe: linker error Pin
sebinfrancis29-Jul-05 23:04
sebinfrancis29-Jul-05 23:04 
GeneralRe: linker error Pin
S. Senthil Kumar29-Jul-05 23:57
S. Senthil Kumar29-Jul-05 23:57 
GeneralSpeech SDK Pin
alex__b29-Jul-05 20:03
professionalalex__b29-Jul-05 20:03 
GeneralRe: Speech SDK Pin
Blake Miller1-Aug-05 8:08
Blake Miller1-Aug-05 8:08 

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.