LAnnToolBar::Create
#include "ltwrappr.h"
virtual HWND LAnnToolBar::Create(hWndParent, pPoint, uAlign, bVisible)
HWND hWndParent; |
/* handle to the parent window */ |
LPPOINT pPoint; |
/* pointer to the POINT structure */ |
L_UINT uAlign; |
/* constant for the toolbar allignment */ |
L_BOOL bVisible; |
/* flag that indicates whether the toolbar will be visible */ |
Creates an annotation toolbar in the specified window. This function is available in the Document/Medical Toolkits.
Parameter |
Description |
hWndParent |
Handle to the parent window. |
pPoint |
Pointer to the POINT structure that specifies the position of the new window in the parent window. Coordinates are relative to the parent window. |
uAlign |
Value indicating which corner of the toolbar is located at pPoint. One of the following values: |
|
ANNTOOLALIGN_LEFT [0x0000] |
|
ANNTOOLALIGN_RIGHT [0x0001] |
|
must be combined using the bitwise OR with one of these values: |
|
ANNTOOLALIGN_TOP [0x0000] |
|
ANNTOOLALIGN_BOTTOM [0x0002] |
|
For example, ANNTOOLALIGN_LEFT|ANNTOOLALIGN_TOP indicates that pPoint is the top left point of the toolbar. |
bVisible |
Flag that indicates whether the toolbar will be visible. Possible values are: |
Value |
Meaning |
TRUE |
Toolbar will be visible. |
FALSE |
Toolbar will not be visible. |
Returns
>0 |
Handle of the created toolbar. |
=NULL |
An error occurred. Refer to Return Codes. |
Required DLLs and Libraries
LTANN For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
See Also
Functions: |
|
Topics: |
|
|
|
|
|
|
Example
L_VOID TestFunction(HWND hWndParent)
{
LAnnToolBar LeadAToolbar ;
HWND hWnd ;
POINT Point ;
L_UINT uChecked ;
if (LeadAToolbar.IsCreated()
== FALSE)
{
Point.x = 10 ;
Point.y = 10 ;
LeadAToolbar.Create(hWndParent,&Point,
ANNTOOLALIGN_LEFT | ANNTOOLALIGN_TOP, TRUE) ;
}
hWnd = LeadAToolbar.GetWndHandle()
;
if (hWnd == NULL)
{
MessageBox(NULL,TEXT("A ToolBar
was not created ..."),TEXT("Notice"),MB_OK) ;
return ;
}
if (LeadAToolbar.IsButtonVisible(ANNTOOL_LINE)
== FALSE)
LeadAToolbar.SetButtonVisible(ANNTOOL_LINE,TRUE);
uChecked = LeadAToolbar.GetToolChecked()
;
if (uChecked != ANNTOOL_LINE)
LeadAToolbar.SetToolChecked(ANNTOOL_LINE)
;
//...
//...
LeadAToolbar.Destroy();
}