Re: Catch WM_SIZE



Thank for your anwser but this is not what I need.

I want to intercept this message IN my DIALOG. Not in my derived class.

"Scott McPhillips [MVP]" wrote:

"Erakis" <Erakis@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:5BC2F5F0-D19B-4B3E-9881-EAC6B5000B32@xxxxxxxxxxxxxxxx
Hi,

How to catch the WM_SIZE message of a control created dynamically.
I mean :

BOOL CMyDialog::OnInitDialog()
{
CDialog::OnInitDialog();

// m_MyControl derived from CWND
m_MyControl.Create( NULL, _T(""), WS_VISIBLE, CRect(10, 10, 0, 0), this,
1 );
}


Add a WM_SIZE message handler in your derived-from-CWnd class. Use the
Visual Studio IDE to do this and it will add the message map entry, and the
OnSize function declaration, and a stub OnSize function definition.

--
Scott McPhillips [VC++ MVP]


.



Relevant Pages

  • Re: Subclassing dynamically created controls
    ... I have achieved being able to paint the background colour of the CEdit box ... painting of the control in MFC by making a derived class will fail at this ... so this is the colour that you want to paint the background of the ... I call pDC->SetBkColor which tells the GDI pointer for this control, ...
    (microsoft.public.vc.mfc)
  • RE: Subclassing dynamically created controls
    ... I have achieved being able to paint the background colour of the CEdit box ... painting of the control in MFC by making a derived class will fail at this ... so this is the colour that you want to paint the background of the ... I call pDC->SetBkColor which tells the GDI pointer for this control, ...
    (microsoft.public.vc.mfc)
  • Re: NumericUpDown controls
    ... propogates through to my derived class. ... So is it possible to "get rid" of it, ... > Well, when calling the get-accessor of the Value property, the control ... > it's possible), then when you call the get-accessor of Value, the control's ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: CEdit or CRichEditCtrl text highlighting
    ... Using the derived class is where I would have put the WM_CONTEXTMENU or WM_RBUTTONDOWN ... For colors, I chose some colors sort-of-looked-nice, but gave the user a way to change ... there was a rich-edit control in the dialog which showed the selected window background ... Cut or Paste members the rich edit control. ...
    (microsoft.public.vc.mfc)
  • Re: AfxBeginThread
    ... When you want to change the text of a static control on a dialog, ... Then within your CDialog derived class you can change its text ... CSomeDialog dlg1; //a regualr dialog made with resource editor ... I would be very grateful! ...
    (microsoft.public.vc.mfc)