Click here to Skip to main content
15,884,739 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Doc-View vs Dialog-based app - Menu Item updates Pin
led mike27-Apr-09 11:47
led mike27-Apr-09 11:47 
GeneralRe: Doc-View vs Dialog-based app - Menu Item updates Pin
john john mackey27-Apr-09 12:08
john john mackey27-Apr-09 12:08 
QuestionCalculating the Size of Rich Edit "bottomless" control Pin
ForNow27-Apr-09 9:00
ForNow27-Apr-09 9:00 
AnswerRe: Calculating the Size of Rich Edit "bottomless" control Pin
Stuart Dootson27-Apr-09 14:02
professionalStuart Dootson27-Apr-09 14:02 
GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
ForNow27-Apr-09 16:37
ForNow27-Apr-09 16:37 
GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
Stuart Dootson28-Apr-09 5:12
professionalStuart Dootson28-Apr-09 5:12 
GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
ForNow28-Apr-09 9:10
ForNow28-Apr-09 9:10 
GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
Stuart Dootson28-Apr-09 10:51
professionalStuart Dootson28-Apr-09 10:51 
I've just added a rich-edit control to a sample MFC dialog app.

In the OnInitDialog handler, I added this:

UpdateData();
richEd.SetEventMask(ENM_REQUESTRESIZE);


Here's the message map entry

ON_NOTIFY(EN_REQUESTRESIZE, IDC_RICHEDIT21, &CmfcdialogDlg::OnEnRequestresizeRichedit21)


Here's the notification handler

void CmfcdialogDlg::OnEnRequestresizeRichedit21(NMHDR *pNMHDR, LRESULT *pResult)
{
   REQRESIZE *pReqResize = reinterpret_cast<reqresize>(pNMHDR);
   // TODO:  The control will not send this notification unless you override the
   // CDialog::OnInitDialog() function to send the EM_SETEVENTMASK message
   // to the control with the ENM_REQUESTRESIZE flag ORed into the lParam mask.

   // TODO:  Add your control notification handler code here

   *pResult = 0;
}</reqresize>


I request the resize with

richEd.RequestResize();


in a 'button click' event handler.

My EN_REQUESTRESIZE handler gets called.

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
ForNow28-Apr-09 11:17
ForNow28-Apr-09 11:17 
GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
ForNow28-Apr-09 18:20
ForNow28-Apr-09 18:20 
GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
Stuart Dootson28-Apr-09 18:58
professionalStuart Dootson28-Apr-09 18:58 
GeneralRe: Calculating the Size of Rich Edit "bottomless" control Pin
ForNow28-Apr-09 22:47
ForNow28-Apr-09 22:47 
QuestionWriteProcessMemory error 5 Pin
Snoepie27-Apr-09 6:48
Snoepie27-Apr-09 6:48 
QuestionRe: WriteProcessMemory error 5 Pin
CPallini27-Apr-09 7:13
mveCPallini27-Apr-09 7:13 
AnswerRe: WriteProcessMemory error 5 Pin
Snoepie27-Apr-09 8:28
Snoepie27-Apr-09 8:28 
AnswerRe: WriteProcessMemory error 5 Pin
Luc Pattyn27-Apr-09 8:17
sitebuilderLuc Pattyn27-Apr-09 8:17 
GeneralRe: WriteProcessMemory error 5 Pin
Snoepie27-Apr-09 8:29
Snoepie27-Apr-09 8:29 
GeneralRe: WriteProcessMemory error 5 Pin
Luc Pattyn27-Apr-09 8:50
sitebuilderLuc Pattyn27-Apr-09 8:50 
GeneralRe: WriteProcessMemory error 5 Pin
CPallini27-Apr-09 22:36
mveCPallini27-Apr-09 22:36 
RantRe: WriteProcessMemory error 5 Pin
Snoepie29-Apr-09 5:50
Snoepie29-Apr-09 5:50 
GeneralRe: WriteProcessMemory error 5 Pin
CPallini29-Apr-09 6:33
mveCPallini29-Apr-09 6:33 
QuestionPlease help with thisBasic C Program Pin
biggiant2200027-Apr-09 5:45
biggiant2200027-Apr-09 5:45 
AnswerRe: Please help with thisBasic C Program [modified] Pin
CPallini27-Apr-09 6:38
mveCPallini27-Apr-09 6:38 
AnswerRe: Please help with thisBasic C Program Pin
David Crow27-Apr-09 8:10
David Crow27-Apr-09 8:10 
GeneralRe: Please help with thisBasic C Program Pin
CPallini27-Apr-09 10:46
mveCPallini27-Apr-09 10:46 

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.