Click here to Skip to main content
15,881,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDialog GetClientRect vs RichEdit ClientRect doesnt seem correct Pin
ForNow17-Oct-21 5:52
ForNow17-Oct-21 5:52 
AnswerRe: Dialog GetClientRect vs RichEdit ClientRect doesnt seem correct Pin
Richard Andrew x6417-Oct-21 14:50
professionalRichard Andrew x6417-Oct-21 14:50 
GeneralRe: Dialog GetClientRect vs RichEdit ClientRect doesnt seem correct Pin
ForNow17-Oct-21 15:31
ForNow17-Oct-21 15:31 
AnswerRe: Dialog GetClientRect vs RichEdit ClientRect doesnt seem correct Pin
Richard MacCutchan17-Oct-21 22:02
mveRichard MacCutchan17-Oct-21 22:02 
QuestionInserting a Bitmap into a RichEditctrl Pin
ForNow13-Oct-21 14:08
ForNow13-Oct-21 14:08 
SuggestionRe: Inserting a Bitmap into a RichEditctrl Pin
David Crow14-Oct-21 9:10
David Crow14-Oct-21 9:10 
GeneralRe: Inserting a Bitmap into a RichEditctrl Pin
ForNow14-Oct-21 9:49
ForNow14-Oct-21 9:49 
QuestionUnable to initialize of clear initial buffer or value of richeditcontrol Pin
ForNow7-Oct-21 13:15
ForNow7-Oct-21 13:15 
I have a richedit control which first time I am not able to clear out to nulls or have no value

Below is the code for CGRegs which a modeless Cdialog in which the client area is filled by a rich edit

as you can see all the way on the bottom I select the entire richedit and do a Clear



The first time around before General Purpose Registers Cdialog/richedit is filled I do a Stream out

I would assume the value of cb would be zero but its not its 0x7b for some unexplained reason more so

the value of the buffer of the rich edit is

pbBuff = 0x000001d45061df80 "{\\rtf1\\ansi\\deff0{\\fonttbl{\\f0\\fnil\\fcharset0 Courier New;}}\r\n\\viewkind4\\uc1\\pard\\lang1033\\f0\\fs17


Dont know what this is when I try to populate the the richedit with the register value it puts after the string

 {\rtf1\ansi\deff0{\fonttbl{\f0\fnil\
\viewkind4 GPR 00=000000_00000114 GPR 04=00000000_FFFF


Any one the know who I can clear the inital value of the rich edit

thanks

C++
static DWORD MyStreamOutGPRCallback(DWORD_PTR dwCookie, LPBYTE pbBuff, LONG cb, LONG* pcb)


C++
BOOL CGPRegs::OnInitDialog()
{
	gprrichedit = new CRichEditCtrl;
	CDialog::OnInitDialog();
	gprrichedit->SetSel(0, -1);
	gprrichedit->Clear();
	return TRUE;
}
CGPRegs::~CGPRegs()
{
}

void CGPRegs::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	DDX_Control(pDX, IDC_RICHEDIT22, (CWnd &)*gprrichedit);
}

AnswerRe: Unable to initialize of clear initial buffer or value of richeditcontrol Pin
Richard MacCutchan7-Oct-21 21:53
mveRichard MacCutchan7-Oct-21 21:53 
GeneralRe: Unable to initialize of clear initial buffer or value of richeditcontrol Pin
ForNow7-Oct-21 21:58
ForNow7-Oct-21 21:58 
GeneralRe: Unable to initialize of clear initial buffer or value of richeditcontrol Pin
Richard MacCutchan7-Oct-21 22:34
mveRichard MacCutchan7-Oct-21 22:34 
GeneralRe: Unable to initialize of clear initial buffer or value of richeditcontrol Pin
ForNow7-Oct-21 23:12
ForNow7-Oct-21 23:12 
QuestionC language exercise - beginner Pin
Senhor League6-Oct-21 17:49
Senhor League6-Oct-21 17:49 
AnswerRe: C language exercise - beginner Pin
Victor Nijegorodov6-Oct-21 19:43
Victor Nijegorodov6-Oct-21 19:43 
AnswerRe: C language exercise - beginner Pin
CPallini6-Oct-21 22:46
mveCPallini6-Oct-21 22:46 
GeneralRe: C language exercise - beginner Pin
David Crow7-Oct-21 2:08
David Crow7-Oct-21 2:08 
AnswerRe: C language exercise - beginner Pin
jsc427-Oct-21 5:18
professionaljsc427-Oct-21 5:18 
GeneralRe: C language exercise - beginner Pin
Graham Breach7-Oct-21 11:30
Graham Breach7-Oct-21 11:30 
GeneralRe: C language exercise - beginner Pin
Bram van Kampen15-Oct-21 13:35
Bram van Kampen15-Oct-21 13:35 
GeneralRe: C language exercise - beginner Pin
Richard MacCutchan15-Oct-21 22:04
mveRichard MacCutchan15-Oct-21 22:04 
AnswerRe: C language exercise - beginner Pin
Bram van Kampen15-Oct-21 13:29
Bram van Kampen15-Oct-21 13:29 
Questiondata structure Pin
User 153459235-Oct-21 15:05
User 153459235-Oct-21 15:05 
AnswerRe: data structure PinPopular
Dave Kreskowiak5-Oct-21 17:11
mveDave Kreskowiak5-Oct-21 17:11 
AnswerRe: data structure Pin
Maximilien6-Oct-21 12:44
Maximilien6-Oct-21 12:44 
AnswerRe: data structure Pin
Bram van Kampen15-Oct-21 12:50
Bram van Kampen15-Oct-21 12:50 

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.