Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Bug in OnWindowPosChanging
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Bug in OnWindowPosChanging

 Post Reply Post Reply
Author
Message Reverse Sort Order
Karnize View Drop Down
Newbie
Newbie
Avatar

Joined: 20 October 2003
Location: Italy
Status: Offline
Points: 19
Post Options Post Options   Thanks (0) Thanks(0)   Quote Karnize Quote  Post ReplyReply Direct Link To This Post Topic: Bug in OnWindowPosChanging
    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.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.172 seconds.