Annotation of mstools/h/cpl.h, revision 1.1

1.1     ! root        1: /*****************************************************************************\
        !             2: *                                                                             *
        !             3: * cpl.h -       Control panel extension DLL definitions                       *
        !             4: *                                                                             *
        !             5: *               Version 3.10                                                  *
        !             6: *                                                                             *
        !             7: *               Copyright (c) 1992, Microsoft Corp.  All rights reserved      *
        !             8: *                                                                             *
        !             9: ******************************************************************************
        !            10: *  General rules for being installed in the Control Panel:
        !            11: *
        !            12: *      1) The DLL must export a function named CPlApplet which will handle
        !            13: *         the messages discussed below.
        !            14: *      2) If the applet needs to save information in CONTROL.INI minimize
        !            15: *         clutter by using the application name [MMCPL.appletname].
        !            16: *      2) If the applet is refrenced in CONTROL.INI under [MMCPL] use
        !            17: *         the following form:
        !            18: *              ...
        !            19: *              [MMCPL]
        !            20: *              uniqueName=c:\mydir\myapplet.dll
        !            21: *              ...
        !            22: *
        !            23: *
        !            24: *  The order applet DLL's are loaded by CONTROL.EXE is:
        !            25: *
        !            26: *      1) MAIN.CPL is loaded from the windows system directory.
        !            27: *
        !            28: *      2) Installable drivers that are loaded and export the
        !            29: *         CplApplet() routine.
        !            30: *
        !            31: *      3) DLL's specified in the [MMCPL] section of CONTROL.INI.
        !            32: *
        !            33: *      4) DLL's named *.CPL from windows system directory.
        !            34: *
        !            35: */
        !            36: #ifndef _INC_CPL
        !            37: #define _INC_CPL
        !            38: 
        !            39: #ifndef RC_INVOKED
        !            40: #pragma pack(1)         /* Assume byte packing throughout */
        !            41: #endif /* RC_INVOKED */
        !            42: 
        !            43: #ifdef __cplusplus
        !            44: extern "C" {            /* Assume C declarations for C++ */
        !            45: #endif /* __cplusplus */
        !            46: 
        !            47: /*
        !            48:  * CONTROL.EXE will answer this message and launch an applet
        !            49:  *
        !            50:  * WM_CPL_LAUNCH
        !            51:  *
        !            52:  *      wParam      - window handle of calling app
        !            53:  *      lParam      - LPSTR of name of applet to launch
        !            54:  *
        !            55:  * WM_CPL_LAUNCHED
        !            56:  *
        !            57:  *      wParam      - TRUE/FALSE if applet was launched
        !            58:  *      lParam      - NULL
        !            59:  *
        !            60:  * CONTROL.EXE will post this message to the caller when the applet returns
        !            61:  * (ie., when wParam is a valid window handle)
        !            62:  *
        !            63:  */
        !            64: #define WM_CPL_LAUNCH   (WM_USER+1000)
        !            65: #define WM_CPL_LAUNCHED (WM_USER+1001)
        !            66: 
        !            67: /* A function prototype for CPlApplet() */
        !            68: 
        !            69: //typedef LRESULT (APIENTRY *APPLET_PROC)(HWND hwndCpl, UINT msg, LPARAM lParam1, LPARAM lParam2);
        !            70: typedef LONG (APIENTRY *APPLET_PROC)(HWND hwndCpl, UINT msg, LONG lParam1, LONG lParam2);
        !            71: 
        !            72: /* The data structure CPlApplet() must fill in. */
        !            73: 
        !            74: typedef struct tagCPLINFO
        !            75: {
        !            76:     int     idIcon;     /* icon resource id, provided by CPlApplet() */
        !            77:     int     idName;     /* name string res. id, provided by CPlApplet() */
        !            78:     int     idInfo;     /* info string res. id, provided by CPlApplet() */
        !            79:     LONG    lData;      /* user defined data */
        !            80: } CPLINFO, *PCPLINFO, FAR *LPCPLINFO;
        !            81: 
        !            82: typedef struct tagNEWCPLINFO
        !            83: {
        !            84:     DWORD   dwSize;         /* similar to the commdlg */
        !            85:     DWORD    dwFlags;
        !            86:     DWORD   dwHelpContext;  /* help context to use */
        !            87:     LONG    lData;          /* user defined data */
        !            88:     HICON   hIcon;          /* icon to use, this is owned by CONTROL.EXE (may be deleted) */
        !            89:     char    szName[32];     /* short name */
        !            90:     char    szInfo[64];     /* long name (status line) */
        !            91:     char    szHelpFile[128];/* path to help file to use */
        !            92: } NEWCPLINFO, *PNEWCPLINFO, FAR *LPNEWCPLINFO;
        !            93: 
        !            94: 
        !            95: /* The messages CPlApplet() must handle: */
        !            96: 
        !            97: #define CPL_INIT        1
        !            98: /*  This message is sent to indicate CPlApplet() was found. */
        !            99: /*  lParam1 and lParam2 are not defined. */
        !           100: /*  Return TRUE or FALSE indicating whether the control panel should proceed. */
        !           101: 
        !           102: 
        !           103: #define CPL_GETCOUNT    2
        !           104: /*  This message is sent to determine the number of applets to be displayed. */
        !           105: /*  lParam1 and lParam2 are not defined. */
        !           106: /*  Return the number of applets you wish to display in the control */
        !           107: /*  panel window. */
        !           108: 
        !           109: 
        !           110: #define CPL_INQUIRE     3
        !           111: /*  This message is sent for information about each applet. */
        !           112: /*  lParam1 is the applet number to register, a value from 0 to */
        !           113: /*  (CPL_GETCOUNT - 1).  lParam2 is a far ptr to a CPLINFO structure. */
        !           114: /*  Fill in CPL_INFO's idIcon, idName, idInfo and lData fields with */
        !           115: /*  the resource id for an icon to display, name and description string ids, */
        !           116: /*  and a long data item associated with applet #lParam1. */
        !           117: 
        !           118: 
        !           119: #define CPL_SELECT      4
        !           120: /*  This message is sent when the applet's icon has been clicked upon. */
        !           121: /*  lParam1 is the applet number which was selected.  lParam2 is the */
        !           122: /*  applet's lData value. */
        !           123: 
        !           124: 
        !           125: #define CPL_DBLCLK      5
        !           126: /*  This message is sent when the applet's icon has been double-clicked */
        !           127: /*  upon.  lParam1 is the applet number which was selected.  lParam2 is the */
        !           128: /*  applet's lData value. */
        !           129: /*  This message should initiate the applet's dialog box. */
        !           130: 
        !           131: 
        !           132: #define CPL_STOP        6
        !           133: /*  This message is sent for each applet when the control panel is exiting. */
        !           134: /*  lParam1 is the applet number.  lParam2 is the applet's lData  value. */
        !           135: /*  Do applet specific cleaning up here. */
        !           136: 
        !           137: 
        !           138: #define CPL_EXIT        7
        !           139: /*  This message is sent just before the control panel calls FreeLibrary. */
        !           140: /*  lParam1 and lParam2 are not defined. */
        !           141: /*  Do non-applet specific cleaning up here. */
        !           142: 
        !           143: 
        !           144: #define CPL_NEWINQUIRE    8
        !           145: /* this is the same as CPL_INQUIRE execpt lParam2 is a pointer to a */
        !           146: /* NEWCPLINFO structure.  this will be sent before the CPL_INQUIRE */
        !           147: /* and if it is responed to (return != 0) CPL_INQUIRE will not be sent */
        !           148: 
        !           149: #define CPL_DO_PRINTER_SETUP    100    /* ;Internal */
        !           150: #define CPL_DO_NETPRN_SETUP     101    /* ;Internal */
        !           151: 
        !           152: #ifdef __cplusplus
        !           153: }
        !           154: #endif    /* __cplusplus */
        !           155: 
        !           156: #ifndef RC_INVOKED
        !           157: #pragma pack()
        !           158: #endif  /* RC_INVOKED */
        !           159: 
        !           160: #endif  /* _INC_CPL */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.