Print Page | Close Window

CXTResizeDialog + OCX = problem

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=12369
Printed Date: 23 June 2025 at 9:28pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTResizeDialog + OCX = problem
Posted By: znakeeye
Subject: CXTResizeDialog + OCX = problem
Date 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?



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