Annotation of mstools/samples/ddeml/server/server.h, revision 1.1.1.3

1.1.1.3 ! root        1: 
        !             2: /******************************************************************************\
        !             3: *       This is a part of the Microsoft Source Code Samples. 
        !             4: *       Copyright (C) 1993 Microsoft Corporation.
        !             5: *       All rights reserved. 
        !             6: *       This source code is only intended as a supplement to 
        !             7: *       Microsoft Development Tools and/or WinHelp documentation.
        !             8: *       See these sources for detailed information regarding the 
        !             9: *       Microsoft samples programs.
        !            10: \******************************************************************************/
        !            11: 
1.1       root       12: #include <windows.h>
                     13: #include <ddeml.h>
                     14: 
                     15: #define IDM_ABOUT 100
                     16: #define IDM_BLOCKALLCBS 200
                     17: #define IDM_ENABLEONECB 201
                     18: #define IDM_BLOCKNEXTCB 202
                     19: #define IDM_TERMNEXTCB  203
                     20: #define IDM_RUNAWAY     204
                     21: #define IDM_CHANGEDATA  205
                     22: #define IDM_RENDERDELAY 206
                     23: #define IDM_SETTOPIC    207
                     24: #define IDM_SETSERVER   208
                     25: #define IDM_UNBLOCKALLCBS 209
                     26: #define IDM_HELP        210
                     27: #define IDM_CONTEXT     211
                     28: #define IDM_APPOWNED    212
                     29: 
                     30: #define IDS_BADLENGTH   1
                     31: 
                     32: #define MAX_TOPIC       20
                     33: #define MAX_COMMENT     40
                     34: #define MAX_EXEC        40
                     35: #define CCHARS          80
                     36: #define CLINES          40
                     37: 
                     38: #define UM_CHGDATA      (WM_USER + 435)
                     39: 
                     40: #define CSYSTEMITEMS 4
                     41: #define CTESTITEMS  4
                     42: #define CTOPICS     2
                     43: 
                     44: #include "dialog.h"
                     45: 
                     46: /****** Structrues ******/
                     47: 
                     48: // predefined format list item
                     49: 
                     50: typedef struct {
                     51:     ATOM atom;
                     52:     PSTR sz;
                     53: } FORMATINFO;
                     54: #define CFORMATS 3
                     55: 
                     56: extern FORMATINFO aFormats[];
                     57: 
                     58: typedef struct _XFERINFO {
1.1.1.2   root       59:     UINT wType;
                     60:     UINT wFmt;
1.1       root       61:     HCONV hConv;
                     62:     HSZ hszTopic;
                     63:     HSZ hszItem;
                     64:     HDDEDATA hData;
                     65:     DWORD lData1;
                     66:     DWORD lData2;
                     67: } XFERINFO;
                     68: typedef XFERINFO *PXFERINFO;
                     69: 
                     70: typedef struct _ITEMLIST {
                     71:     HSZ hszItem;
                     72:     HDDEDATA (*npfnCallback)(PXFERINFO, WORD);
                     73:     PSTR pszItem;
                     74: } ITEMLIST;
                     75: 
                     76: typedef struct _TOPICLIST {
                     77:     HSZ hszTopic;
                     78:     ITEMLIST *pItemList;
1.1.1.2   root       79:     UINT cItems;
1.1       root       80:     PSTR pszTopic;
                     81: } TOPICLIST;
                     82: 
                     83: typedef struct {    // used to passinfo to/from TextDataEntryDlgProc and
                     84:     HDDEDATA hDdeData;
1.1.1.2   root       85:     UINT wFmt;
1.1       root       86:     HSZ hszItem;
                     87: } XACT;
                     88: 
                     89: 
                     90: 
                     91: // GLOBALS
                     92: 
                     93: extern DWORD idInst;
                     94: extern CONVCONTEXT CCFilter;
                     95: extern HANDLE hInst;
                     96: extern HWND hwndServer;
                     97: extern RECT rcRand;
                     98: extern RECT rcCount;
                     99: extern RECT rcComment;
                    100: extern RECT rcExec;
                    101: extern RECT rcConnCount;
                    102: extern RECT rcRndrDelay;
                    103: extern RECT rcRunaway;
                    104: extern RECT rcAllBlock;
                    105: extern RECT rcNextAction;
                    106: extern RECT rcHugeSize;
                    107: extern RECT rcAppowned;
                    108: extern BOOL fAllBlocked;
                    109: extern BOOL fAllEnabled;
                    110: extern BOOL fEnableOneCB;
                    111: extern BOOL fBlockNextCB;
                    112: extern BOOL fTermNextCB;
                    113: extern BOOL fAppowned;
                    114: extern WORD cRunaway;
                    115: extern WORD RenderDelay;
                    116: extern DWORD count;
                    117: extern HSZ hszAppName;
                    118: extern CHAR szClass[];
                    119: extern CHAR szTopic[MAX_TOPIC];
                    120: extern CHAR szServer[MAX_TOPIC];
                    121: extern CHAR szComment[MAX_COMMENT];
                    122: extern CHAR szExec[MAX_EXEC];
                    123: extern CHAR *pszComment;
                    124: extern WORD seed;
                    125: extern WORD cyText;
                    126: extern WORD cServers;
                    127: extern HDDEDATA hDataHelp[CFORMATS];
                    128: extern HDDEDATA hDataCount[CFORMATS];
                    129: extern HDDEDATA hDataRand[CFORMATS];
                    130: extern HDDEDATA hDataHuge[CFORMATS];
                    131: extern DWORD cbHuge;
                    132: 
                    133: extern CHAR szDdeHelp[];
                    134: extern FORMATINFO aFormats[CFORMATS];
                    135: extern ITEMLIST SystemTopicItemList[CSYSTEMITEMS];
                    136: extern ITEMLIST TestTopicItemList[CTESTITEMS];
                    137: extern TOPICLIST topicList[CTOPICS];
                    138: 
                    139: 
                    140: // FUNCTIONS
                    141: 
                    142: 
                    143: BOOL InitApplication(HANDLE);
                    144: BOOL InitInstance(HANDLE, INT);
1.1.1.2   root      145: INT FAR DoDialog(LPSTR lpTemplateName, DLGPROC lpDlgProc, LPARAM param, BOOL fRememberFocus);
1.1       root      146: LONG  APIENTRY MainWndProc(HWND, UINT, WPARAM, LONG);
                    147: BOOL  APIENTRY About(HWND, UINT, WPARAM, LONG);
                    148: BOOL  APIENTRY RenderDelayDlgProc(HWND, UINT, WPARAM, LONG);
                    149: BOOL  APIENTRY SetTopicDlgProc(HWND, UINT, WPARAM, LONG);
                    150: BOOL  APIENTRY SetServerDlgProc(HWND, UINT, WPARAM, LONG);
                    151: BOOL  APIENTRY ContextDlgProc(HWND, UINT, WPARAM, LONG);
                    152: VOID PaintServer(HWND hwnd);
                    153: VOID DrawTextLine(HDC hdc, RECT *prcClip, RECT *prcText, PSTR psz);
1.1.1.2   root      154: HDDEDATA CALLBACK DdeCallback(UINT wType, UINT wFmt, HCONV hConv, HSZ hszTopic,
1.1       root      155:         HSZ hszItem, HDDEDATA hData, DWORD lData1, DWORD lData2);
                    156: HDDEDATA TopicListXfer(PXFERINFO pXferInfo, WORD iFmt);
                    157: HDDEDATA ItemListXfer(PXFERINFO pXferInfo, WORD iFmt);
                    158: HDDEDATA sysFormatsXfer(PXFERINFO pXferInfo, WORD iFmt);
                    159: HDDEDATA TestRandomXfer(PXFERINFO pXferInfo, WORD iFmt);
                    160: HDDEDATA TestCountXfer(PXFERINFO pXferInfo, WORD iFmt);
                    161: HDDEDATA TestHugeXfer(PXFERINFO pXferInfo, WORD iFmt);
                    162: HDDEDATA HelpXfer(PXFERINFO pXferInfo, WORD iFmt);
                    163: VOID Hszize(VOID);
                    164: VOID UnHszize(VOID);
                    165: VOID Delay(DWORD delay, BOOL fModal);
                    166: 
                    167: 

unix.superglobalmegacorp.com

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