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

C / C++ / MFC

 
QuestionHelp!!! Database Requery in MFC Pin
Jolly Hasan25-May-06 0:10
Jolly Hasan25-May-06 0:10 
AnswerRe: Help!!! Database Requery in MFC Pin
David Crow25-May-06 4:14
David Crow25-May-06 4:14 
QuestionWindows NT Quota Data Pin
Touseef Afzal24-May-06 23:58
Touseef Afzal24-May-06 23:58 
QuestionRe: Windows NT Quota Data Pin
David Crow25-May-06 4:15
David Crow25-May-06 4:15 
AnswerRe: Windows NT Quota Data Pin
Touseef Afzal25-May-06 7:55
Touseef Afzal25-May-06 7:55 
QuestionHelp!!! Obtain application path? Pin
md_nele24-May-06 23:41
md_nele24-May-06 23:41 
AnswerRe: Help!!! Obtain application path? Pin
Nibu babu thomas24-May-06 23:43
Nibu babu thomas24-May-06 23:43 
QuestionCRichEditCtrl word highlighting Pin
VinayCool24-May-06 23:25
VinayCool24-May-06 23:25 
Hi All,

Sorry I am back….

With help of Steve Echols I have finished displaying text file in the Rich Edit box,

Now I want to search a particular word in the edit box and I want to high light them
Can u please help me with this….

word to be highlighted is stored in the variable w

// set the window text
m_FCONT.SetWindowText(text);
delete [] text;
fclose(fp);
--
-----

CHARFORMAT cf;
memset(&cf, 0, sizeof(CHARFORMAT));
cf.cbSize = sizeof(CHARFORMAT);
cf.dwMask = CFM_BOLD;
cf.dwEffects = CFE_BOLD;

UpdateData(TRUE);
CString w;
w = m_WORD;
int len = strlen(word);
char word_position[50];
char word_length[50];

// **** pseudo-code ****
for (int p = 0; p < len ; p++)
{
m_FCONT.SetSel(word_position[p], word_length[p]);
m_FCONT.SetSelectionCharFormat(cf);
}


Regards,
Vinay Charan.
AnswerRe: CRichEditCtrl word highlighting Pin
Hamid_RT24-May-06 23:44
Hamid_RT24-May-06 23:44 
GeneralRe: CRichEditCtrl word highlighting Pin
VinayCool24-May-06 23:55
VinayCool24-May-06 23:55 
GeneralRe: CRichEditCtrl word highlighting Pin
NiceNaidu25-May-06 2:44
NiceNaidu25-May-06 2:44 
QuestionClosing a port given a port number Pin
alexyap120524-May-06 23:00
alexyap120524-May-06 23:00 
AnswerRe: Closing a port given a port number Pin
NiceNaidu25-May-06 2:18
NiceNaidu25-May-06 2:18 
GeneralRe: Closing a port given a port number Pin
ThatsAlok25-May-06 23:16
ThatsAlok25-May-06 23:16 
QuestionSplitter Control [modified] Pin
anhtuanbhld124-May-06 22:32
anhtuanbhld124-May-06 22:32 
AnswerRe: Splitter Control Pin
NiceNaidu24-May-06 22:37
NiceNaidu24-May-06 22:37 
GeneralRe: Splitter Control Pin
anhtuanbhld124-May-06 22:40
anhtuanbhld124-May-06 22:40 
GeneralRe: Splitter Control Pin
anhtuanbhld124-May-06 22:41
anhtuanbhld124-May-06 22:41 
GeneralRe: Splitter Control Pin
anhtuanbhld124-May-06 22:45
anhtuanbhld124-May-06 22:45 
GeneralRe: Splitter Control Pin
NiceNaidu24-May-06 22:51
NiceNaidu24-May-06 22:51 
GeneralRe: Splitter Control Pin
anhtuanbhld124-May-06 22:57
anhtuanbhld124-May-06 22:57 
Questionm_ListBuf.push_back(pWsabuf); Why can't it work? [modified] Pin
followait24-May-06 22:02
followait24-May-06 22:02 
QuestionRe: m_ListBuf.push_back(pWsabuf); Why can't it work? [modified] Pin
Nibu babu thomas24-May-06 22:09
Nibu babu thomas24-May-06 22:09 
AnswerRe: m_ListBuf.push_back(pWsabuf); Why can't it work? [modified] Pin
followait24-May-06 22:39
followait24-May-06 22:39 
AnswerRe: m_ListBuf.push_back(pWsabuf); Why can't it work? [modified] Pin
followait24-May-06 23:52
followait24-May-06 23:52 

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.