SendMessage problem
- From: "Hangaround" <anonymous@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 9 Apr 2005 05:31:37 -0700
I developed a dialng_based application:
code as following:
/////////////////CODE
void CxxxDlg::OnButton1()
{
CRect rect;
GetClientRect(&rect);
WORD wx = rect.right;
WORD wy = rect.bottom;
SendMessage(WM_SIZE, MAKEWPARAM(wx, wy));
}
void CxxxDlg::OnSize(UINT nType, int cx, int cy)
{
char lpsz[300];
ZeroMemory(&lpsz, sizeof(lpsz));
::sprintf(lpsz, "cx = %d, cy = %d", cx, cy);
MessageBox(lpsz , "dd" ) ;
CDialog::OnSize(nType, cx, cy);
// TODO: Add your message handler code here
}
/////////////////CODE END
but I cannot receive the correct value in the OnSize
function. why?
.
- Follow-Ups:
- Re: SendMessage problem
- From: Joseph M . Newcomer
- Re: SendMessage problem
- From: Doug Harrison [MVP]
- Re: SendMessage problem
- From: thatsalok
- Re: SendMessage problem
- Prev by Date: Re: Form
- Next by Date: Re: SendMessage problem
- Previous by thread: Tutorials / Documentation on WTL
- Next by thread: Re: SendMessage problem
- Index(es):