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

C / C++ / MFC

 
AnswerRe: WIN32 Com port ReadFile() Gets delay Pin
David Crow13-Feb-09 2:49
David Crow13-Feb-09 2:49 
Questionsqrt() pow() fabs() do not work Pin
Member 337533412-Feb-09 19:23
Member 337533412-Feb-09 19:23 
AnswerRe: sqrt() pow() fabs() do not work Pin
Cedric Moonen12-Feb-09 20:18
Cedric Moonen12-Feb-09 20:18 
GeneralRe: sqrt() pow() fabs() do not work Pin
Nishad S12-Feb-09 21:33
Nishad S12-Feb-09 21:33 
GeneralRe: sqrt() pow() fabs() do not work Pin
Cedric Moonen12-Feb-09 21:37
Cedric Moonen12-Feb-09 21:37 
GeneralRe: sqrt() pow() fabs() do not work Pin
David Crow13-Feb-09 2:51
David Crow13-Feb-09 2:51 
GeneralRe: sqrt() pow() fabs() do not work Pin
Chris Losinger13-Feb-09 4:17
professionalChris Losinger13-Feb-09 4:17 
GeneralRe: sqrt() pow() fabs() do not work Pin
Alexander M.,15-Feb-09 7:37
Alexander M.,15-Feb-09 7:37 
GeneralRe: sqrt() pow() fabs() do not work Pin
Chris Losinger13-Feb-09 4:16
professionalChris Losinger13-Feb-09 4:16 
GeneralRe: sqrt() pow() fabs() do not work Pin
Nishad S15-Feb-09 17:29
Nishad S15-Feb-09 17:29 
QuestionAlternative for CMap in MFC Pin
Ramasani12-Feb-09 18:30
Ramasani12-Feb-09 18:30 
AnswerRe: Alternative for CMap in MFC Pin
Cedric Moonen12-Feb-09 20:19
Cedric Moonen12-Feb-09 20:19 
GeneralRe: Alternative for CMap in MFC Pin
Arman S.12-Feb-09 20:49
Arman S.12-Feb-09 20:49 
GeneralRe: Alternative for CMap in MFC Pin
Ramasani12-Feb-09 22:11
Ramasani12-Feb-09 22:11 
GeneralRe: Alternative for CMap in MFC Pin
Arman S.12-Feb-09 22:33
Arman S.12-Feb-09 22:33 
QuestionHow to get the available ports? Pin
AnithaSubramani12-Feb-09 18:15
AnithaSubramani12-Feb-09 18:15 
AnswerRe: How to get the available ports? Pin
SandipG 12-Feb-09 19:53
SandipG 12-Feb-09 19:53 
AnswerRe: How to get the available ports? Pin
David Crow13-Feb-09 3:03
David Crow13-Feb-09 3:03 
QuestionObtaining the HWND of a window Pin
hxhl9512-Feb-09 17:53
hxhl9512-Feb-09 17:53 
QuestionRe: Obtaining the HWND of a window Pin
«_Superman_»12-Feb-09 18:03
professional«_Superman_»12-Feb-09 18:03 
AnswerRe: Obtaining the HWND of a window Pin
hxhl9512-Feb-09 18:11
hxhl9512-Feb-09 18:11 
AnswerRe: Obtaining the HWND of a window Pin
SandipG 12-Feb-09 20:04
SandipG 12-Feb-09 20:04 
AnswerRe: Obtaining the HWND of a window Pin
Stuart Dootson12-Feb-09 21:59
professionalStuart Dootson12-Feb-09 21:59 
GeneralRe: Obtaining the HWND of a window Pin
hxhl9513-Feb-09 12:59
hxhl9513-Feb-09 12:59 
QuestionEM_REPLACESEL order of API's Pin
ForNow12-Feb-09 17:37
ForNow12-Feb-09 17:37 
Hi,

I was wondering what is the order of API calls to replace a peice of text in a Rich Edit Control Dialog

I do the following

WM_SETSEXT to send the Text the Rich Edit Dialog BOX

The EM_SETSEL 0,7 setting the selection for char 0 - 7

Then doing the SetCharFormat to set the Character fromat to red

memset( &cf, 0, sizeof cf );
cf.cbSize = sizeof cf;
cf.dwMask = CFM_COLOR;
cf.crTextColor = RGB(255,0,0);

SendMessage(RichWindow,EM_SETCHARFORMAT,SCF_SELECTION,(LPARAM) &cf);

Then the replacement text

strncpy(addr,"00000000",8);
SendMessage(RichWindow,EM_REPLACESEL,TRUE,(LPARAM) addr);

However more then 8 charcters are replaced seeems like 9 or 10

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.