About dcl_Control_GetPos and dcl_Form_GetRectangle

Started by velasquez, October 15, 2014, 05:57:48 AM

Previous topic - Next topic

velasquez

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

owenwengerd

The dcl_Form_GetRectangle function is deprecated and replaced with dcl-Control-GetPos. Deprecated functions are listed separately in the documentation.

Please provide information and steps to reproduce the application error.

velasquez

[quote author=owenwengerd link=topic=2180.msg10946#msg10946 date=1413489618]
The dcl_Form_GetRectangle function is deprecated and replaced with dcl-Control-GetPos. Deprecated functions are [url=http://www.opendcl.com/HelpFiles/index.php?page=Reference/Method/Index.htm]listed separately[/url] in the documentation.

Please provide information and steps to reproduce the application error.
[/quote]

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


velasquez

Sorry I worked with AutoCAD 2010 and OpenDCL 7.0.1.4

owenwengerd

I'm having difficulty understanding what exactly I must do to reproduce the error here.

velasquez

Quote from: owenwengerd on October 17, 2014, 08:59:51 AM
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