Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, March 11, 2008 1:27:00 AM(UTC)

Slager  
Slager

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

File Attachment(s):
TestApp.zip (21kb) downloaded 20 time(s).
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Wednesday, March 12, 2008 7:12:55 AM(UTC)

Adnan Ismail  
Guest

Groups: Guests
Posts: 3,028

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)

Slager  
Slager

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.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.097 seconds.