Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

85 lines
2.4 KiB

  1. /*
  2. * dialog.h
  3. *
  4. * Created by Microsoft Corporation.
  5. * (c) Copyright Microsoft Corp. 1990 - 1992 All Rights Reserved
  6. */
  7. //*** INCLUDES ***
  8. #include <commdlg.h>
  9. //*** PROTOTYPES ***
  10. //*** FAR
  11. BOOL FAR FullyQualify(LPSTR, LPSTR);
  12. BOOL FAR OfnGetName(HWND, LPSTR, WORD);
  13. LPSTR FAR OfnGetNewLinkName(HWND, LPSTR);
  14. VOID FAR OfnInit(HANDLE);
  15. INT_PTR CALLBACK fnInsertNew(HWND, UINT, WPARAM, LPARAM);
  16. INT_PTR CALLBACK fnProperties(HWND, UINT, WPARAM, LPARAM);
  17. VOID FAR LinkProperties(VOID);
  18. VOID FAR AboutBox(VOID);
  19. INT_PTR CALLBACK fnAbout( HWND, UINT, WPARAM, LPARAM);
  20. VOID FAR RetryMessage (APPITEMPTR, LONG);
  21. INT_PTR CALLBACK fnRetry(HWND, UINT, WPARAM, LPARAM);
  22. VOID FAR InvalidLink(VOID);
  23. INT_PTR CALLBACK fnInvalidLink(HWND, UINT, WPARAM, LPARAM);
  24. //*** Local
  25. static VOID AddExtension(LPOPENFILENAME);
  26. static VOID Normalize(LPSTR);
  27. static BOOL InitLinkDlg (HWND, INT *, HWND, APPITEMPTR **);
  28. static VOID UpdateLinkButtons(HWND, INT, HWND, APPITEMPTR *);
  29. static BOOL ChangeLinks(HWND, INT, HWND, APPITEMPTR *);
  30. static VOID CancelLinks(HWND, INT, HWND, APPITEMPTR *);
  31. static VOID DisplayUpdate(INT, HWND, APPITEMPTR *, BOOL);
  32. static VOID UndoObjects(VOID);
  33. static VOID DelUndoObjects(BOOL);
  34. static VOID ChangeUpdateOptions(HWND, INT, HWND, APPITEMPTR *, OLEOPT_UPDATE);
  35. static VOID MakeListBoxString(LPSTR, LPSTR, OLEOPT_UPDATE);
  36. //*** MACROS ***
  37. #define END_PROP_DLG(hDlg,pLinks) { \
  38. HANDLE handle; \
  39. handle = LocalHandle((LPSTR)pLinks); \
  40. LocalUnlock(handle); \
  41. LocalFree(handle); \
  42. Hourglass(FALSE); \
  43. hwndProp = (HWND)NULL; \
  44. EndDialog(hDlg, TRUE); \
  45. }
  46. #define CHANGE_LISTBOX_STRING(hwnd,i,pItem,lpLinkData) {\
  47. char pString[CBMESSAGEMAX*4];\
  48. MakeListBoxString(lpLinkData,pString,pItem->uoObject);\
  49. SendMessage(hwndList,LB_DELETESTRING, i , 0L);\
  50. SendMessage(hwndList,LB_INSERTSTRING, i , (long)((LPSTR)pString));\
  51. SendMessage(hwndList,LB_SETSEL, 1, (long)i);\
  52. }
  53. #define CHECK_IF_STATIC(pItem) {\
  54. if (pItem->otObject == OT_STATIC)\
  55. continue;\
  56. }
  57. #define BLOCK_BUSY(fTest) {\
  58. if (fTest)\
  59. {\
  60. fTest = FALSE;\
  61. return TRUE;\
  62. }\
  63. if (cOleWait)\
  64. {\
  65. fTest = TRUE;\
  66. RetryMessage(NULL,RD_CANCEL);\
  67. fTest = FALSE;\
  68. return TRUE;\
  69. }\
  70. }