L_PntDlgText

#include "ltpdg.h"

L_LTPDG_API L_INT L_PntDlgText(hWnd, pTextDlgInfo)

L_HWND hWnd;

owner of the dialog

pPAINTDLGTEXTINFO pTextDlgInfo;

pointer to a structure

Brings up the text properties dialog box.

Parameter

Description

hWnd

Handle of the window that owns the dialog.

pTextDlgInfo

Pointer to a PAINTDLGTEXTINFO structure that contains text information. The values present in pTextDlgInfo when the function is called are used to initialize the dialog, if PAINT_DLG_TEXT_INITUSEDEFAULT is not set in the dwFlags member of pTextDlgInfo. When this function returns, this parameter is updated with the values entered through the dialog.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Required DLLs and Libraries

LTPDG

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:

L_PntGetProperty, L_PntSetProperty, L_PntApplyText

Topics:

DigitalPaint Functions: DigitalPaint Common Dialogs

 

Using the DigitalPaint Common Dialogs

Example

This example will display the Text common dialog.

L_INT PntDlgTextExample(HWND hWnd,L_BOOL fUseDef) 
{ 
   L_INT nRet; 
   L_TCHAR * g_ppszBackgroundTileBitmap [ ] = { TEXT("Tile 0"), 
   TEXT("Tile 1"), 
   TEXT("Tile 2"), 
   TEXT("Tile 3"), 
   TEXT("Tile 4"), 
   TEXT("Tile 5") }; 
   LOGFONT        lf ; 
   PAINTTRANSFORM Painttransform ; 
   PAINTDLGTEXTINFO dlgTextInfo; 
   memset(&dlgTextInfo, 0, sizeof(dlgTextInfo)); 
   if ( fUseDef == TRUE ) 
   { 
      dlgTextInfo.dwFlags = PAINT_DLG_TEXT_INITUSEDEFAULT | PAINT_DLG_TEXT_SHOWALL  ; 
   } 
   else 
   { 
      lf.lfHeight         = 48; 
      lf.lfWidth          = 0 ; 
      lf.lfEscapement     = 0 ; 
      lf.lfOrientation    = 0 ; 
      lf.lfWeight         = FW_NORMAL ; 
      lf.lfItalic         = FALSE ; 
      lf.lfUnderline      = FALSE ; 
      lf.lfStrikeOut      = FALSE ; 
      lf.lfCharSet        = ANSI_CHARSET ; 
      lf.lfOutPrecision   = OUT_DEFAULT_PRECIS ; 
      lf.lfClipPrecision  = CLIP_DEFAULT_PRECIS ; 
      lf.lfQuality        = DEFAULT_QUALITY ; 
      lf.lfPitchAndFamily = FF_DONTCARE ; 
      lstrcpy(lf.lfFaceName, TEXT("Times New Roman") ) ; 
      Painttransform.nRotate  = 45 ; 
      Painttransform.Scale.cx = 200 ; 
      Painttransform.Scale.cy = 200 ; 
      dlgTextInfo.nSize   = sizeof ( PAINTDLGTEXTINFO ) ; 
      dlgTextInfo.dwFlags  = PAINT_DLG_TEXT_SHOWTEXT              | 
      PAINT_DLG_TEXT_SHOWBKGRNDSTYLE       | 
      PAINT_DLG_TEXT_SHOWBKGRNDOPAQUECOLOR | 
      PAINT_DLG_TEXT_SHOWBKGRNDTILE        | 
      PAINT_DLG_TEXT_SHOWBORDERWIDTH       | 
      PAINT_DLG_TEXT_SHOWBORDERCOLOR       | 
      PAINT_DLG_TEXT_SHOWHORZALIGNMENT     | 
      PAINT_DLG_TEXT_SHOWVERTALIGNMENT     | 
      PAINT_DLG_TEXT_SHOWROTATE            | 
      PAINT_DLG_TEXT_SHOWSCALE             | 
      PAINT_DLG_TEXT_SHOWTRUETYPEFONT      | 
      PAINT_DLG_TEXT_SHOWOPACITY           | 
      PAINT_DLG_TEXT_SHOWDEFAULT           ; 
      dlgTextInfo.pszTitle = TEXT("Lead Text Common Dialog ") ; 
      dlgTextInfo.pszText  = TEXT("Test Test Test"); 
      dlgTextInfo.logFont  = lf ; 
      dlgTextInfo.nBorderWidth                    = 10 ; 
      dlgTextInfo.crBorderColor                   = RGB ( 0, 0, 255 ) ; 
      dlgTextInfo.nBackgroundStyle                = PAINT_TEXT_BACK_STYLE_TILEDIMAGE; 
      dlgTextInfo.crBackgroundColor               = RGB ( 255, 0, 0 ) ; 
      dlgTextInfo.ppszBackgroundTileBitmap        = g_ppszBackgroundTileBitmap ; 
      dlgTextInfo.uBackgroundTileBitmapCount      = 6 ; 
      dlgTextInfo.nActiveBackgroundTileBitmapItem = 2 ; 
      dlgTextInfo.nAlignment                      = ( PAINTALIGNMENT ) 
      ( PAINT_ALIGNMENT_RIGHT    | 
      PAINT_ALIGNMENT_VCENTER ); 
      dlgTextInfo.nOpacity                        = 10 ; 
      dlgTextInfo.TransformInfo                   = Painttransform ; 
   } 
   nRet = L_PntDlgText ( hWnd, &dlgTextInfo  ) ; 
   if(nRet != SUCCESS) 
      return nRet; 
   return SUCCESS; 
} 

Help Version 19.0.2017.10.27
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS Digital Paint C API Help