home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 March / Chip_1998-03_cd.bin / tema / eroiica / E32R43B / _SETUP.3 / Group2 / Dde_test.h < prev    next >
C/C++ Source or Header  |  1998-01-19  |  4KB  |  118 lines

  1. /*-------------------------- Parallax Standard H_File ----------------------------
  2.    
  3.       H_File: dde_test.h
  4.  
  5.      Purpose: This file contains the internal function prototyping for the
  6.               main Eroica unit test program's window handling.
  7.  
  8.  
  9.     $nokeywords$
  10.  
  11. --------------------------------------------------------------------------------
  12.           Copyright (c)1996 Parallax Software , All rights reserved.            
  13. ------------------------------------------------------------------------------*/
  14.  
  15. #ifdef _WIN32
  16.  
  17. #ifndef _WINDOWS
  18. #define _WINDOWS
  19. #endif
  20.  
  21. #ifndef _ANSI_
  22. #define _ANSI_
  23. #endif
  24.  
  25. #pragma warning ( disable: 4057 )
  26. #pragma warning ( disable: 4101 )
  27. #pragma warning ( disable: 4115 )
  28. #pragma warning ( disable: 4201 )
  29. #pragma warning ( disable: 4214 )
  30. #pragma warning ( disable: 4244 )
  31. #pragma warning ( disable: 4514 )
  32.  
  33. #endif
  34.  
  35. #include <windows.h>
  36. #include <ddeml.h>
  37.  
  38. /* global variables */
  39. extern HANDLE       ghInst;
  40. extern HWND         ghWndMain;
  41. extern HWND         ghListBox;
  42. extern HWND         ghListBox2;
  43. extern char         szMainMenu[];
  44. extern char         szMainClass[];
  45. extern char         szStatusBarClass[];
  46. extern char         szStatusBarTextClass[];
  47. extern char         szShadowTextClass[];
  48. extern HWND         ghWndStatus;
  49. extern HCONV        ghConv;
  50. extern HSZ          hszServerBase;
  51. extern HSZ          hszServerInst;
  52. extern DWORD        dwAsyncXact;
  53. extern DWORD        idInst;
  54.  
  55. /* unit test functions */
  56. int PASCAL WinMain(HANDLE, HANDLE, LPSTR, int);
  57. long FAR PASCAL MainWndProc(HWND, unsigned, WORD, LONG);
  58. long FAR PASCAL StatusBarWndProc(HWND, UINT, WPARAM, LPARAM );
  59. long FAR PASCAL StatusBarTextWndProc(HWND, UINT, WPARAM, LPARAM );
  60. long FAR PASCAL ShadowTextWndProc(HWND, UINT, WPARAM, LPARAM );
  61.  
  62. /* callback functions */
  63. /* 970224 jk add WIN32 definition of callback function */
  64. #ifndef _WIN32
  65. HDDEDATA EXPENTRY _export DdeCallBack(WORD wType, WORD wFmt, HCONV hConv, HSZ hsz1, HSZ hsz2, HDDEDATA hData, DWORD dwData1, DWORD dwData2);
  66. #else
  67. _declspec(dllexport) HDDEDATA EXPENTRY DdeCallBack(WORD wType, WORD wFmt, HCONV hConv, HSZ hsz1, HSZ hsz2, HDDEDATA hData, DWORD dwData1, DWORD dwData2);
  68. #endif
  69.  
  70. /* utinit functions */
  71. BOOL InitApplication(HANDLE);
  72. BOOL InitInstance(HANDLE, int);
  73.  
  74. #define STNDWIDTH  400              /* Standard size for bitmaps - used to scale */
  75. #define STNDHEIGHT 400              /* bitmaps and window size for different     */
  76.                                     /* screen resolutions.                       */
  77.  
  78. /* externalized variables */
  79. extern HWND    ghWndMain;           /* handle to main window  */
  80. extern HWND    ghListBox;           /* handle to main listbox */
  81. extern char *pErrOnCall;
  82.  
  83. #define __MSG(msg)\
  84.     {\
  85.        LONG index;\
  86.                  index=(LONG)SendMessage( ghListBox2, LB_ADDSTRING, 0, (LONG)(LPSTR)msg );\
  87.        SendMessage( ghListBox2, LB_SETCURSEL, (WPARAM)index, (LPARAM)0 );\
  88.                  SendMessage( ghListBox2, LB_SETCURSEL, (WPARAM)-1, (LPARAM)0 );\
  89.     }
  90.  
  91. #define _MSG(msg)\
  92.     {\
  93.        LONG index;\
  94.        index=(LONG)SendMessage( ghListBox, LB_ADDSTRING, 0, (LONG)(LPSTR)msg );\
  95.        SendMessage( ghListBox, LB_SETCURSEL, (WPARAM)index, (LPARAM)0 );\
  96.        SendMessage( ghListBox, LB_SETCURSEL, (WPARAM)-1, (LPARAM)0 );\
  97.     }
  98.  
  99. #define _FMTMSG(fmt,v) { char m[120]; wsprintf(m,fmt,v); _MSG(m); }
  100. #define _FMTMSG2(fmt,v1,v2) { char m[120]; wsprintf(m,fmt,v1,v2); _MSG(m); }
  101. #define _FMTMSG3(fmt,v1,v2,v3) { char m[120]; wsprintf(m,fmt,v1,v2,v3); _MSG(m); }
  102. #define _FMTMSG4(fmt,v1,v2,v3,v4) { char m[120]; wsprintf(m,fmt,v1,v2,v3,v4); _MSG(m); }
  103.  
  104. #define __FMTMSG(fmt,v) { char m[120]; wsprintf(m,fmt,v); __MSG(m); }
  105. #define __FMTMSG2(fmt,v1,v2) { char m[120]; wsprintf(m,fmt,v1,v2); __MSG(m); }
  106. #define __FMTMSG3(fmt,v1,v2,v3) { char m[120]; wsprintf(m,fmt,v1,v2,v3); __MSG(m); }
  107. #define __FMTMSG4(fmt,v1,v2,v3,v4) { char m[120]; wsprintf(m,fmt,v1,v2,v3,v4); __MSG(m); }
  108.  
  109. #define _MSGBOX(msg)  MessageBox(0,(LPSTR)msg,(LPSTR)"Info",MB_OKCANCEL|MB_ICONQUESTION)
  110.  
  111. extern void LineDlg( void );
  112.  
  113.  
  114. /* DDE_TEST.H */
  115. /* end of file */
  116.  
  117.  
  118.