﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
906	ActiveX Control on a GUI gets incorrect size information when queried	rgreer@…	Valik	"If an MFC ActiveX Control makes a call to 

{{{
COleControl::GetControlSize(int* pcx,
   int* pcy )
}}}
, it is supposed to return the control's width and height.
If the control is attached to an AutoIT GUI:

{{{
Local $oObject = ObjCreate(""MFCActiveX.Control.1"")
Local $GUIMain = GUICreate(""Test"", 800,600,0,0)
GUICtrlCreateObj($oObject, 0,0,800,600)
GUISetState()
}}}

It always returns x=100, y=50.

In any other container (.NET, VB, C++/MFC), this control correctly gives the height/width.

I can attach a sample MFC project that demonstrates this, or you can create one from scratch and add the following code somewhere in the control:

{{{
int iControlWidth, iControlHeight;
CString sControlDimensions;
	
GetControlSize(&iControlWidth, &iControlHeight);

sControlDimensions.Format(L""Width: %d Height: %d"",iControlWidth, iControlHeight);

MessageBox(sControlDimensions);

}}}

"	Bug	closed	3.3.1.4	AutoIt	3.3.0.0	Blocking	Fixed		
