2012-10-16 11:41 UTC
Hi
I am working on a replacement for the AutoCAD screenmenu that would run in BricsCAD and later ACAD-Versions that no longer contain the original screenmenu.
Most functions are working fine - I already have replacements for grtext and menucmd, that work according to the used environment (original screenmenu or my screenmenu) but I am having difficulties with the position of the menu.
It is a non-modular dialog that is shown when called and hidden, when not needed.
Getting the position and size of the main application window is no problem thanks to the code block
(SETQ app (VLAX-GET-ACAD-OBJECT)
w (VLA-GET-WIDTH app)
h (VLA-GET-HEIGHT app)
x (VLA-GET-WINDOWLEFT app)
y (VLA-GET-WINDOWTOP app)
)
(thanks Slavko Ivanovic ({2}))
My problem right now is that I would like to place the menu on the same side as the Promptmenu in bricsCAD ( (getvar "promptmenu") ) or left, if this can not be determined.
I can however not find a way to get the maximum drawing area of the current application window (the area a drawing is shown, if it is maximized). This area would be limited by some factors like number of toolboxes on the top, height of the console screen, docked palettes left an right an all the other things around the drawing area.
Does anyone have an idea of how to get these values?
Kind regards
IP
I am working on a replacement for the AutoCAD screenmenu that would run in BricsCAD and later ACAD-Versions that no longer contain the original screenmenu.
Most functions are working fine - I already have replacements for grtext and menucmd, that work according to the used environment (original screenmenu or my screenmenu) but I am having difficulties with the position of the menu.
It is a non-modular dialog that is shown when called and hidden, when not needed.
Getting the position and size of the main application window is no problem thanks to the code block
(SETQ app (VLAX-GET-ACAD-OBJECT)
w (VLA-GET-WIDTH app)
h (VLA-GET-HEIGHT app)
x (VLA-GET-WINDOWLEFT app)
y (VLA-GET-WINDOWTOP app)
)
(thanks Slavko Ivanovic ({2}))
My problem right now is that I would like to place the menu on the same side as the Promptmenu in bricsCAD ( (getvar "promptmenu") ) or left, if this can not be determined.
I can however not find a way to get the maximum drawing area of the current application window (the area a drawing is shown, if it is maximized). This area would be limited by some factors like number of toolboxes on the top, height of the console screen, docked palettes left an right an all the other things around the drawing area.
Does anyone have an idea of how to get these values?
Kind regards
IP