With yourself, define the corresponding interface, you can set the font type and size of the toolbar.
The following is my user object nvo_app implement custom toolbar font function key 1 function which stated:.. Private: Function ULong CreateMutexA (ULong lpsa, Boolean fInitialOwner, String lpszMutexName) Library 'kernel32.dll'Function uint GetModuleFileNameA (ulong hModule , REF STRING LPFILENAME, ULONG NSIZE) LIBRARY "kernel32.dll"
// Error API Function Long GetLastError () Library 'kernel32.dll' // set the local system time Function boolean SetSystemDateTime (integer wYear, integer wMonth, integer wDay, integer wHour, integer wMinute, integer wSecond) Library "mHand.dll"
// Window relationship FUNCTION Long FindWindowExA (long hParent, long hChildAfter, String lpszClass, String lpszWindow) Library "user32.dll" FUNCTION Long GetWindowLongA (long hWnd, integer index) Library "user32.dll"
// toolbar font function FUNCTION Long FN_ToolBarSetFont6 (long unknown, string fontname, long fontsize, long unknown1, string str) LIBRARY "pbvm60.dll" ALIAS FOR 'FN_ToolBarSetFont'FUNCTION Long FN_ToolBarSetFont7 (long unknown, string fontname, long fontsize, long unknown1, string str) LIBRARY "pbvm70.dll" ALIAS FOR 'FN_ToolBarSetFont'FUNCTION Long FN_ToolBarSetFont8 (long unknown, string fontname, long fontsize, long unknown1, string str) LIBRARY "pbvm80.dll" ALIAS FOR' FN_ToolBarSetFont'FUNCTION Long FN_ToolBarSetFont9 ( LIBRARY "PBVM90.DLL" ALIAS for 'FN_TOOLBARSETFONT'2. function definition / ********************** ************************************************ / // Function: get Toolbar's handle // Name: uf_gettoolbarahandle // access: private // PARM: / / 1. AW_FRAME: Window with Toolbar // Return: Corresponding to Toolbar Handle // Author: hzh // Date : 2002.11.15 / ************************************************************* ************* / long l_null, l_hwndtoolbarhwndstring s_classname, s_windownloadameenvironment lenv
IF IsValid (aw_Frame) AND (GetEnvironment (lEnv) = 1) THEN CHOOSE CASE lEnv.PBMajorRevision CASE 6 s_classname = "FNFIXEDBAR60" CASE 7 s_classname = "FNFIXEDBAR70" CASE 8 s_classname = "FNFIXEDBAR80" CASE 9 s_classname = "FNFIXEDBAR90" END CHOOSE Setnull (s_windowname) setnull (l_null) l_hwndtoolbarhwnd = findwindowexa (Handle (aw_frame), l_null, s_classname, s_windowname) Endix
Return l_hwndtoolbarhwnd / *********************************************** ********************************* / / / Function: Set the font of the toolbar // name: uf_settoolbarfont // access: public // PARM: / / 1. AW_FRAME: Window with Toolbar /// 2. AS_FONTNAME: Font Name (such as Song) // 3. AI_FONTSIZE: Font Size // 4. As_EXTENT: Extended Properties (Width of each column, can accommodate the number of words) / / RETUR: OF No Use // Author: hzh // Date: 2002.11.15 / ****************************************** ************************************************ / Long L_hwndtoolbar, L_Unknownenvironment Lenv
l_hwndToolBar = uf_GetToolBarHandle (aw_frame) IF l_hwndToolBar> 0 THEN l_unknown = GetWindowLongA (l_hwndToolBar, 0) IF (GetEnvironment (lEnv) = 1) AND l_unknown <> 0 THEN CHOOSE CASE lEnv.PBMajorRevision CASE 6 FN_ToolBarSetFont6 (l_unknown, as_fontname, ai_fontsize, 0 , as_extent) CASE 7 FN_ToolBarSetFont7 (l_unknown, as_fontname, ai_fontsize, 0, as_extent) CASE 8 FN_ToolBarSetFont8 (l_unknown, as_fontname, ai_fontsize, 0, as_extent) CASE 9 FN_ToolBarSetFont9 (l_unknown, as_fontname, ai_fontsize, 0, as_extent) END CHOOSE END IFEND IF
Return 1