Print Page | Close Window

Bug in OnWindowPosChanging

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=210
Printed Date: 22 December 2024 at 10:26pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Bug in OnWindowPosChanging
Posted By: Karnize
Subject: Bug in OnWindowPosChanging
Date Posted: 04 November 2003 at 2:13am

Hello,

I found a bug in OnWindowPosChanging function for EditListBox.

I use this EditListBox on the resizable form view which lies in the TabView and sometimes EditListBox not only change it size but also move down.

I found this code in the OnWindowPosChanging for CXTEditListBox:

if (HasToolbar() && ::IsWindow(m_editGroup.m_hWnd))
{
   lpwndpos->cy -= BTN_OFFSET;
   lpwndpos->y  += BTN_OFFSET;
}

and change it to these one:

if (HasToolbar() && ::IsWindow(m_editGroup.m_hWnd) && !(lpwndpos->flags & (SWP_NOSIZE|SWP_NOMOVE)))
{
   lpwndpos->cy -= BTN_OFFSET;
   lpwndpos->y  += BTN_OFFSET;
}
and the problem looks to be solved.




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net