Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Resize ActiveX

zzzzzz
Beginner
1,562 Views
HELP! I'm ActiveX challenged.

I'm using the Avis 2D ActiveX control. I want to resize it dynamically to fit the dialog. I *think* I want to use SetWindowPos(), the trouble is it takes a HWND structure referring to the window I want to resize. I try to use either my the ID referring to the Control, and have tried childHWND = GetWindow(parentHWND, GW_CHILD). neither has any effect.

I also tried setting the attributes on the ActiveX setting 'HEIGHT', etc.

Nothing works, some things I've tried blow up.

So my question is really:

How do I resize an ActiveX control in FORTRAN?

Samples would be appreciated.

Thanks!
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
1,562 Views
To convert control's ID to control's window handle, use GetDlgItem(parentHWND, IDCONTROL) routine; GetWindow(GW_CHILD) returns the first child, whatever it is. When you get the handle, you can use SetWindowPos (or, simpler, MoveWindow) on it.

Jugoslav
0 Kudos
zzzzzz
Beginner
1,562 Views
Thanks !
0 Kudos
Reply