Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - CXTResizeDialog + OCX = problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTResizeDialog + OCX = problem

 Post Reply Post Reply
Author
Message
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Topic: CXTResizeDialog + OCX = problem
    Posted: 08 October 2008 at 7:47am

XTP 12.0.1. This error only occurs for some OCX controls (mainly our own).

I have a dialog with an OCX control.
 
BOOL CMyDialog::OnInitDialog()
{
    SetFlag(xtResizeNoSizeIcon);
   CXTResizeDialog::OnInitDialog();
 
    SetResize(...);
    SetResize(IDC_OCX_CONTROL, ...);
   
    // This solves the problem:
    // CRect rect;
    // GetClientRect(rect);
    // int cx = rect.Width();
    // int cy = rect.Height();
    // SendMessage(WM_SIZE, SIZE_RESTORED, MAKELPARAM(cx, cy));
    return TRUE;
}
 
The OCX will not be sized properly until a WM_SIZE message is sent! What could be the cause?
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.

This page was generated in 0.063 seconds.