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

C / C++ / MFC

 
AnswerNews: Nothing has changed today! Pin
Rajesh R Subramanian31-Aug-09 19:51
professionalRajesh R Subramanian31-Aug-09 19:51 
AnswerRe: Can i send Array in command line parameter of CeCreateProcess? Pin
Adam Roderick J31-Aug-09 19:58
Adam Roderick J31-Aug-09 19:58 
QuestionCFrameWnd and CToolBar and tooltips. Should be simple but.. [modified] Pin
FloatingMarc31-Aug-09 17:31
FloatingMarc31-Aug-09 17:31 
QuestionSetLayeredWindowAttributes , set a dialog . Pin
zhanghui543231-Aug-09 16:15
zhanghui543231-Aug-09 16:15 
AnswerRe: SetLayeredWindowAttributes , set a dialog . Pin
«_Superman_»31-Aug-09 17:56
professional«_Superman_»31-Aug-09 17:56 
Questionfrom Font Name and Font Size ==> TextWidth and Textheight ?? Pin
aa_zz31-Aug-09 15:29
aa_zz31-Aug-09 15:29 
AnswerRe: from Font Name and Font Size ==> TextWidth and Textheight ?? Pin
«_Superman_»31-Aug-09 18:03
professional«_Superman_»31-Aug-09 18:03 
QuestionQuestion about RichEdit: the style of underline Pin
xp52431-Aug-09 3:45
xp52431-Aug-09 3:45 
Hi, every one:
I have a problem with the underline style of richedit.let me descrip it in detail:
1,I input "abc" in richedit.
2,Then, i set only "c" with underline style."ab" remains the old style.
3,I select "abc" and set the bold or italic style to all of them.
4,"abc" has the style of bold or italic, and all the three characters have the underline style.This is confusing.The reasonable result is only the "c" has the underline style.

the code snippet i use is:
//set underline style
INT nStart, nEnd;
SendMessage( EM_GETSEL, (WPARAM)&nStart, (LPARAM)&nEnd, NULL );

CHARFORMAT2W cf;
ZeroMemory( &cf, sizeof( cf ) );
cf.cbSize = sizeof( cf );
SendMessage( EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf, NULL );

cf.dwMask |= CFM_UNDERLINE;
cf.dwEffects |= CFE_UNDERLINE;
SendMessage( EM_SETSEL, nStart, nEnd, NULL );
SendMessage( EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf, NULL );

//set bold style
INT nStart, nEnd;
SendMessage( EM_GETSEL, (WPARAM)&nStart, (LPARAM)&nEnd, NULL );

CHARFORMAT2W cf;
ZeroMemory( &cf, sizeof( cf ) );
cf.cbSize = sizeof( cf );
SendMessage( EM_GETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf, NULL );

cf.dwMask |= CFM_BOLD;
cf.dwEffects |= CFE_BOLD;
SendMessage( EM_SETSEL, nStart, nEnd, NULL );
SendMessage( EM_SETCHARFORMAT, SCF_SELECTION, (LPARAM)&cf, NULL );


Is there any bug in my code?please help me.
AnswerRe: Question about RichEdit: the style of underline Pin
xp5241-Sep-09 15:45
xp5241-Sep-09 15:45 
QuestionSDI Application Pin
susanne131-Aug-09 3:07
susanne131-Aug-09 3:07 
AnswerRe: SDI Application Pin
«_Superman_»31-Aug-09 3:29
professional«_Superman_»31-Aug-09 3:29 
GeneralRe: SDI Application Pin
susanne131-Aug-09 3:41
susanne131-Aug-09 3:41 
GeneralRe: SDI Application Pin
«_Superman_»31-Aug-09 6:16
professional«_Superman_»31-Aug-09 6:16 
AnswerRe: SDI Application Pin
Cedric Moonen31-Aug-09 4:42
Cedric Moonen31-Aug-09 4:42 
QuestionRe: SDI Application Pin
Maximilien31-Aug-09 5:09
Maximilien31-Aug-09 5:09 
AnswerRe: SDI Application Pin
susanne131-Aug-09 23:41
susanne131-Aug-09 23:41 
AnswerRe: SDI Application Pin
Joe Woodbury31-Aug-09 9:25
professionalJoe Woodbury31-Aug-09 9:25 
QuestionRe: SDI Application Pin
David Crow31-Aug-09 16:12
David Crow31-Aug-09 16:12 
AnswerRe: SDI Application Pin
Adam Roderick J31-Aug-09 20:55
Adam Roderick J31-Aug-09 20:55 
AnswerRe: SDI Application Pin
Iain Clarke, Warrior Programmer1-Sep-09 1:25
Iain Clarke, Warrior Programmer1-Sep-09 1:25 
AnswerRe: SDI Application Pin
basementman1-Sep-09 4:27
basementman1-Sep-09 4:27 
Questionhow to use external function in a dll from c Pin
mohant$.net31-Aug-09 2:13
mohant$.net31-Aug-09 2:13 
QuestionRe: how to use external function in a dll from c Pin
David Crow31-Aug-09 2:45
David Crow31-Aug-09 2:45 
AnswerRe: how to use external function in a dll from c Pin
mohant$.net31-Aug-09 2:54
mohant$.net31-Aug-09 2:54 
QuestionRe: how to use external function in a dll from c Pin
David Crow31-Aug-09 3:26
David Crow31-Aug-09 3:26 

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.