This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Tuesday, March 11, 2008 1:27:00 AM(UTC)
Groups: Registered
Posts: 8
[ Lead version 14.5 ]
[ c++ using ltWrappr]
Hi,
In the attached small project I derived a class from LAnnotationWindow.
In this class I override the OnDraw function.
I try to draw a rectangle in the center of the viewed area.
This goes wrong when I scroll, or when I drag another window over the dialog.
Regards,
Slager
#2
Posted
:
Wednesday, March 12, 2008 7:12:55 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Slager,
I modified 2 things in the project:
1. Handled scrolling to cause repainting like this:
virtual
LRESULT MsgProcCallBack(HWND hWnd,UINT
uMsg,WPARAM wParam,LPARAM lParam)
{
LRESULT result =
LAnnotationWindow::MsgProcCallBack(hWnd, uMsg, wParam, lParam);
if(WM_HSCROLL == uMsg || WM_VSCROLL == uMsg)
{
RECT Rect = {0};
GetClientRect(hWnd, &Rect);
InvalidateRect(hWnd, &Rect, FALSE);
}
return result;
}
2. Enabled double buffering to eliminate flicker:
//After the line L_INT nres1 = m_AnnotationWindow.Copy( bmp );
m_AnnotationWindow.EnableDoubleBuffer(TRUE);
Edited by moderator Thursday, October 27, 2016 3:12:44 PM(UTC)
| Reason: Not specified
#3
Posted
:
Wednesday, March 12, 2008 11:11:02 PM(UTC)
Groups: Registered
Posts: 8
Adnan,
Thanks, It works![Y]
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.