source: trunk/dll/misc.h@ 1400

Last change on this file since 1400 was 1400, checked in by Gregg Young, 16 years ago

Remainder of changes to rename commafmt.h/c (Ticket 28, 82); Additional strings moved to PCSZs in init.c (Ticket 6); Added WriteDetailsSwitches used it and LoadDetailsSwitches to consolidate inline code (Ticket 343, 344)

  • Property svn:eolstyle set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
RevLine 
[1077]1
2/***********************************************************************
3
[1198]4 $Id: misc.h 1400 2009-03-08 17:50:25Z gyoung $
[1077]5
6 Misc utility functions
7
8 Copyright (c) 1993-98 M. Kimes
[1394]9 Copyright (c) 2008, 2009 Steven H. Levine
[1077]10
11 17 Jul 08 SHL Baseline
[1400]12 08 Mar 09 GKY Add WriteDetailsSwitches and use LoadDetailsSwitches to replace in line code
[1077]13
14***********************************************************************/
15
16#if !defined(MISC_H)
17#define MISC_H
18
19#if !defined(OS2_INCLUDED)
20#include <os2.h>
21#endif
22
[1225]23#include "dircnrs.h" // typedef for DETAILS_SETTINGS
24
[1077]25#ifdef FORTIFY
[1078]26INT GetTidForThread(VOID);
[1077]27INT GetTidForWindow(HWND hwnd);
28#endif
29
[1394]30SHORT AddToListboxBottom(HWND hwnd, PCSZ str);
31BOOL AdjustCnrColRO(HWND hwndCnr, PCSZ title, BOOL readonly, BOOL toggle);
32BOOL AdjustCnrColVis(HWND hwndCnr, PCSZ title, BOOL visible, BOOL toggle);
33VOID AdjustCnrColsForFSType(HWND hwndCnr, PCSZ directory, DETAILS_SETTINGS * pds);
34VOID AdjustCnrColsForPref(HWND hwndCnr, PCSZ directory, DETAILS_SETTINGS * pds,
[1159]35 BOOL compare);
36VOID AdjustDetailsSwitches(HWND hwnd, HWND hwndMenu, USHORT cmd,
[1394]37 PCSZ directory, PCSZ keyroot, DETAILS_SETTINGS * pds,
[1159]38 BOOL compare);
39void BoxWindow(HWND hwnd, HPS hps, LONG color);
[1182]40void Broadcast(HAB hab, HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
[1394]41INT CheckDriveSpaceAvail(PCSZ pTargetPath, ULONGLONG ullSpaceNeeded,
42 ULONGLONG ullFreeSpaceWhenComplete);
[1182]43HWND CheckMenu(HWND hwnd, HWND * hwndMenu, USHORT id);
[1159]44MRESULT CnrDirectEdit(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
[1182]45PMINIRECORDCORE CurrentRecord(HWND hwndCnr);
46void DrawTargetEmphasis(HWND hwnd, BOOL on);
[1159]47void EmphasizeButton(HWND hwnd, BOOL on);
[1394]48INT ExecFile(HWND hwnd, PCSZ filename);
[1159]49HWND FindDirCnr(HWND hwndParent);
[1394]50VOID FixSwitchList(HWND hwnd, PCSZ text);
[1182]51char *GetCmdSpec(BOOL dos);
[1159]52VOID HeapThread(VOID * dummy);
[1182]53BOOL IsFm2Window(HWND hwnd, BOOL chkTid);
[1400]54VOID LoadDetailsSwitches(PCSZ keyroot, DETAILS_SETTINGS *pds);
55VOID WriteDetailsSwitches(PCSZ keyroot, DETAILS_SETTINGS *pds);
[1394]56VOID LoadLibPath(PSZ str, LONG len);
[1159]57VOID OpenEdit(HWND hwnd);
[1182]58VOID PaintRecessedWindow(HWND hwnd, HPS hps, BOOL outtie, BOOL dbl);
[1159]59void PaintSTextWindow(HWND hwnd, HPS hps);
[1182]60VOID PortholeInit(HWND hwndNew, MPARAM mp1, MPARAM mp2);
61BOOL PostMsg(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
[1159]62VOID QuickPopup(HWND hwnd, DIRCNRDATA * dcd, HWND hwndMenu, USHORT id);
63void SayFilter(HWND hwnd, MASK * mask, BOOL archive);
64void SaySort(HWND hwnd, INT sortflags, BOOL archive);
65void SayView(HWND hwnd, ULONG flWindowAttr);
66BOOL SetCnrCols(HWND hwndCnr, BOOL compare);
67VOID SetConditionalCascade(HWND hwndMenu, USHORT id, USHORT def);
68VOID SetDetailsSwitches(HWND hwnd, DETAILS_SETTINGS * pds);
69BOOL SetMenuCheck(HWND hwndMenu, USHORT id, BOOL * bool, BOOL toggle,
[1394]70 PCSZ savename);
[1182]71VOID SetShiftState(VOID);
[1159]72VOID SetSortChecks(HWND hwndMenu, INT sortflags);
73VOID SetSysMenu(HWND hwndSysMenu);
74void SetViewMenu(HWND hwndMenu, ULONG flWindowAttr);
[1182]75VOID SetupCommandMenu(HWND hwndMenu, HWND hwndCnr);
76void SetupWinList(HWND hwndMenu, HWND hwndTop, HWND hwndFrame);
[1159]77BOOL SwitchCommand(HWND hwndMenu, USHORT cmd);
[1394]78BOOL ViewHelp(PCSZ filename);
[1159]79VOID disable_menuitem(HWND hwndMenu, USHORT id, BOOL enable);
80
[1210]81// Data declarations
82extern HWND CollectorDirMenu;
83extern HWND CollectorFileMenu;
84extern HWND DirMenu;
85extern HWND FileMenu;
86extern HWND TreeMenu;
87extern BOOL fDefaultDeletePerm;
88extern BOOL fWorkPlace;
89extern ULONG numswitches;
90extern HSWITCH switches[499];
91
[1077]92#endif // MISC_H
Note: See TracBrowser for help on using the repository browser.