SoftBug
September 12th, 1999, 02:34 AM
In the dialogbased aplication i want a window to dipplay certain textlines
Now i have displayed the lines But,
How can i get keys or mouse click in the window ?
OR more specifically window is to behave like a Scrolable view where user can read text and
move up-down if contents are larger ot fit in the window.
What i have done is
(i can display text on certain event )
//CWind wind ; is defined in the .h file
BOOL CMyDlg::OnInitDialog()
{
.
.
.
wind.CreateEx(WS_EX_CLIENTEDGE | WS_EX_STATICEDGE,
className, NULL, WS_VISIBLE | WS_CHILD,
rect.left, rect.top, rect.right, rect.bottom,
this->GetSafeHwnd(), (HMENU) 100, NULL);
wind.ShowWindow(SW_SHOW);
CRect rcRight;
wind.GetClientRect(rcRight);
CDC *pDC;
pDC = wind.GetDC();
pDC->TextOut(rcRight.left, rcRight.top, "HELLO", 5);
...
}
Thanks
SoftBug
Now i have displayed the lines But,
How can i get keys or mouse click in the window ?
OR more specifically window is to behave like a Scrolable view where user can read text and
move up-down if contents are larger ot fit in the window.
What i have done is
(i can display text on certain event )
//CWind wind ; is defined in the .h file
BOOL CMyDlg::OnInitDialog()
{
.
.
.
wind.CreateEx(WS_EX_CLIENTEDGE | WS_EX_STATICEDGE,
className, NULL, WS_VISIBLE | WS_CHILD,
rect.left, rect.top, rect.right, rect.bottom,
this->GetSafeHwnd(), (HMENU) 100, NULL);
wind.ShowWindow(SW_SHOW);
CRect rcRight;
wind.GetClientRect(rcRight);
CDC *pDC;
pDC = wind.GetDC();
pDC->TextOut(rcRight.left, rcRight.top, "HELLO", 5);
...
}
Thanks
SoftBug