cophi
asked on
Retrieve Size of ActiveX
So I am creating an ActiveX which basically creates a CListCtrl inside of it. So when the person selects my ActiveX and draw's the 'square' that places the activeX into it, I am interested in knowing those dimensions so I can find size my CListCtrl appropriately inside of this.
Thanks,
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
m_lstCtrl.SetWindowPos(NUL L, 0, 0, width, height, SWP_NOZORDER);
That should position the list control at 0, 0 in the parent and with the width and height you specify.
That should position the list control at 0, 0 in the parent and with the width and height you specify.
WINDOWPLACEMENT wndPlacement;
// Get the current position
m_ActiveXControl.GetWindow Placement( &wndPlacem ent);
int nWidth = 400; // substitute your new width
int nHeigth = 200; // substitute your new height
m_ActiveXControl.MoveWindo w ( wndPlacement.ptMinPosition .x, wndPlacement.ptMinPosition .y,
nWidth, nHeigth);
MAHESH
// Get the current position
m_ActiveXControl.GetWindow
int nWidth = 400; // substitute your new width
int nHeigth = 200; // substitute your new height
m_ActiveXControl.MoveWindo
nWidth, nHeigth);
MAHESH
WINDOWPLACEMENT wndPlacement;
// Get the current position
m_ActiveXControl.GetWindow
int nWidth = 400; // substitute your new width
int nHeigth = 200; // substitute your new height
m_ActiveXControl.MoveWindo
wndPlacement.rcNormalPosit
wndPlacement.rcNormalPosit
nWidth,
nHeigth);
// Get the current position
m_ActiveXControl.GetWindow
now you may use like wndPlacement.ptMinPosition
MAHESH