Annotation of mstools/ole20/samples/ole2ui/edlinks.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * EDLINKS.H
                      3:  *
                      4:  * Internal definitions, structures, and function prototypes for the
                      5:  * OLE 2.0 UI Edit Links dialog.
                      6:  *
                      7:  * Copyright (c)1992 Microsoft Corporation, All Right Reserved
                      8:  */
                      9: 
                     10: 
                     11: #ifndef _LINKS_H_
                     12: #define _LINKS_H_
                     13: 
                     14: //INTERNAL INFORMATION STARTS HERE
                     15: #define szCLOSE   "Close"
                     16: #define OLEUI_SZMAX 255
                     17: #define LINKTYPELEN 9
                     18: #define szNULL    "\0"
                     19: 
                     20: typedef UINT (CALLBACK* COMMDLGHOOKPROC)(HWND, UINT, WPARAM, LPARAM);
                     21: 
                     22: //Internally used structure
                     23: 
                     24: typedef struct tagLINKINFO
                     25:   {
                     26:   DWORD     dwLink;             // app specific identifier of a link
                     27:   LPSTR     lpszDisplayName;    // file based part of name
                     28:   LPSTR     lpszItemName;       // object part of name
                     29:   LPSTR     lpszShortFileName;  // filename without path
                     30:   LPSTR     lpszShortLinkType;  // Short link type - progID
                     31:   LPSTR     lpszFullLinkType;   // Full link type - user friendly name
                     32:   LPSTR     lpszAMX;          // Is the link auto (A) man (M) or dead (X)
                     33:   ULONG     clenFileName;       // count of file part of mon.
                     34:   BOOL      fSourceAvailable;   // bound or not - on boot assume yes??
                     35:   BOOL      fIsAuto;                      // 1 =automatic, 0=manual update
                     36:   BOOL      fIsMarked;                  // 1 = marked, 0 = not
                     37:   BOOL      fDontFree;         // Don't free this data since it's being reused
                     38:   BOOL      fIsSelected;        // item selected or to be selected
                     39:   } LINKINFO, FAR* LPLINKINFO;
                     40: 
                     41:   /*
                     42:   * What we store extra in this structure besides the original caller's
                     43:   * pointer are those fields that we need to modify during the life of
                     44:   * the dialog but that we don't want to change in the original structure
                     45:   * until the user presses OK.
                     46:   */
                     47: 
                     48: typedef struct tagEDITLINKS
                     49:     {
                     50:   //Keep this item first as the Standard* functions depend on it here.
                     51: 
                     52:   LPOLEUIEDITLINKS    lpOEL;       //Original structure passed.
                     53: 
                     54:   BOOL        fClose;             //  Does the button read cancel (0) or
                     55:                                   //  close (1)?
                     56:   int         *rgIndex;           //  Array to hold indexes of selected items
                     57:   int         cSelItems;          //  Number of selected items
                     58:   BOOL        fItemsExist;        //  TRUE, items in lbox, FALSE, none
                     59: 
                     60: } EDITLINKS, *PEDITLINKS, FAR *LPEDITLINKS;
                     61: 
                     62: // Data to and from the ChangeSource dialog hook
                     63: typedef struct tagCHANGESOURCEHOOKDATA
                     64: {
                     65:     LPLINKINFO  lpLI;
                     66:     LPEDITLINKS lpEL;
                     67:     BOOL        fValidLink;
                     68:     LPSTR       lpszFrom;           // string containing prefix of source
                     69:                                     // changed from
                     70:     LPSTR       lpszTo;             // string containing prefix of source
                     71:                                     // source changed to
                     72: } CHANGESOURCEHOOKDATA, *PCHANGESOURCEHOOKDATA, FAR *LPCHANGESOURCEHOOKDATA;
                     73: 
                     74: 
                     75: //Internal function prototypes
                     76: //LINKS.C
                     77: BOOL CALLBACK EXPORT EditLinksDialogProc(HWND, UINT, WPARAM, LPARAM);
                     78: BOOL            FEditLinksInit(HWND, WPARAM, LPARAM);
                     79: BOOL      Container_ChangeSource(HWND, LPEDITLINKS);
                     80: HRESULT   Container_AutomaticManual(HWND, BOOL, LPEDITLINKS);
                     81: HRESULT   CancelLink(HWND, LPEDITLINKS);
                     82: HRESULT   Container_UpdateNow(HWND, LPEDITLINKS);
                     83: HRESULT   Container_OpenSource(HWND, LPEDITLINKS);
                     84: int AddLinkLBItem(HWND hListBox, LPOLEUILINKCONTAINER lpOleUILinkCntr, LPLINKINFO lpLI, BOOL fGetSelected);
                     85: VOID    BreakString(LPLINKINFO);
                     86: int     GetSelectedItems(HWND, int FAR* FAR*);
                     87: BOOL WINAPI ChangeSource(HWND hWndOwner,
                     88:                    LPSTR lpszFile,
                     89:                    UINT cchFile,
                     90:                    UINT iFilterString,
                     91:                    COMMDLGHOOKPROC lpfnBrowseHook,
                     92:                    LPCHANGESOURCEHOOKDATA lpLbhData);
                     93: UINT CALLBACK EXPORT ChangeSourceHook(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam);
                     94: VOID InitControls(HWND hDlg);
                     95: VOID UpdateLinkLBItem(HWND hListBox, int nIndex, LPEDITLINKS lpEL, BOOL bSelect);
                     96: VOID DiffPrefix(LPCSTR lpsz1, LPCSTR lpsz2, char FAR* FAR* lplpszPrefix1, char FAR* FAR* lplpszPrefix2);
                     97: int PopupMessage(HWND hwndParent, UINT idTitle, UINT idMessage, UINT fuStyle);
                     98: VOID ChangeAllLinks(HWND hLIstBox, LPOLEUILINKCONTAINER lpOleUILinkCntr, LPSTR lpszFrom, LPSTR lpszTo);
                     99: int LoadLinkLB(HWND hListBox, LPOLEUILINKCONTAINER lpOleUILinkCntr);
                    100: VOID RefreshLinkLB(HWND hListBox, LPOLEUILINKCONTAINER lpOleUILinkCntr);
                    101: #endif // __LINKS_H__

unix.superglobalmegacorp.com

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