📄 scktapp.h
字号:
// Return type : BOOL - TRUE if successful, FALSE if not
// Argument : HWND hDlg - Handle of the dialog that contains the control
// Argument : int nIdControl - Resource ID of the control to show
//使控件在对话框中显示出来
BOOL Sckt_ShowControl(HWND hDlg, int nIdControl);
// Function name : Sckt_HideControl
// Description : Makes a control on a dialog box invisible.
// Return type : BOOL - TRUE if successful, FALSE if not
// Argument : HWND hDlg - Handle of the dialog that contains the control
// Argument : int nIdControl - Resource ID of the control to hide
//隐藏对话框中的控件
BOOL Sckt_HideControl(HWND hDlg, int nIdControl);
// Function name : Sckt_EnableControl
// Description : Sets the state of a control on a dialog box to enabled.
// Return type : BOOL - TRUE if successful, FALSE if not
// Argument : HWND hDlg - Handle of the dialog that contains the control
// Argument : int nIdControl - Resource ID of the control to enable
//激活对话框控件
BOOL Sckt_EnableControl(HWND hDlg, int nIdControl);
// Function name : Sckt_DisableControl
// Description : Sets the state of a control on a dialog box to disabled.
// Return type : BOOL - TRUE if successful, FALSE if not
// Argument : HWND hDlg - Handle of the dialog that contains the control
// Argument : int nIdControl - Resource ID of the control to disable
//将对话框的状态设置为非激活状态
BOOL Sckt_DisableControl(HWND hDlg, int nIdControl);
// Function name : Sckt_SetDialogColor
// Description : Sets the color of a dialog.
// Return type : BOOL - TRUE if successful, FALSE if not
// Argument : HWND hDlg - Handle of the dialog to color
// Argument : COLORREF clColor - Desired color for the dialog
//设置对话框的颜色
BOOL Sckt_SetDialogColor(HWND hDlg, COLORREF clColor);
// Function name : Sckt_MakeHyperlink
// Description : Makes a static control look like an HTML hyperlink by underlining
// : the control and setting the color to blue. Works only on static
// : controls that have the NOTIFY style set (in the resource editor).
// Return type : BOOL - TRUE if successful, FALSE if not
// Argument : HWND hDlg - Handle of the dialog that contains the static control
// Argument : int nIdStatic - Resource ID of the static control
//使静态控件加上下划线,并把颜色设为蓝色(象HTML的超链接);只对静态控件有效
BOOL Sckt_MakeHyperlink(HWND hDlg, int nIdStatic);
// Function name : Sckt_SetHiResBmp
// Description : Allows the developer to assign alternate hi-res artwork to a picture
// : control at runtime. If used, the artwork must be exactly double the
// : size of the corresponding standard res artwork.
// Return type : BOOL - TRUE if successful, FALSE if not
// Argument : HWND hDlg - Handle of the dialog containing the picture control
// Argument : int nIdStatic - Resource ID of the picture (static) control
// Argument : int nBmpId - Resource ID of the hi-res bitmap
BOOL Sckt_SetHiResBmp(HWND hDlg, int nIdStatic, int nBmpId);
// Function name : Sckt_SetMenuBar
// Description : Changes the menubar beneath a PPC dialog at runtime.
// Return type : BOOL - TRUE if successful, FALSE if not
// Argument : HWND hDlg - Handle of the dialog that will own the menubar
// Argument : int nMenuId - Resource ID of the menu to use in the menubar
//运行时,在PPC对话框中修改menubar
BOOL Sckt_SetMenuBar(HWND hDlg, int nMenuId);
// Function name : Sckt_DialogBoxParam
// Description : Alternative for the WIN32 DialogBox() function. Supplies its own
// : dialog proc that gets called before the developer's dialog proc.
// : The internal dialog proc takes care of a lot of mundane tasks
// : and adds the Socket header to the dialog.
// Return type : int - Same as WIN32 DialogBoxParam() function
// Argument : HINSTANCE hInstance - Same as WIN32 DialogBoxParam() function
// Argument : LPCTSTR lpTemplate - Same as WIN32 DialogBoxParam() function
// Argument : HWND hWndParent - Same as WIN32 DialogBoxParam() function
// Argument : DLGPROC lpDialogFunc - Same as WIN32 DialogBoxParam() function
// Argument : LPARAM lpParam - Same as WIN32 DialogBoxParam() function
int Sckt_DialogBoxParam(HINSTANCE hInstance, LPCTSTR lpTempla, HWND hWndParent, DLGPROC lpDialogFunc,
LPARAM lpParam);
// Function name : Sckt_DialogBox
// Description : Alternative for the WIN32 DialogBox() function. Supplies its own
// : dialog proc that gets called before the developer's dialog proc.
// : The internal dialog proc takes care of a lot of mundane tasks
// : and adds the Socket header to the dialog.
// Return type : int - Same as WIN32 DialogBox() function
// Argument : HINSTANCE hInstance - Same as WIN32 DialogBox() function
// Argument : LPCTSTR lpTemplate - Same as WIN32 DialogBox() function
// Argument : HWND hWndParent - Same as WIN32 DialogBox() function
// Argument : DLGPROC lpDialogFunc - Same as WIN32 DialogBox() function
int Sckt_DialogBox(HINSTANCE hInstance, LPCTSTR lpTemplate, HWND hWndParent, DLGPROC lpDialogFunc);
// Function name : PropertySheet
// Description : Simplifies creating and executing Property Sheets.
// Return type : int - Same as WIN32 PropertySheet() function
// Argument : LPPROPSHEETHEADER lppsph - Pointer to a PROPSHEETHEADER structure
// Argument : LPPROPSHEETPAGE psp - pointer to a PROPSHEETPAGE array
//单一创建和执行特定的页
int Sckt_PropertySheet(LPPROPSHEETHEADER lppsph, LPPROPSHEETPAGE psp);
// Function name : Sckt_DoHelp
// Description : Calls the CE help system with the specified topic using the
// help file specified in Sckt_InitApp
// Return type : void
// Argument : TCHAR * szTopic - String containing the help topic
//调用在Sckt_InitApp中的帮助文件
void Sckt_DoHelp(TCHAR * szTopic);
// Function name : Sckt_SetDialogHelp
// Description : Allows the developer to change the name of the help keyword from
// the default name of the dialog if dialog level help is enabled.
// Return type : BOOL - TRUE if successful, FALSE if not
// Argument : HWND hDlg - Handle to the dialog whose header bmp is to be changed
// Argument : TCHAR * szTopic - String containing the help topic
//在对话框的help处于激活状态时,允许程序员改变help关键字的名称
BOOL Sckt_SetDialogHelp(HWND hDlg, TCHAR * szTopic);
// Function name : Sckt_SetDialogHeaderBmp
// Description : Allows the developer to change the default Alfred image, used in
// : the Socket dialog headers.
// Return type : BOOL - TRUE if successful, FALSE if not
// Argument : HWND hDlg - Handle to the dialog whose header bmp is to be changed
// Argument : int nBmpId - Resource ID of the desired header bmp image
// Argument : int nBmpIdHiRes - Resource ID of the corresponding hi res bmp, if available
BOOL Sckt_SetDialogHeaderBmp(HWND hDlg, int nBmpId, int nBmpIdHiRes);
// Function name : Sckt_SetMainWindow
// Description : records the main window of the application.
// Return type : void
// Argument : HWND hwndMain - The program's main window handle
void Sckt_SetMainWindow(HWND hwndMain);
// Function name : Sckt_InitApp
// Description : Initializes global variables used by the Rad and Raw system.
// Return type : BOOL - TRUE if successful, FALSE if not
// Argument : HINSTANCE hExeInst - The program's instance handle
// Argument : HINSTANCE *lphResInst - Returns the instance of the loaded resource Dll
// Argument : TCHAR * szHelpFileName - Name of HELP file, if available, "" if not
// Argument : BOOL bDialogLevelHelp - TRUE if help is available for each dialog box
//初始化Rad和Raw系统中的全局变量
BOOL Sckt_InitApp(HINSTANCE hExeInst, HINSTANCE *lphResInst, TCHAR * szHelpFileName, BOOL bDialogLevelHelp);
// Function name : Sckt_DeinitApp
// Description : Cleans up by releasing the resource instance handle, if applicable.
// Return type : void
//清除实例句柄,释放资源
void Sckt_DeinitApp();
// Function name : Sckt_SetLogoBitmap
// Description : Sets the control, bitmap, and mask of a bitmap to be drawn with a
// mask -- typically the Socket logo
// Return type : BOOL - TRUE if successful, FALSE if not
// Argument : HWND hDlg - Handle to the dialog whose header bmp is to be changed
// Argument : UINT uiLogoBmpFrame - The dlg ID of the control where the bitmap is drawn
// Argument : UINT uiLogoBmp - Bitmap to be drawn
// Argument : UINT uiLogoBmpMask - Mask used when drawing the bitmap
BOOL Sckt_SetLogoBitmap(HWND hDlg, UINT uiLogoBmpFrame, UINT uiLogoBmp, UINT uiLogoBmpMask);
// Function name : Sckt_CenterWindow
// Description : Centers the specified window onscreen
// Return type : void
// Argument : HWND hWnd - Handle to the window to be centered
void Sckt_CenterWindow(HWND hWnd);
// Function name : Sckt_ComputeWindowCoords
// Description : Returns coordinates for the main app window based on the
// screen size and orientation.
// Return type : void
// Argument : LPRECT lpWndRect - Ptr to a rect whcih will contain the computed coords
BOOL Sckt_ComputeWindowCoords(LPRECT lpWndRect, BOOL *lpbIsLargeScreen);
// Function name : Sckt_AdjustControlPositions
// Description : Allows for debug traces in a monitor window.
// Return type : BOOL
// Argument : HWND hDlg - Handle to the dialog whose controls will be moved
// Argument : int nLowerAmount - Number of pixels to move each control down
void Sckt_AdjustControlPositions(HWND hDlg, int nLowerAmount);
// Function name : Sckt_QuickTrace
// Description : Allows for debug traces in a monitor window.
// Return type : void
// Argument : TCHAR * szDebugTxt - The text to display in the debug window
void Sckt_QuickTrace(TCHAR * szDebugTxt, ...);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -