About dcl_Control_GetPos and dcl_Form_GetRectangle

Started by velasquez · 2014-10-15 12:57 UTC · 5 replies · SMF topic #2180

1 - The dcl_Control_GetPos and dcl_Form_GetRectangle functions should do the same job?
2 - Why dcl_Form_GetRectangle is not documented?

3 - When the screen of AutoCAD does not maximized they return an error message, see below
(dcl_Control_GetPos dc_3D_MainMenu_BarMax)
(227 232 168 426)
Application ERROR: Bad argument type
Attachments
The dcl_Form_GetRectangle function is deprecated and replaced with dcl-Control-GetPos. Deprecated functions are {2} in the documentation.

Please provide information and steps to reproduce the application error.
author=owenwengerd link=topic=2180.msg10946#msg10946 date=1413489618 wrote:
The dcl_Form_GetRectangle function is deprecated and replaced with dcl-Control-GetPos. Deprecated functions are {2} in the documentation.

Please provide information and steps to reproduce the application error.


Hello Owen,
The error happened when I was doing a screen test with AutoCAD decreased.
The goal is to make a form always appears in the same place.
Always work when AutoCAD is with the window maximized.
See the code I am using.
[code
(defun c:dc_3D_MainMenu_BarMax_Aducao_OnClicked (/)
  (setq FormPos (dcl_Control_GetPos dc_3D_MainMenu_BarMax))

;;;Muda a imagem do botao p/ over
  (dcl_Control_SetPicture dc_3D_MainMenu_BarMax_Aducao 113)
;;;Carrega o submenu na base do botao Blutop
  (dcl_Form_Show
    dc_3D_MainMenu_SubMenu_Agua
    (+ 161 (cadr FormPos))
    (+ 168 (cadr FormPos))
  ) ;_ fim de dcl_Form_Show 
) ;_ fim de defun

Attachments
Sorry I worked with AutoCAD 2010 and OpenDCL 7.0.1.4
I'm having difficulty understanding what exactly I must do to reproduce the error here.
author=owenwengerd link=topic=2180.msg10949#msg10949 date=1413561591 wrote:
I'm having difficulty understanding what exactly I must do to reproduce the error here.


Hello Owen,
I discovered that the problem with my code has no relation with the dcl_Control_GetPos function.
Thanks