-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathowUtil.h
More file actions
67 lines (54 loc) · 2.12 KB
/
Copy pathowUtil.h
File metadata and controls
67 lines (54 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
/*
* Openwide -- control Windows common dialog
*
* Copyright (c) 2000 Luke Hudson
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
#ifndef OW_UTIL_H
/**
* @author Luke Hudson
* @licence GPL2
*/
#define OW_UTIL_H
#include <windows.h>
enum PromptFileNameMode {OPEN, SAVE};
#define RCWIDTH(r) ((r).right - (r).left + 1)
#define RCHEIGHT(r) ((r).bottom - (r).top + 1)
#define WM_TRAYICON (WM_APP+1)
extern HWND ghwMain, ghwPropSheet;
extern HINSTANCE ghInstance;
extern POWSharedData gPowData;
extern HANDLE ghSharedMem;
extern HANDLE ghMutex;
extern HICON ghIconLG, ghIconSm;
int Add_TrayIcon(HICON hIcon, char *szTip, HWND hwnd, UINT uMsg, DWORD dwState);
static int AddRem_TrayIcon(HICON hIcon, char *szTip, HWND hwnd, UINT uMsg, DWORD dwState, DWORD dwMode);
int cbAddString(HWND hwCB, const char *szStr, LPARAM lpData);
HRESULT CreateLink(LPCSTR lpszPathObj, LPCSTR lpszPathLink, LPCSTR lpszDesc);
BOOL delFile(HWND hwnd, const char *szFile);
int dlgUnits2Pix(HWND hwnd, int units, BOOL bHorz);
void EndTrayOperation(void);
void Error(char *szError, ...);
BOOL fileExists (const char *path);
int getDlgItemRect(HWND hwnd, UINT uID, LPRECT pr);
TCHAR *lbGetItemText(HWND hwLB, int iItem);
int pix2DlgUnits(HWND hwnd, int pix, BOOL bHorz);
char *Prompt_File_Name(int iFlags, HWND hwOwner, const char *pszFilter, const char *pszTitle);
void releaseMutex(void);
int Rem_TrayIcon(HWND hwnd, UINT uMsg, DWORD dwState);
BOOL waitForMutex(void);
#endif