Click here to Skip to main content
15,898,825 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Copying CString to char* Pin
Shay Harel11-Dec-02 17:36
Shay Harel11-Dec-02 17:36 
GeneralRe: Copying CString to char* Pin
Like2Byte12-Dec-02 3:04
Like2Byte12-Dec-02 3:04 
GeneralHandling Checkbox changes in CListCtrl Pin
DRHuff11-Dec-02 7:13
DRHuff11-Dec-02 7:13 
GeneralRe: Handling Checkbox changes in CListCtrl Pin
Joan M11-Dec-02 7:38
professionalJoan M11-Dec-02 7:38 
GeneralRe: Handling Checkbox changes in CListCtrl Pin
DRHuff11-Dec-02 7:52
DRHuff11-Dec-02 7:52 
GeneralRe: Handling Checkbox changes in CListCtrl Pin
Alvaro Mendez11-Dec-02 8:28
Alvaro Mendez11-Dec-02 8:28 
GeneralRe: Handling Checkbox changes in CListCtrl Pin
DRHuff11-Dec-02 9:34
DRHuff11-Dec-02 9:34 
Generalchange color or Url in RichEdit control Pin
romelq11-Dec-02 6:53
romelq11-Dec-02 6:53 
I have some code as follows, to change the text and
background color of the currently selected text in a
control based on RichEdit 2.0.
------------------------------------------------------
CHARFORMAT2 cf;
unsigned int cfSz = sizeof(cf);
cf.cbSize = cfSz;
SendMessage(m_hWnd,EM_GETCHARFORMAT,(WPARAM)SCF_DEFAULT,
(LPARAM)&cf);

cf.crBackColor = RGB(255,0,0);
cf.crTextColor = RGB(0,0,0);
cf.dwMask |= CFM_BACKCOLOR | CFM_COLOR | CFM_LINK ;
if ( cf.dwEffects && CFE_AUTOBACKCOLOR)
cf.dwEffects -= CFE_AUTOBACKCOLOR;
if ( cf.dwEffects && CFE_AUTOCOLOR)
cf.dwEffects -= CFE_AUTOCOLOR;
cf.dwEffects |= CFM_LINK ;

SendMessage(m_hWnd,EM_SETCHARFORMAT,(WPARAM)SCF_SELECTION,
(LPARAM)&cf);
-------------------------------------------------------

however the selected text defaults to blue and is
underlined becuase of the CFM_LINK flags and overrides the
BackColor and TextColor I've set for the characters.

Is it possible to override Richedit's default displaying
of characters that have the CFM_LINK flags set? I haven't
been able to find any documentation on this but believe it
should be possible??? Any insight is appreciated.

Thanks in advance.
GeneralVisual studio question Pin
Shay Harel11-Dec-02 5:45
Shay Harel11-Dec-02 5:45 
GeneralRe: Visual studio question Pin
User 665811-Dec-02 7:11
User 665811-Dec-02 7:11 
GeneralRe: Visual studio question Pin
Shay Harel11-Dec-02 7:19
Shay Harel11-Dec-02 7:19 
GeneralRe: Visual studio question Pin
-=jarl=-11-Dec-02 7:18
-=jarl=-11-Dec-02 7:18 
GeneralRe: Visual studio question Pin
Shay Harel11-Dec-02 8:07
Shay Harel11-Dec-02 8:07 
GeneralRe: Visual studio question Pin
-=jarl=-11-Dec-02 8:28
-=jarl=-11-Dec-02 8:28 
GeneralRe: Visual studio question Pin
Shay Harel11-Dec-02 8:07
Shay Harel11-Dec-02 8:07 
GeneralRe: Visual studio question Pin
Shay Harel11-Dec-02 8:12
Shay Harel11-Dec-02 8:12 
GeneralRe: Visual studio question Pin
-=jarl=-11-Dec-02 8:29
-=jarl=-11-Dec-02 8:29 
GeneralRe: Visual studio question Pin
Navin11-Dec-02 7:23
Navin11-Dec-02 7:23 
GeneralRe: Visual studio question Pin
Shay Harel11-Dec-02 8:05
Shay Harel11-Dec-02 8:05 
GeneralRe: Visual studio question Pin
User 665811-Dec-02 8:09
User 665811-Dec-02 8:09 
GeneralRe: Visual studio question Pin
Alvaro Mendez11-Dec-02 8:36
Alvaro Mendez11-Dec-02 8:36 
GeneralListCtrl: maintain the slection after repopulating it... Pin
Joan M11-Dec-02 5:11
professionalJoan M11-Dec-02 5:11 
GeneralRe: ListCtrl: maintain the slection after repopulating it... Pin
DRHuff11-Dec-02 9:32
DRHuff11-Dec-02 9:32 
GeneralRe: ListCtrl: maintain the slection after repopulating it... Pin
Joan M11-Dec-02 19:53
professionalJoan M11-Dec-02 19:53 
GeneralRe: ListCtrl: maintain the slection after repopulating it... Pin
Jean-Marc Molina3-Oct-03 0:33
Jean-Marc Molina3-Oct-03 0:33 

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.