Click here to Skip to main content
15,906,816 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using Multiple Tables in an Access Database Pin
Toni788-Jun-03 8:40
Toni788-Jun-03 8:40 
GeneralRe: Using Multiple Tables in an Access Database Pin
RichardGrimmer10-Jun-03 5:03
RichardGrimmer10-Jun-03 5:03 
GeneralDesktop Dancer Pin
dfsgdsfgdfg8-Jun-03 4:23
dfsgdsfgdfg8-Jun-03 4:23 
GeneralRe: Desktop Dancer Pin
Toni788-Jun-03 8:42
Toni788-Jun-03 8:42 
GeneralRe: Desktop Dancer Pin
ZoogieZork8-Jun-03 10:39
ZoogieZork8-Jun-03 10:39 
GeneralClipboard problem with CRichEdit Pin
Michael Pauli8-Jun-03 4:06
Michael Pauli8-Jun-03 4:06 
GeneralRe: Clipboard problem with CRichEdit Pin
Ryan Binns8-Jun-03 5:02
Ryan Binns8-Jun-03 5:02 
GeneralRe: Clipboard problem with CRichEdit Pin
Michael Pauli9-Jun-03 3:57
Michael Pauli9-Jun-03 3:57 
Thanx' sharing the ideas!

And actually it helped this time. What I did was that I made the CHARFORMAT-change to the full selection in response to *not* an UPDATE event but a CHANGE ev. As it turned out an update-ev. came over and over again if I did the work on EN_UPDATE - ON_CHANGE was less sensitive. So this is how the final solution looks:

<br />
const void CCalFrameWnd::CCalendar::Note_EditChange()<br />
// Called from parent to signal that user are editing a note.<br />
{<br />
	TRACE(_T("Note_EditChange()\n"));<br />
	// Ensure usage of one charformat only.<br />
	long lChar_Start = 0, <br />
		 lChar_End = 0;<br />
	CHARFORMAT cf_def;<br />
	cf_def.cbSize = sizeof(CHARFORMAT);<br />
	m_pEdit_Note->GetDefaultCharFormat(cf_def);<br />
	m_pEdit_Note->GetSel(lChar_Start, lChar_End);<br />
	m_pEdit_Note->HideSelection(TRUE, FALSE);<br />
	m_pEdit_Note->SetSel(0, -1);<br />
	m_pEdit_Note->SetSelectionCharFormat(cf_def);<br />
	m_pEdit_Note->SetSel(lChar_End, lChar_End);<br />
	m_pEdit_Note->HideSelection(FALSE, FALSE);<br />
}<br />


So I just force the def-CHARFORMAT on to the entire selection having always set the def-format first. Also I remember to be able to restore to the orig. caret pos.

It works! Rose | [Rose]

Regards,
Michael Mogensen, mm it-consult dk.

><((((º> ·.¸¸.· ><((((º> ·.¸¸.· ><((((º>
GeneralRe: Clipboard problem with CRichEdit Pin
Ryan Binns9-Jun-03 4:05
Ryan Binns9-Jun-03 4:05 
GeneralC++ GUI library question Pin
Member 2982688-Jun-03 2:43
Member 2982688-Jun-03 2:43 
GeneralRe: C++ GUI library question Pin
Michael P Butler8-Jun-03 4:05
Michael P Butler8-Jun-03 4:05 
GeneralRe: C++ GUI library question Pin
Member 2982689-Jun-03 8:06
Member 2982689-Jun-03 8:06 
GeneralRe: C++ GUI library question Pin
Michael P Butler12-Jun-03 8:31
Michael P Butler12-Jun-03 8:31 
Generaltypedef CList<int,int> CPersonList (compilation error) Pin
yccheok7-Jun-03 23:47
yccheok7-Jun-03 23:47 
GeneralRe: typedef CList<int,int> CPersonList (compilation error) Pin
Bartosz Bien8-Jun-03 2:00
Bartosz Bien8-Jun-03 2:00 
GeneralCheck for Unicode Pin
Dominik Reichl7-Jun-03 23:19
Dominik Reichl7-Jun-03 23:19 
GeneralRe: Check for Unicode Pin
Andrew Walker7-Jun-03 23:42
Andrew Walker7-Jun-03 23:42 
GeneralRe: Check for Unicode Pin
Ryan Binns8-Jun-03 4:43
Ryan Binns8-Jun-03 4:43 
GeneralRe: Check for Unicode Pin
Dominik Reichl8-Jun-03 5:15
Dominik Reichl8-Jun-03 5:15 
GeneralRe: Check for Unicode Pin
PJ Arends8-Jun-03 9:29
professionalPJ Arends8-Jun-03 9:29 
GeneralRe: Check for Unicode Pin
Dominik Reichl8-Jun-03 21:01
Dominik Reichl8-Jun-03 21:01 
GeneralRichedit control in Win32 C++ Pin
tareqsiraj7-Jun-03 19:49
tareqsiraj7-Jun-03 19:49 
GeneralRe: Richedit control in Win32 C++ Pin
Michael Dunn7-Jun-03 20:17
sitebuilderMichael Dunn7-Jun-03 20:17 
GeneralRe: Richedit control in Win32 C++ Pin
tareqsiraj7-Jun-03 22:26
tareqsiraj7-Jun-03 22:26 
GeneralRe: Richedit control in Win32 C++ Pin
Ryan Binns8-Jun-03 4:45
Ryan Binns8-Jun-03 4:45 

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.