Sign in to follow this  
Followers 0
quaizywabbit

how to get client area of tabitem?

6 posts in this topic

is there a way to get the actual client area of a tabitem? or is there a standard offset from the tab itself?


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites



User Defined functions:

_GUICtrlTabGetItemRECT

--------------------------------------------------------------------------------

Retrieves the bounding rectangle for a tab in a tab control.

#Include <GuiTab.au3>

_GUICtrlTabGetItemRECT($h_tabcontrol, $i_item)

Gary


SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Thanks Gary!


[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

it returns the Left, Top, Right, and Bottom for the tabitem button, not the client area below it..

could you add a func that returns the Client area? (i.e. left, top, width, height)

It would help alot when setting things like a background bitmap(or other controls) to fit the client area boundaries...

Edited by quaizywabbit

[u]Do more with pre-existing apps![/u]ANYGUIv2.8

Share this post


Link to post
Share on other sites

ok, my bad, might want to look into TCM_ADJUSTRECT at msdn

Calculates a tab control's display area given a window rectangle, or calculates the window rectangle that would correspond to a specified display area. You can send this message explicitly or by using the TabCtrl_AdjustRect macro.

Syntax

To send this message, call the SendMessage function as follows.

lResult = SendMessage(      // returns LRESULT in lResult   

  (HWND) hWndControl,      // handle to destination control   

  (UINT) TCM_ADJUSTRECT,      // message ID   

  (WPARAM) wParam,      // = (WPARAM) (BOOL) fLarger;   

  (LPARAM) lParam      // = (LPARAM) (LPRECT) prc; ); 

Parameters

fLarger

Operation to perform. If this parameter is TRUE, prc specifies a display rectangle and receives the corresponding window rectangle. If this parameter is FALSE, prc specifies a window rectangle and receives the corresponding display area.

prc

Pointer to a RECT structure that specifies the given rectangle and receives the calculated rectangle.

Return Value

No return value.

Gary

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

here's the values needed for the function call

Global Const $TCM_FIRST = 0x1300
Global Const $TCM_ADJUSTRECT = ($TCM_FIRST + 40)

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0