mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-08 08:07:06 -06:00
15.06
This commit is contained in:
committed by
Kornel Lesiński
parent
54490d51d5
commit
cba375916f
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "../Common/MyWindows.h"
|
||||
|
||||
#ifdef UNDER_CE
|
||||
#include <commdlg.h>
|
||||
#endif
|
||||
|
||||
@@ -34,7 +34,7 @@ LRESULT CComboBox::GetLBText(int index, CSysString &s)
|
||||
LRESULT CComboBox::AddString(LPCWSTR s)
|
||||
{
|
||||
if (g_IsNT)
|
||||
return SendMessageW(CB_ADDSTRING, 0, (LPARAM)s);
|
||||
return SendMsgW(CB_ADDSTRING, 0, (LPARAM)s);
|
||||
return AddString(GetSystemString(s));
|
||||
}
|
||||
|
||||
@@ -43,10 +43,10 @@ LRESULT CComboBox::GetLBText(int index, UString &s)
|
||||
s.Empty();
|
||||
if (g_IsNT)
|
||||
{
|
||||
LRESULT len = SendMessageW(CB_GETLBTEXTLEN, index, 0);
|
||||
LRESULT len = SendMsgW(CB_GETLBTEXTLEN, index, 0);
|
||||
if (len == CB_ERR)
|
||||
return len;
|
||||
LRESULT len2 = SendMessageW(CB_GETLBTEXT, index, (LPARAM)s.GetBuf((unsigned)len));
|
||||
LRESULT len2 = SendMsgW(CB_GETLBTEXT, index, (LPARAM)s.GetBuf((unsigned)len));
|
||||
if (len2 == CB_ERR)
|
||||
return len;
|
||||
if (len > len2)
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#ifndef __WINDOWS_CONTROL_COMBOBOX_H
|
||||
#define __WINDOWS_CONTROL_COMBOBOX_H
|
||||
|
||||
#include "../../Common/MyWindows.h"
|
||||
|
||||
#include <commctrl.h>
|
||||
|
||||
#include "../Window.h"
|
||||
@@ -13,28 +15,28 @@ namespace NControl {
|
||||
class CComboBox: public CWindow
|
||||
{
|
||||
public:
|
||||
void ResetContent() { SendMessage(CB_RESETCONTENT, 0, 0); }
|
||||
LRESULT AddString(LPCTSTR s) { return SendMessage(CB_ADDSTRING, 0, (LPARAM)s); }
|
||||
void ResetContent() { SendMsg(CB_RESETCONTENT, 0, 0); }
|
||||
LRESULT AddString(LPCTSTR s) { return SendMsg(CB_ADDSTRING, 0, (LPARAM)s); }
|
||||
#ifndef _UNICODE
|
||||
LRESULT AddString(LPCWSTR s);
|
||||
#endif
|
||||
LRESULT SetCurSel(int index) { return SendMessage(CB_SETCURSEL, index, 0); }
|
||||
int GetCurSel() { return (int)SendMessage(CB_GETCURSEL, 0, 0); }
|
||||
int GetCount() { return (int)SendMessage(CB_GETCOUNT, 0, 0); }
|
||||
LRESULT SetCurSel(int index) { return SendMsg(CB_SETCURSEL, index, 0); }
|
||||
int GetCurSel() { return (int)SendMsg(CB_GETCURSEL, 0, 0); }
|
||||
int GetCount() { return (int)SendMsg(CB_GETCOUNT, 0, 0); }
|
||||
|
||||
LRESULT GetLBTextLen(int index) { return SendMessage(CB_GETLBTEXTLEN, index, 0); }
|
||||
LRESULT GetLBText(int index, LPTSTR s) { return SendMessage(CB_GETLBTEXT, index, (LPARAM)s); }
|
||||
LRESULT GetLBTextLen(int index) { return SendMsg(CB_GETLBTEXTLEN, index, 0); }
|
||||
LRESULT GetLBText(int index, LPTSTR s) { return SendMsg(CB_GETLBTEXT, index, (LPARAM)s); }
|
||||
LRESULT GetLBText(int index, CSysString &s);
|
||||
#ifndef _UNICODE
|
||||
LRESULT GetLBText(int index, UString &s);
|
||||
#endif
|
||||
|
||||
LRESULT SetItemData(int index, LPARAM lParam) { return SendMessage(CB_SETITEMDATA, index, lParam); }
|
||||
LRESULT GetItemData(int index) { return SendMessage(CB_GETITEMDATA, index, 0); }
|
||||
LRESULT SetItemData(int index, LPARAM lParam) { return SendMsg(CB_SETITEMDATA, index, lParam); }
|
||||
LRESULT GetItemData(int index) { return SendMsg(CB_GETITEMDATA, index, 0); }
|
||||
|
||||
LRESULT GetItemData_of_CurSel() { return GetItemData(GetCurSel()); }
|
||||
|
||||
void ShowDropDown(bool show = true) { SendMessage(CB_SHOWDROPDOWN, show ? TRUE : FALSE, 0); }
|
||||
void ShowDropDown(bool show = true) { SendMsg(CB_SHOWDROPDOWN, show ? TRUE : FALSE, 0); }
|
||||
};
|
||||
|
||||
#ifndef UNDER_CE
|
||||
@@ -42,18 +44,18 @@ public:
|
||||
class CComboBoxEx: public CComboBox
|
||||
{
|
||||
public:
|
||||
bool SetUnicodeFormat(bool fUnicode) { return LRESULTToBool(SendMessage(CBEM_SETUNICODEFORMAT, BOOLToBool(fUnicode), 0)); }
|
||||
bool SetUnicodeFormat(bool fUnicode) { return LRESULTToBool(SendMsg(CBEM_SETUNICODEFORMAT, BOOLToBool(fUnicode), 0)); }
|
||||
|
||||
LRESULT DeleteItem(int index) { return SendMessage(CBEM_DELETEITEM, index, 0); }
|
||||
LRESULT InsertItem(COMBOBOXEXITEM *item) { return SendMessage(CBEM_INSERTITEM, 0, (LPARAM)item); }
|
||||
LRESULT DeleteItem(int index) { return SendMsg(CBEM_DELETEITEM, index, 0); }
|
||||
LRESULT InsertItem(COMBOBOXEXITEM *item) { return SendMsg(CBEM_INSERTITEM, 0, (LPARAM)item); }
|
||||
#ifndef _UNICODE
|
||||
LRESULT InsertItem(COMBOBOXEXITEMW *item) { return SendMessage(CBEM_INSERTITEMW, 0, (LPARAM)item); }
|
||||
LRESULT InsertItem(COMBOBOXEXITEMW *item) { return SendMsg(CBEM_INSERTITEMW, 0, (LPARAM)item); }
|
||||
#endif
|
||||
|
||||
LRESULT SetItem(COMBOBOXEXITEM *item) { return SendMessage(CBEM_SETITEM, 0, (LPARAM)item); }
|
||||
DWORD SetExtendedStyle(DWORD exMask, DWORD exStyle) { return (DWORD)SendMessage(CBEM_SETEXTENDEDSTYLE, exMask, exStyle); }
|
||||
HWND GetEditControl() { return (HWND)SendMessage(CBEM_GETEDITCONTROL, 0, 0); }
|
||||
HIMAGELIST SetImageList(HIMAGELIST imageList) { return (HIMAGELIST)SendMessage(CBEM_SETIMAGELIST, 0, (LPARAM)imageList); }
|
||||
LRESULT SetItem(COMBOBOXEXITEM *item) { return SendMsg(CBEM_SETITEM, 0, (LPARAM)item); }
|
||||
DWORD SetExtendedStyle(DWORD exMask, DWORD exStyle) { return (DWORD)SendMsg(CBEM_SETEXTENDEDSTYLE, exMask, exStyle); }
|
||||
HWND GetEditControl() { return (HWND)SendMsg(CBEM_GETEDITCONTROL, 0, 0); }
|
||||
HIMAGELIST SetImageList(HIMAGELIST imageList) { return (HIMAGELIST)SendMsg(CBEM_SETIMAGELIST, 0, (LPARAM)imageList); }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,6 +5,10 @@
|
||||
|
||||
#ifdef UNDER_CE
|
||||
|
||||
#include "../../Common/MyWindows.h"
|
||||
|
||||
#include <commctrl.h>
|
||||
|
||||
#include "../Window.h"
|
||||
|
||||
namespace NWindows {
|
||||
@@ -21,10 +25,10 @@ public:
|
||||
|
||||
// Macros
|
||||
// void Destroy() { CommandBar_Destroy(_window); }
|
||||
// bool AddButtons(UINT numButtons, LPTBBUTTON buttons) { return BOOLToBool(SendMessage(TB_ADDBUTTONS, (WPARAM)numButtons, (LPARAM)buttons)); }
|
||||
bool InsertButton(int iButton, LPTBBUTTON button) { return BOOLToBool(SendMessage(TB_INSERTBUTTON, (WPARAM)iButton, (LPARAM)button)); }
|
||||
BOOL AddToolTips(UINT numToolTips, LPTSTR toolTips) { return BOOLToBool(SendMessage(TB_SETTOOLTIPS, (WPARAM)numToolTips, (LPARAM)toolTips)); }
|
||||
void AutoSize() { SendMessage(TB_AUTOSIZE, 0, 0); }
|
||||
// bool AddButtons(UINT numButtons, LPTBBUTTON buttons) { return BOOLToBool(SendMsg(TB_ADDBUTTONS, (WPARAM)numButtons, (LPARAM)buttons)); }
|
||||
bool InsertButton(int iButton, LPTBBUTTON button) { return BOOLToBool(SendMsg(TB_INSERTBUTTON, (WPARAM)iButton, (LPARAM)button)); }
|
||||
BOOL AddToolTips(UINT numToolTips, LPTSTR toolTips) { return BOOLToBool(SendMsg(TB_SETTOOLTIPS, (WPARAM)numToolTips, (LPARAM)toolTips)); }
|
||||
void AutoSize() { SendMsg(TB_AUTOSIZE, 0, 0); }
|
||||
|
||||
bool AddAdornments(DWORD dwFlags) { return BOOLToBool(::CommandBar_AddAdornments(_window, dwFlags, 0)); }
|
||||
int AddBitmap(HINSTANCE hInst, int idBitmap, int iNumImages, int iImageWidth, int iImageHeight) { return ::CommandBar_AddBitmap(_window, hInst, idBitmap, iNumImages, iImageWidth, iImageHeight); }
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace NControl {
|
||||
class CEdit: public CWindow
|
||||
{
|
||||
public:
|
||||
void SetPasswordChar(WPARAM c) { SendMessage(EM_SETPASSWORDCHAR, c); }
|
||||
void SetPasswordChar(WPARAM c) { SendMsg(EM_SETPASSWORDCHAR, c); }
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
#ifndef __WINDOWS_CONTROL_LISTVIEW_H
|
||||
#define __WINDOWS_CONTROL_LISTVIEW_H
|
||||
|
||||
#include "../Window.h"
|
||||
#include "../../Common/MyWindows.h"
|
||||
|
||||
#include <commctrl.h>
|
||||
|
||||
#include "../Window.h"
|
||||
|
||||
namespace NWindows {
|
||||
namespace NControl {
|
||||
|
||||
@@ -37,11 +39,11 @@ public:
|
||||
|
||||
#ifndef _UNICODE
|
||||
|
||||
int InsertColumn(int columnIndex, const LVCOLUMNW *columnInfo) { return (int)SendMessage(LVM_INSERTCOLUMNW, (WPARAM)columnIndex, (LPARAM)columnInfo); }
|
||||
int InsertColumn(int columnIndex, const LVCOLUMNW *columnInfo) { return (int)SendMsg(LVM_INSERTCOLUMNW, (WPARAM)columnIndex, (LPARAM)columnInfo); }
|
||||
int InsertColumn(int columnIndex, LPCWSTR text, int width);
|
||||
int InsertItem(const LV_ITEMW* item) { return (int)SendMessage(LVM_INSERTITEMW, 0, (LPARAM)item); }
|
||||
int InsertItem(const LV_ITEMW* item) { return (int)SendMsg(LVM_INSERTITEMW, 0, (LPARAM)item); }
|
||||
int InsertItem(int index, LPCWSTR text);
|
||||
bool SetItem(const LV_ITEMW* item) { return BOOLToBool((BOOL)SendMessage(LVM_SETITEMW, 0, (LPARAM)item)); }
|
||||
bool SetItem(const LV_ITEMW* item) { return BOOLToBool((BOOL)SendMsg(LVM_SETITEMW, 0, (LPARAM)item)); }
|
||||
int SetSubItem(int index, int subIndex, LPCWSTR text);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,10 @@
|
||||
#ifndef __WINDOWS_CONTROL_PROGRESSBAR_H
|
||||
#define __WINDOWS_CONTROL_PROGRESSBAR_H
|
||||
|
||||
#include "../../Common/MyWindows.h"
|
||||
|
||||
#include <commctrl.h>
|
||||
|
||||
#include "../Window.h"
|
||||
|
||||
namespace NWindows {
|
||||
@@ -11,18 +15,18 @@ namespace NControl {
|
||||
class CProgressBar: public CWindow
|
||||
{
|
||||
public:
|
||||
LRESULT SetPos(int pos) { return SendMessage(PBM_SETPOS, pos, 0); }
|
||||
LRESULT DeltaPos(int increment) { return SendMessage(PBM_DELTAPOS, increment, 0); }
|
||||
UINT GetPos() { return (UINT)SendMessage(PBM_GETPOS, 0, 0); }
|
||||
LRESULT SetRange(unsigned short minValue, unsigned short maxValue) { return SendMessage(PBM_SETRANGE, 0, MAKELPARAM(minValue, maxValue)); }
|
||||
DWORD SetRange32(int minValue, int maxValue) { return (DWORD)SendMessage(PBM_SETRANGE32, minValue, maxValue); }
|
||||
int SetStep(int step) { return (int)SendMessage(PBM_SETSTEP, step, 0); }
|
||||
LRESULT StepIt() { return SendMessage(PBM_STEPIT, 0, 0); }
|
||||
INT GetRange(bool minValue, PPBRANGE range) { return (INT)SendMessage(PBM_GETRANGE, BoolToBOOL(minValue), (LPARAM)range); }
|
||||
LRESULT SetPos(int pos) { return SendMsg(PBM_SETPOS, pos, 0); }
|
||||
LRESULT DeltaPos(int increment) { return SendMsg(PBM_DELTAPOS, increment, 0); }
|
||||
UINT GetPos() { return (UINT)SendMsg(PBM_GETPOS, 0, 0); }
|
||||
LRESULT SetRange(unsigned short minValue, unsigned short maxValue) { return SendMsg(PBM_SETRANGE, 0, MAKELPARAM(minValue, maxValue)); }
|
||||
DWORD SetRange32(int minValue, int maxValue) { return (DWORD)SendMsg(PBM_SETRANGE32, minValue, maxValue); }
|
||||
int SetStep(int step) { return (int)SendMsg(PBM_SETSTEP, step, 0); }
|
||||
LRESULT StepIt() { return SendMsg(PBM_STEPIT, 0, 0); }
|
||||
INT GetRange(bool minValue, PPBRANGE range) { return (INT)SendMsg(PBM_GETRANGE, BoolToBOOL(minValue), (LPARAM)range); }
|
||||
|
||||
#ifndef UNDER_CE
|
||||
COLORREF SetBarColor(COLORREF color) { return (COLORREF)SendMessage(PBM_SETBARCOLOR, 0, color); }
|
||||
COLORREF SetBackgroundColor(COLORREF color) { return (COLORREF)SendMessage(PBM_SETBKCOLOR, 0, color); }
|
||||
COLORREF SetBarColor(COLORREF color) { return (COLORREF)SendMsg(PBM_SETBARCOLOR, 0, color); }
|
||||
COLORREF SetBackgroundColor(COLORREF color) { return (COLORREF)SendMsg(PBM_SETBKCOLOR, 0, color); }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#ifndef __WINDOWS_CONTROL_PROPERTYPAGE_H
|
||||
#define __WINDOWS_CONTROL_PROPERTYPAGE_H
|
||||
|
||||
#include "../../Common/MyWindows.h"
|
||||
|
||||
#include <prsht.h>
|
||||
|
||||
#include "Dialog.h"
|
||||
|
||||
@@ -12,21 +12,21 @@ class CReBar: public NWindows::CWindow
|
||||
{
|
||||
public:
|
||||
bool SetBarInfo(LPREBARINFO barInfo)
|
||||
{ return LRESULTToBool(SendMessage(RB_SETBARINFO, 0, (LPARAM)barInfo)); }
|
||||
{ return LRESULTToBool(SendMsg(RB_SETBARINFO, 0, (LPARAM)barInfo)); }
|
||||
bool InsertBand(int index, LPREBARBANDINFO bandInfo)
|
||||
{ return LRESULTToBool(SendMessage(RB_INSERTBAND, index, (LPARAM)bandInfo)); }
|
||||
{ return LRESULTToBool(SendMsg(RB_INSERTBAND, index, (LPARAM)bandInfo)); }
|
||||
bool SetBandInfo(unsigned index, LPREBARBANDINFO bandInfo)
|
||||
{ return LRESULTToBool(SendMessage(RB_SETBANDINFO, index, (LPARAM)bandInfo)); }
|
||||
{ return LRESULTToBool(SendMsg(RB_SETBANDINFO, index, (LPARAM)bandInfo)); }
|
||||
void MaximizeBand(unsigned index, bool ideal)
|
||||
{ SendMessage(RB_MAXIMIZEBAND, index, BoolToBOOL(ideal)); }
|
||||
{ SendMsg(RB_MAXIMIZEBAND, index, BoolToBOOL(ideal)); }
|
||||
bool SizeToRect(LPRECT rect)
|
||||
{ return LRESULTToBool(SendMessage(RB_SIZETORECT, 0, (LPARAM)rect)); }
|
||||
{ return LRESULTToBool(SendMsg(RB_SIZETORECT, 0, (LPARAM)rect)); }
|
||||
UINT GetHeight()
|
||||
{ return (UINT)SendMessage(RB_GETBARHEIGHT); }
|
||||
{ return (UINT)SendMsg(RB_GETBARHEIGHT); }
|
||||
UINT GetBandCount()
|
||||
{ return (UINT)SendMessage(RB_GETBANDCOUNT); }
|
||||
{ return (UINT)SendMsg(RB_GETBANDCOUNT); }
|
||||
bool DeleteBand(UINT index)
|
||||
{ return LRESULTToBool(SendMessage(RB_DELETEBAND, index)); }
|
||||
{ return LRESULTToBool(SendMsg(RB_DELETEBAND, index)); }
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
@@ -11,15 +11,15 @@ namespace NControl {
|
||||
class CStatic: public CWindow
|
||||
{
|
||||
public:
|
||||
HANDLE SetImage(WPARAM imageType, HANDLE handle) { return (HANDLE)SendMessage(STM_SETIMAGE, imageType, (LPARAM)handle); }
|
||||
HANDLE GetImage(WPARAM imageType) { return (HANDLE)SendMessage(STM_GETIMAGE, imageType, 0); }
|
||||
HANDLE SetImage(WPARAM imageType, HANDLE handle) { return (HANDLE)SendMsg(STM_SETIMAGE, imageType, (LPARAM)handle); }
|
||||
HANDLE GetImage(WPARAM imageType) { return (HANDLE)SendMsg(STM_GETIMAGE, imageType, 0); }
|
||||
|
||||
#ifdef UNDER_CE
|
||||
HICON SetIcon(HICON icon) { return (HICON)SetImage(IMAGE_ICON, icon); }
|
||||
HICON GetIcon() { return (HICON)GetImage(IMAGE_ICON); }
|
||||
#else
|
||||
HICON SetIcon(HICON icon) { return (HICON)SendMessage(STM_SETICON, (WPARAM)icon, 0); }
|
||||
HICON GetIcon() { return (HICON)SendMessage(STM_GETICON, 0, 0); }
|
||||
HICON SetIcon(HICON icon) { return (HICON)SendMsg(STM_SETICON, (WPARAM)icon, 0); }
|
||||
HICON GetIcon() { return (HICON)SendMsg(STM_GETICON, 0, 0); }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ public:
|
||||
bool SetText(LPCTSTR text)
|
||||
{ return CWindow::SetText(text); }
|
||||
bool SetText(unsigned index, LPCTSTR text, UINT type)
|
||||
{ return LRESULTToBool(SendMessage(SB_SETTEXT, index | type, (LPARAM)text)); }
|
||||
{ return LRESULTToBool(SendMsg(SB_SETTEXT, index | type, (LPARAM)text)); }
|
||||
bool SetText(unsigned index, LPCTSTR text)
|
||||
{ return SetText(index, text, 0); }
|
||||
|
||||
@@ -26,15 +26,15 @@ public:
|
||||
bool SetText(LPCWSTR text)
|
||||
{ return CWindow::SetText(text); }
|
||||
bool SetText(unsigned index, LPCWSTR text, UINT type)
|
||||
{ return LRESULTToBool(SendMessage(SB_SETTEXTW, index | type, (LPARAM)text)); }
|
||||
{ return LRESULTToBool(SendMsg(SB_SETTEXTW, index | type, (LPARAM)text)); }
|
||||
bool SetText(unsigned index, LPCWSTR text)
|
||||
{ return SetText(index, text, 0); }
|
||||
#endif
|
||||
|
||||
bool SetParts(unsigned numParts, const int *edgePostions)
|
||||
{ return LRESULTToBool(SendMessage(SB_SETPARTS, numParts, (LPARAM)edgePostions)); }
|
||||
{ return LRESULTToBool(SendMsg(SB_SETPARTS, numParts, (LPARAM)edgePostions)); }
|
||||
void Simple(bool simple)
|
||||
{ SendMessage(SB_SIMPLE, BoolToBOOL(simple), 0); }
|
||||
{ SendMsg(SB_SIMPLE, BoolToBOOL(simple), 0); }
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace NControl {
|
||||
class CToolBar: public NWindows::CWindow
|
||||
{
|
||||
public:
|
||||
void AutoSize() { SendMessage(TB_AUTOSIZE, 0, 0); }
|
||||
DWORD GetButtonSize() { return (DWORD)SendMessage(TB_GETBUTTONSIZE, 0, 0); }
|
||||
void AutoSize() { SendMsg(TB_AUTOSIZE, 0, 0); }
|
||||
DWORD GetButtonSize() { return (DWORD)SendMsg(TB_GETBUTTONSIZE, 0, 0); }
|
||||
|
||||
bool GetMaxSize(LPSIZE size)
|
||||
#ifdef UNDER_CE
|
||||
@@ -25,16 +25,16 @@ public:
|
||||
}
|
||||
#else
|
||||
{
|
||||
return LRESULTToBool(SendMessage(TB_GETMAXSIZE, 0, (LPARAM)size));
|
||||
return LRESULTToBool(SendMsg(TB_GETMAXSIZE, 0, (LPARAM)size));
|
||||
}
|
||||
#endif
|
||||
|
||||
bool EnableButton(UINT buttonID, bool enable) { return LRESULTToBool(SendMessage(TB_ENABLEBUTTON, buttonID, MAKELONG(BoolToBOOL(enable), 0))); }
|
||||
void ButtonStructSize() { SendMessage(TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON)); }
|
||||
HIMAGELIST SetImageList(UINT listIndex, HIMAGELIST imageList) { return HIMAGELIST(SendMessage(TB_SETIMAGELIST, listIndex, (LPARAM)imageList)); }
|
||||
bool AddButton(UINT numButtons, LPTBBUTTON buttons) { return LRESULTToBool(SendMessage(TB_ADDBUTTONS, numButtons, (LPARAM)buttons)); }
|
||||
bool EnableButton(UINT buttonID, bool enable) { return LRESULTToBool(SendMsg(TB_ENABLEBUTTON, buttonID, MAKELONG(BoolToBOOL(enable), 0))); }
|
||||
void ButtonStructSize() { SendMsg(TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON)); }
|
||||
HIMAGELIST SetImageList(UINT listIndex, HIMAGELIST imageList) { return HIMAGELIST(SendMsg(TB_SETIMAGELIST, listIndex, (LPARAM)imageList)); }
|
||||
bool AddButton(UINT numButtons, LPTBBUTTON buttons) { return LRESULTToBool(SendMsg(TB_ADDBUTTONS, numButtons, (LPARAM)buttons)); }
|
||||
#ifndef _UNICODE
|
||||
bool AddButtonW(UINT numButtons, LPTBBUTTON buttons) { return LRESULTToBool(SendMessage(TB_ADDBUTTONSW, numButtons, (LPARAM)buttons)); }
|
||||
bool AddButtonW(UINT numButtons, LPTBBUTTON buttons) { return LRESULTToBool(SendMsg(TB_ADDBUTTONSW, numButtons, (LPARAM)buttons)); }
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -130,9 +130,11 @@ WinXP-64 FindFirstFile():
|
||||
\\Server\ - ERROR_INVALID_NAME
|
||||
|
||||
\\Server\Share - ERROR_BAD_NETPATH
|
||||
\\Server\Share - ERROR_BAD_NET_NAME (Win7)
|
||||
\\Server\Share\ - ERROR_FILE_NOT_FOUND
|
||||
|
||||
\\?\UNC\Server\Share - ERROR_INVALID_NAME
|
||||
\\?\UNC\Server\Share - ERROR_BAD_PATHNAME (Win7)
|
||||
\\?\UNC\Server\Share\ - ERROR_FILE_NOT_FOUND
|
||||
|
||||
\\Server\Share_RootDrive - ERROR_INVALID_NAME
|
||||
@@ -512,9 +514,11 @@ bool CFileInfo::Find(CFSTR path)
|
||||
#if defined(_WIN32) && !defined(UNDER_CE)
|
||||
{
|
||||
DWORD lastError = GetLastError();
|
||||
if (lastError == ERROR_BAD_NETPATH ||
|
||||
lastError == ERROR_FILE_NOT_FOUND ||
|
||||
lastError == ERROR_INVALID_NAME // for "\\SERVER\shared" paths that are translated to "\\?\UNC\SERVER\shared"
|
||||
if (lastError == ERROR_FILE_NOT_FOUND
|
||||
|| lastError == ERROR_BAD_NETPATH // XP64: "\\Server\Share"
|
||||
|| lastError == ERROR_BAD_NET_NAME // Win7: "\\Server\Share"
|
||||
|| lastError == ERROR_INVALID_NAME // XP64: "\\?\UNC\Server\Share"
|
||||
|| lastError == ERROR_BAD_PATHNAME // Win7: "\\?\UNC\Server\Share"
|
||||
)
|
||||
{
|
||||
unsigned rootSize = 0;
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#ifndef __WINDOWS_FILE_IO_H
|
||||
#define __WINDOWS_FILE_IO_H
|
||||
|
||||
#include "../Common/MyWindows.h"
|
||||
|
||||
#if defined(_WIN32) && !defined(UNDER_CE)
|
||||
#include <winioctl.h>
|
||||
#endif
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#ifndef __WINDOWS_MEMORY_GLOBAL_H
|
||||
#define __WINDOWS_MEMORY_GLOBAL_H
|
||||
|
||||
#include "../Common/MyWindows.h"
|
||||
|
||||
namespace NWindows {
|
||||
namespace NMemory {
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "MemoryLock.h"
|
||||
|
||||
namespace NWindows {
|
||||
namespace NSecurity {
|
||||
|
||||
|
||||
@@ -3,12 +3,14 @@
|
||||
#ifndef __WINDOWS_MEMORY_LOCK_H
|
||||
#define __WINDOWS_MEMORY_LOCK_H
|
||||
|
||||
#include "../Common/MyWindows.h"
|
||||
|
||||
namespace NWindows {
|
||||
namespace NSecurity {
|
||||
|
||||
#ifndef UNDER_CE
|
||||
|
||||
bool EnablePrivilege(LPCTSTR privilegeName, bool enable = true);
|
||||
bool EnablePrivilege(LPCTSTR privilegeName, bool enable = true);
|
||||
|
||||
inline bool EnablePrivilege_LockMemory(bool enable = true)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
|
||||
#include "../Common/MyWindows.h"
|
||||
|
||||
#if !defined(_WIN64) && !defined(UNDER_CE)
|
||||
static inline bool IsItWindowsNT()
|
||||
{
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "StdAfx.h"
|
||||
|
||||
#include "../Common/MyWindows.h"
|
||||
|
||||
#include "../Common/Defs.h"
|
||||
|
||||
#include "System.h"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#define __WINDOWS_TIME_UTILS_H
|
||||
|
||||
#include "../Common/MyTypes.h"
|
||||
#include "../Common/MyWindows.h"
|
||||
|
||||
namespace NWindows {
|
||||
namespace NTime {
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#ifndef __WINDOWS_WINDOW_H
|
||||
#define __WINDOWS_WINDOW_H
|
||||
|
||||
#include "../Common/MyWindows.h"
|
||||
#include "../Common/MyString.h"
|
||||
|
||||
#include "Defs.h"
|
||||
@@ -170,7 +171,7 @@ public:
|
||||
bool Update() { return BOOLToBool(::UpdateWindow(_window)); }
|
||||
bool InvalidateRect(LPCRECT rect, bool backgroundErase = true)
|
||||
{ return BOOLToBool(::InvalidateRect(_window, rect, BoolToBOOL(backgroundErase))); }
|
||||
void SetRedraw(bool redraw = true) { SendMessage(WM_SETREDRAW, BoolToBOOL(redraw), 0); }
|
||||
void SetRedraw(bool redraw = true) { SendMsg(WM_SETREDRAW, BoolToBOOL(redraw), 0); }
|
||||
|
||||
LONG_PTR SetStyle(LONG_PTR style) { return SetLongPtr(GWL_STYLE, style); }
|
||||
LONG_PTR GetStyle() const { return GetLongPtr(GWL_STYLE); }
|
||||
@@ -222,18 +223,18 @@ public:
|
||||
|
||||
HWND SetFocus() { return ::SetFocus(_window); }
|
||||
|
||||
LRESULT SendMessage(UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
|
||||
{ return ::SendMessage(_window, message, wParam, lParam) ;}
|
||||
LRESULT SendMsg(UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
|
||||
{ return ::SendMessage(_window, message, wParam, lParam); }
|
||||
#ifndef _UNICODE
|
||||
LRESULT SendMessageW(UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
|
||||
{ return ::SendMessageW(_window, message, wParam, lParam) ;}
|
||||
LRESULT SendMsgW(UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
|
||||
{ return ::SendMessageW(_window, message, wParam, lParam); }
|
||||
#endif
|
||||
|
||||
bool PostMessage(UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
|
||||
{ return BOOLToBool(::PostMessage(_window, message, wParam, lParam)) ;}
|
||||
bool PostMsg(UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
|
||||
{ return BOOLToBool(::PostMessage(_window, message, wParam, lParam)); }
|
||||
#ifndef _UNICODE
|
||||
LRESULT PostMessageW(UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
|
||||
{ return ::PostMessageW(_window, message, wParam, lParam) ;}
|
||||
bool PostMsgW(UINT message, WPARAM wParam = 0, LPARAM lParam = 0)
|
||||
{ return BOOLToBool(::PostMessageW(_window, message, wParam, lParam)); }
|
||||
#endif
|
||||
|
||||
bool SetText(LPCTSTR s) { return BOOLToBool(::SetWindowText(_window, s)); }
|
||||
@@ -270,7 +271,7 @@ public:
|
||||
bool KillTimer(UINT_PTR idEvent)
|
||||
{return BOOLToBool(::KillTimer(_window, idEvent)); }
|
||||
|
||||
HICON SetIcon(WPARAM sizeType, HICON icon) { return (HICON)SendMessage(WM_SETICON, sizeType, (LPARAM)icon); }
|
||||
HICON SetIcon(WPARAM sizeType, HICON icon) { return (HICON)SendMsg(WM_SETICON, sizeType, (LPARAM)icon); }
|
||||
};
|
||||
|
||||
#define RECT_SIZE_X(r) ((r).right - (r).left)
|
||||
|
||||
Reference in New Issue
Block a user