Merged New Inventory Project into main branch

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1871 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2008-03-08 15:15:25 +00:00
parent e16d166277
commit 43ca24dda8
649 changed files with 93359 additions and 82507 deletions
+8 -8
View File
@@ -9,26 +9,26 @@
//
// 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
// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
/////////////////////////////////////////////////////////////////////////////
#ifndef _COMBSTROUT_H_
#define _COMBSTROUT_H_
/////////////////////////////////////////////////////////////////////////////
// CComBSTROut - a class that inherits from CComBSTR and adds Out() method
// that should be used instead of & operator for 'out'
// function parameters
// CComBSTROut - a class that inherits from CComBSTR and adds Out() method
// that should be used instead of & operator for 'out'
// function parameters
class CComBSTROut : public CComBSTR
{
+7 -7
View File
@@ -9,17 +9,17 @@
//
// 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
// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
/////////////////////////////////////////////////////////////////////////////
#ifndef _COMVARIANTOUT_H_
@@ -27,8 +27,8 @@
/////////////////////////////////////////////////////////////////////////////
// CComVariantOut - a class that inherits from CComVariant and adds Out()
// method that should be used instead of & operator for
// 'out' function parameters
// method that should be used instead of & operator for
// 'out' function parameters
class CComVariantOut : public CComVariant
{
+665 -664
View File
File diff suppressed because it is too large Load Diff
+6 -6
View File
@@ -9,17 +9,17 @@
//
// 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
// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
/////////////////////////////////////////////////////////////////////////////
@@ -441,7 +441,7 @@ class Console {
// Console window handle
HWND m_hWnd;
HWND m_notifyhWnd;
HWND m_notifyhWnd;
// console colors
COLORREF m_arrConsoleColors[16];
+66 -66
View File
@@ -26,17 +26,17 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
// Dialog
//
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 146, 87
IDD_ABOUT DIALOG DISCARDABLE 0, 0, 146, 87
STYLE DS_MODALFRAME | DS_NOIDLEMSG | DS_SETFOREGROUND | DS_CENTER | WS_POPUP |
WS_CAPTION | WS_SYSMENU
WS_CAPTION | WS_SYSMENU
CAPTION "About Console"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,48,66,50,14
LTEXT "Console v1.5",IDC_STATIC,51,11,42,8
LTEXT "Copyright© 2001-2005 Marko Bozikovic",IDC_STATIC,9,30,
127,8
LTEXT "bozho@kset.org",IDC_STATIC,46,45,53,8
DEFPUSHBUTTON "OK",IDOK,48,66,50,14
LTEXT "Console v1.5",IDC_STATIC,51,11,42,8
LTEXT "Copyright© 2001-2005 Marko Bozikovic",IDC_STATIC,9,30,
127,8
LTEXT "bozho@kset.org",IDC_STATIC,46,45,53,8
END
@@ -48,17 +48,17 @@ END
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_ABOUT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 139
TOPMARGIN, 7
BOTTOMMARGIN, 80
END
IDD_ABOUT, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 139
TOPMARGIN, 7
BOTTOMMARGIN, 80
END
END
#endif // APSTUDIO_INVOKED
#endif // APSTUDIO_INVOKED
#endif // Neutral resources
#endif // Neutral resources
/////////////////////////////////////////////////////////////////////////////
@@ -78,7 +78,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_DEFAULT
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
//IDI_ICON2 ICON DISCARDABLE "Console.ico"
//IDI_ICON2 ICON DISCARDABLE "Console.ico"
/////////////////////////////////////////////////////////////////////////////
//
@@ -87,26 +87,26 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_DEFAULT
IDR_POPUP_MENU MENU DISCARDABLE
BEGIN
POPUP " "
BEGIN
// MENUITEM "Read&me", ID_SHOW_README_FILE
MENUITEM "&About Console", ID_ABOUT
MENUITEM SEPARATOR
MENUITEM "&Copy", ID_COPY
MENUITEM "&Paste", ID_PASTE
MENUITEM SEPARATOR
// MENUITEM "Always on &top", ID_TOGGLE_ONTOP
// MENUITEM "&Hide console", ID_HIDE_CONSOLE
// MENUITEM SEPARATOR
// MENUITEM "&Select configuration file", ID_SEL_CONFIG_FILE
// MENUITEM "&Edit configuration file", ID_EDIT_CONFIG_FILE
// MENUITEM "&Reload settings", ID_RELOAD_SETTINGS
// MENUITEM SEPARATOR
MENUITEM "E&xit", ID_EXIT_CONSOLE
END
POPUP " "
BEGIN
// MENUITEM "Read&me", ID_SHOW_README_FILE
MENUITEM "&About Console", ID_ABOUT
MENUITEM SEPARATOR
MENUITEM "&Copy", ID_COPY
MENUITEM "&Paste", ID_PASTE
MENUITEM SEPARATOR
// MENUITEM "Always on &top", ID_TOGGLE_ONTOP
// MENUITEM "&Hide console", ID_HIDE_CONSOLE
// MENUITEM SEPARATOR
// MENUITEM "&Select configuration file", ID_SEL_CONFIG_FILE
// MENUITEM "&Edit configuration file", ID_EDIT_CONFIG_FILE
// MENUITEM "&Reload settings", ID_RELOAD_SETTINGS
// MENUITEM SEPARATOR
MENUITEM "E&xit", ID_EXIT_CONSOLE
END
END
#endif // Neutral (Default) resources
#endif // Neutral (Default) resources
/////////////////////////////////////////////////////////////////////////////
@@ -127,22 +127,22 @@ LANGUAGE LANG_CROATIAN, SUBLANG_DEFAULT
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // APSTUDIO_INVOKED
#ifndef _MAC
@@ -164,33 +164,33 @@ VS_VERSION_INFO VERSIONINFO
FILETYPE 0x1L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004b0"
BEGIN
VALUE "Comments", "A cool console window :-)\0"
VALUE "CompanyName", "Ingenuity Unlimited Ltd.\0"
VALUE "FileDescription", "Console\0"
VALUE "FileVersion", "1.5, Build 351 2005.09.22\0"
VALUE "InternalName", "Console\0"
VALUE "LegalCopyright", "Copyright © 2001-2004 Marko Bozikovic\0"
VALUE "LegalTrademarks", "Copyright © 2001-2004 Marko Bozikovic\0"
VALUE "OriginalFilename", "Console.exe\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Console\0"
VALUE "ProductVersion", "1.5.00.351\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0, 1200
END
BLOCK "StringFileInfo"
BEGIN
BLOCK "000004b0"
BEGIN
VALUE "Comments", "A cool console window :-)\0"
VALUE "CompanyName", "Ingenuity Unlimited Ltd.\0"
VALUE "FileDescription", "Console\0"
VALUE "FileVersion", "1.5, Build 351 2005.09.22\0"
VALUE "InternalName", "Console\0"
VALUE "LegalCopyright", "Copyright © 2001-2004 Marko Bozikovic\0"
VALUE "LegalTrademarks", "Copyright © 2001-2004 Marko Bozikovic\0"
VALUE "OriginalFilename", "Console.exe\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Console\0"
VALUE "ProductVersion", "1.5.00.351\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0, 1200
END
END
#endif // !_MAC
#endif // !_MAC
#endif // Croatian resources
#endif // Croatian resources
/////////////////////////////////////////////////////////////////////////////
@@ -203,5 +203,5 @@ END
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED
#endif // not APSTUDIO_INVOKED
+91 -7
View File
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Version="8.00"
Name="Console_2005Express"
ProjectGUID="{F962CFA1-2215-4124-938F-253973A27591}"
RootNamespace="Console"
@@ -16,8 +16,8 @@
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\Debug"
IntermediateDirectory=".\Debug"
OutputDirectory="Debug"
IntermediateDirectory="Debug"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;..\ja2_2005Express.vsprops;..\ja2_2005ExpressDebug.vsprops"
UseOfMFC="0"
@@ -47,7 +47,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;&#x0D;&#x0A;"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
Optimization="0"
FavorSizeOrSpeed="0"
AdditionalIncludeDirectories=""
@@ -102,8 +102,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\Release"
IntermediateDirectory=".\Release"
OutputDirectory="Release"
IntermediateDirectory="Release"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;..\ja2_2005Express.vsprops"
UseOfMFC="0"
@@ -133,7 +133,6 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/D &quot;_CRT_SECURE_NO_DEPRECATE&quot;"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="c:\Program Files\Microsoft Platform SDK for Windows Server 2003 R2\src\mfc"
@@ -185,6 +184,91 @@
CommandLine=""
/>
</Configuration>
<Configuration
Name="MapEditor|Win32"
OutputDirectory="MapEditor"
IntermediateDirectory="MapEditor"
ConfigurationType="4"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC60.vsprops;..\ja2_2005Express.vsprops;..\ja2_2005ExpressEditor.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug/Console.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
FavorSizeOrSpeed="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions="WIN32;_DEBUG;_LIB;"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
RuntimeTypeInfo="false"
UsePrecompiledHeader="0"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\Debug/Console.pch"
AssemblerListingLocation=".\Debug/"
ObjectFile=".\Debug/"
ProgramDataBaseFileName=".\Debug/"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="4"
DisableSpecificWarnings="4100"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1050"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="comctl32.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\Debug/Console.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
+56 -55
View File
@@ -9,17 +9,17 @@
//
// 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
// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
/////////////////////////////////////////////////////////////////////////////
@@ -49,7 +49,7 @@ XTermCursor::XTermCursor(HWND hwndConsole, HDC hdcWindow, COLORREF crCursorColor
}
XTermCursor::~XTermCursor() {
::DeleteObject(m_hActiveBrush);
::DeleteObject(m_hInactiveBrush);
}
@@ -74,7 +74,7 @@ void XTermCursor::Draw(LPRECT pRect) {
/////////////////////////////////////////////////////////////////////////////
void XTermCursor::PrepareNext() {
}
/////////////////////////////////////////////////////////////////////////////
@@ -108,7 +108,7 @@ BlockCursor::~BlockCursor() {
/////////////////////////////////////////////////////////////////////////////
void BlockCursor::Draw(LPRECT pRect) {
if (m_bActive && m_bVisible) {
::FillRect(m_hdcWindow, pRect, m_hActiveBrush);
@@ -143,7 +143,7 @@ NBBlockCursor::NBBlockCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorCo
}
NBBlockCursor::~NBBlockCursor() {
::DeleteObject(m_hActiveBrush);
}
@@ -153,7 +153,7 @@ NBBlockCursor::~NBBlockCursor() {
/////////////////////////////////////////////////////////////////////////////
void NBBlockCursor::Draw(LPRECT pRect) {
::FillRect(m_hdcWindow, pRect, m_hActiveBrush);
}
@@ -188,7 +188,7 @@ PulseBlockCursor::PulseBlockCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCu
}
PulseBlockCursor::~PulseBlockCursor() {
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
::DeleteObject(m_hActiveBrush);
}
@@ -199,7 +199,7 @@ PulseBlockCursor::~PulseBlockCursor() {
/////////////////////////////////////////////////////////////////////////////
void PulseBlockCursor::Draw(LPRECT pRect) {
// this is called only once, to set the size of the cursor
if (m_nMaxSize == 0) {
if ((pRect->right - pRect->left) < (pRect->bottom - pRect->top)) {
@@ -208,7 +208,7 @@ void PulseBlockCursor::Draw(LPRECT pRect) {
m_nMaxSize = (pRect->bottom - pRect->top) >> 1;
}
}
if (m_bActive) {
RECT rect;
::CopyMemory(&rect, pRect, sizeof(RECT));
@@ -226,13 +226,13 @@ void PulseBlockCursor::Draw(LPRECT pRect) {
/////////////////////////////////////////////////////////////////////////////
void PulseBlockCursor::PrepareNext() {
if (m_nSize == 0) {
m_nStep = 1;
} else if (m_nSize == m_nMaxSize) {
m_nStep = -1;
}
m_nSize += m_nStep;
}
@@ -256,9 +256,9 @@ BarCursor::BarCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
}
BarCursor::~BarCursor() {
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
::DeleteObject(m_hPen);
}
@@ -268,7 +268,7 @@ BarCursor::~BarCursor() {
/////////////////////////////////////////////////////////////////////////////
void BarCursor::Draw(LPRECT pRect) {
if (m_bActive && m_bVisible) {
HPEN hOldPen = (HPEN)::SelectObject(m_hdcWindow, m_hPen);
::MoveToEx(m_hdcWindow, pRect->left, pRect->top, NULL);
@@ -283,7 +283,7 @@ void BarCursor::Draw(LPRECT pRect) {
/////////////////////////////////////////////////////////////////////////////
void BarCursor::PrepareNext() {
m_bVisible = !m_bVisible;
}
@@ -308,7 +308,7 @@ ConsoleCursor::ConsoleCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorCo
}
ConsoleCursor::~ConsoleCursor() {
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
::DeleteObject(m_hActiveBrush);
::CloseHandle(m_hStdOut);
@@ -320,7 +320,7 @@ ConsoleCursor::~ConsoleCursor() {
/////////////////////////////////////////////////////////////////////////////
void ConsoleCursor::Draw(LPRECT pRect) {
RECT rect;
::CopyMemory(&rect, pRect, sizeof(RECT));
@@ -345,7 +345,7 @@ void ConsoleCursor::Draw(LPRECT pRect) {
/////////////////////////////////////////////////////////////////////////////
void ConsoleCursor::PrepareNext() {
m_bVisible = !m_bVisible;
}
@@ -367,7 +367,7 @@ NBHLineCursor::NBHLineCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorCo
}
NBHLineCursor::~NBHLineCursor() {
::DeleteObject(m_hPen);
}
@@ -377,7 +377,7 @@ NBHLineCursor::~NBHLineCursor() {
/////////////////////////////////////////////////////////////////////////////
void NBHLineCursor::Draw(LPRECT pRect) {
HPEN hOldPen = (HPEN)::SelectObject(m_hdcWindow, m_hPen);
::MoveToEx(m_hdcWindow, pRect->left, pRect->bottom-1, NULL);
::LineTo(m_hdcWindow, pRect->right, pRect->bottom-1);
@@ -390,7 +390,7 @@ void NBHLineCursor::Draw(LPRECT pRect) {
/////////////////////////////////////////////////////////////////////////////
void NBHLineCursor::PrepareNext() {
}
/////////////////////////////////////////////////////////////////////////////
@@ -415,9 +415,9 @@ HLineCursor::HLineCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
}
HLineCursor::~HLineCursor() {
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
::DeleteObject(m_hPen);
}
@@ -481,9 +481,9 @@ VLineCursor::VLineCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
}
VLineCursor::~VLineCursor() {
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
::DeleteObject(m_hPen);
}
@@ -493,14 +493,14 @@ VLineCursor::~VLineCursor() {
/////////////////////////////////////////////////////////////////////////////
void VLineCursor::Draw(LPRECT pRect) {
// this is called only once, to set the size of the cursor
if (m_nSize != (pRect->right - pRect->left - 1)) {
m_nSize = pRect->right - pRect->left - 1;
m_nPosition = 0;
m_nStep = 1;
}
if (m_bActive) {
HPEN hOldPen = (HPEN)::SelectObject(m_hdcWindow, m_hPen);
::MoveToEx(m_hdcWindow, pRect->left + m_nPosition, pRect->top, NULL);
@@ -515,13 +515,13 @@ void VLineCursor::Draw(LPRECT pRect) {
/////////////////////////////////////////////////////////////////////////////
void VLineCursor::PrepareNext() {
if (m_nPosition == 0) {
m_nStep = 1;
} else if (m_nPosition == m_nSize) {
m_nStep = -1;
}
m_nPosition += m_nStep;
}
@@ -545,7 +545,7 @@ RectCursor::RectCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColor)
}
RectCursor::~RectCursor() {
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
::DeleteObject(m_hActiveBrush);
}
@@ -556,9 +556,9 @@ RectCursor::~RectCursor() {
/////////////////////////////////////////////////////////////////////////////
void RectCursor::Draw(LPRECT pRect) {
if (m_bActive && m_bVisible) {
::FrameRect(m_hdcWindow, pRect, m_hActiveBrush);
}
}
@@ -569,7 +569,7 @@ void RectCursor::Draw(LPRECT pRect) {
/////////////////////////////////////////////////////////////////////////////
void RectCursor::PrepareNext() {
m_bVisible = !m_bVisible;
}
@@ -591,7 +591,7 @@ NBRectCursor::NBRectCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCursorColo
}
NBRectCursor::~NBRectCursor() {
::DeleteObject(m_hActiveBrush);
}
@@ -601,7 +601,7 @@ NBRectCursor::~NBRectCursor() {
/////////////////////////////////////////////////////////////////////////////
void NBRectCursor::Draw(LPRECT pRect) {
::FrameRect(m_hdcWindow, pRect, m_hActiveBrush);
}
@@ -636,7 +636,7 @@ PulseRectCursor::PulseRectCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCurs
}
PulseRectCursor::~PulseRectCursor() {
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
::DeleteObject(m_hActiveBrush);
}
@@ -647,7 +647,7 @@ PulseRectCursor::~PulseRectCursor() {
/////////////////////////////////////////////////////////////////////////////
void PulseRectCursor::Draw(LPRECT pRect) {
// this is called only once, to set the size of the cursor
if (m_nMaxSize == 0) {
if ((pRect->right - pRect->left) < (pRect->bottom - pRect->top)) {
@@ -674,13 +674,13 @@ void PulseRectCursor::Draw(LPRECT pRect) {
/////////////////////////////////////////////////////////////////////////////
void PulseRectCursor::PrepareNext() {
if (m_nSize == 0) {
m_nStep = 1;
} else if (m_nSize == m_nMaxSize) {
m_nStep = -1;
}
m_nSize += m_nStep;
}
@@ -705,13 +705,13 @@ FadeBlockCursor::FadeBlockCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCurs
, m_hMemDC(NULL)
{
m_uiTimer = ::SetTimer(hwndParent, CURSOR_TIMER, 35, NULL);
#if 0
if (g_bWin2000) {
// on Win2000 we use real alpha blending
// create a reasonable-sized bitmap, since AlphaBlt resizes
// destination rect if needed, and we don't need to redraw the mem DC
// create a reasonable-sized bitmap, since AlphaBlt resizes
// destination rect if needed, and we don't need to redraw the mem DC
// each time
m_nBmpWidth = BLEND_BMP_WIDTH;
m_nBmpHeight= BLEND_BMP_HEIGHT;
@@ -743,7 +743,7 @@ FadeBlockCursor::FadeBlockCursor(HWND hwndParent, HDC hdcWindow, COLORREF crCurs
}
FadeBlockCursor::~FadeBlockCursor() {
if (m_uiTimer) ::KillTimer(m_hwndParent, m_uiTimer);
#if 0
@@ -761,10 +761,10 @@ FadeBlockCursor::~FadeBlockCursor() {
/////////////////////////////////////////////////////////////////////////////
void FadeBlockCursor::Draw(LPRECT pRect) {
#if 0
if (g_bWin2000) {
g_pfnAlphaBlend(
m_hdcWindow,
pRect->left,
@@ -777,7 +777,7 @@ void FadeBlockCursor::Draw(LPRECT pRect) {
BLEND_BMP_WIDTH,
BLEND_BMP_HEIGHT,
m_bfn);
} else {
#endif
@@ -800,7 +800,7 @@ void FadeBlockCursor::PrepareNext() {
} else if ((DWORD)m_bfn.SourceConstantAlpha + ALPHA_STEP > 255) {
m_nStep = -ALPHA_STEP;
}
m_bfn.SourceConstantAlpha += m_nStep;
} else {
#endif
@@ -817,19 +817,19 @@ void FadeBlockCursor::PrepareNext() {
/////////////////////////////////////////////////////////////////////////////
// This function is used to create a fake blending for WinNT (uuseful only
// This function is used to create a fake blending for WinNT (uuseful only
// for solid background, though)
void FadeBlockCursor::FakeBlend() {
int nDeltaR = ((GetRValue(m_crCursorColor) - GetRValue(m_crBkColor)) << 8) / FADE_STEPS;
int nDeltaG = ((GetGValue(m_crCursorColor) - GetGValue(m_crBkColor)) << 8) / FADE_STEPS;
int nDeltaB = ((GetBValue(m_crCursorColor) - GetBValue(m_crBkColor)) << 8) / FADE_STEPS;
for (int i = 0; i < FADE_STEPS; ++i) {
m_arrColors[i] = RGB(GetRValue(m_crCursorColor) - (nDeltaR*i >> 8), GetGValue(m_crCursorColor) - (nDeltaG*i >> 8), GetBValue(m_crCursorColor) - (nDeltaB*i >> 8));
}
m_arrColors[FADE_STEPS] = m_crBkColor;
}
@@ -840,3 +840,4 @@ void FadeBlockCursor::FakeBlend() {
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
+5 -5
View File
@@ -9,17 +9,17 @@
//
// 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
// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
/////////////////////////////////////////////////////////////////////////////
+9 -8
View File
@@ -9,17 +9,17 @@
//
// 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
// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
/////////////////////////////////////////////////////////////////////////////
@@ -72,8 +72,8 @@ BOOL CAboutDlg::DoModal()
{
::DialogBox(
ghInstance,
MAKEINTRESOURCE(IDD_ABOUT),
m_hWndParent,
MAKEINTRESOURCE(IDD_ABOUT),
m_hWndParent,
CAboutDlg::DialogProc);
return TRUE;
@@ -106,7 +106,7 @@ int CALLBACK CAboutDlg::DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
break;
}
}
return 0;
}
@@ -131,3 +131,4 @@ int CALLBACK CAboutDlg::DialogProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA
+5 -5
View File
@@ -9,17 +9,17 @@
//
// 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
// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
/////////////////////////////////////////////////////////////////////////////
+25 -25
View File
@@ -9,23 +9,23 @@
//
// 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
// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// FileStream.cpp - implementation of IStream interface on any file
// (not strictly COM, I'm faking it here a bit :-)
// FileStream.cpp - implementation of IStream interface on any file
// (not strictly COM, I'm faking it here a bit :-)
//
#undef CINTERFACE
@@ -47,20 +47,20 @@ static char THIS_FILE[] = __FILE__;
// CreateFileStream - opens/creates a file and returns an IStream interface
HRESULT CreateFileStream(
LPCTSTR lpFileName, // file name
DWORD dwDesiredAccess, // access mode
DWORD dwShareMode, // share mode
LPSECURITY_ATTRIBUTES lpSecurityAttributes, // SD
DWORD dwCreationDisposition, // how to create
DWORD dwFlagsAndAttributes, // file attributes
HANDLE hTemplateFile, // handle to template file
IStream** ppStream // pointer to IStream interface
LPCTSTR lpFileName, // file name
DWORD dwDesiredAccess, // access mode
DWORD dwShareMode, // share mode
LPSECURITY_ATTRIBUTES lpSecurityAttributes, // SD
DWORD dwCreationDisposition, // how to create
DWORD dwFlagsAndAttributes, // file attributes
HANDLE hTemplateFile, // handle to template file
IStream** ppStream // pointer to IStream interface
)
{
HANDLE hFile = ::CreateFile(
lpFileName,
dwDesiredAccess,
dwDesiredAccess,
dwShareMode,
lpSecurityAttributes,
dwCreationDisposition,
@@ -111,8 +111,8 @@ FileStream::~FileStream()
// IStream methods
/////////////////////////////////////////////////////////////////////////////
// Read - reads a specified number of bytes from the stream object into memory
// starting at the current seek pointer
// Read - reads a specified number of bytes from the stream object into memory
// starting at the current seek pointer
STDMETHODIMP FileStream::Read(void *pv, ULONG cb, ULONG *pcbRead)
{
@@ -125,8 +125,8 @@ STDMETHODIMP FileStream::Read(void *pv, ULONG cb, ULONG *pcbRead)
/////////////////////////////////////////////////////////////////////////////
// Write - writes a specified number of bytes into the stream object starting
// at the current seek pointer
// Write - writes a specified number of bytes into the stream object starting
// at the current seek pointer
STDMETHODIMP FileStream::Write(void const *pv, ULONG cb, ULONG *pcbWritten)
{
@@ -139,8 +139,8 @@ STDMETHODIMP FileStream::Write(void const *pv, ULONG cb, ULONG *pcbWritten)
/////////////////////////////////////////////////////////////////////////////
// Seek - changes the seek pointer to a new location relative to the beginning
// of the stream, to the end of the stream, or to the current seek pointer
// Seek - changes the seek pointer to a new location relative to the beginning
// of the stream, to the end of the stream, or to the current seek pointer
STDMETHODIMP FileStream::Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INTEGER *plibNewPosition)
{
@@ -148,7 +148,7 @@ STDMETHODIMP FileStream::Seek(LARGE_INTEGER dlibMove, DWORD dwOrigin, ULARGE_INT
DWORD dwMoveLow = dlibMove.LowPart;
LONG lMoveHigh = dlibMove.HighPart;
switch (dwOrigin) {
case STREAM_SEEK_SET : dwFileOrigin = FILE_BEGIN; break;
case STREAM_SEEK_CUR : dwFileOrigin = FILE_CURRENT; break;
@@ -181,8 +181,8 @@ STDMETHODIMP FileStream::SetSize(ULARGE_INTEGER libNewSize)
/////////////////////////////////////////////////////////////////////////////
// CopyTo - copies a specified number of bytes from the current seek pointer
// in the stream to the current seek pointer in another stream
// CopyTo - copies a specified number of bytes from the current seek pointer
// in the stream to the current seek pointer in another stream
STDMETHODIMP FileStream::CopyTo(IStream *pstm, ULARGE_INTEGER cb, ULARGE_INTEGER *pcbRead, ULARGE_INTEGER *pcbWritten)
{
+14 -14
View File
@@ -9,23 +9,23 @@
//
// 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
// 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Send bug reports, bug fixes, enhancements, requests, flames, etc., and
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
// I'll try to keep a version up to date. I can be reached as follows:
// marko.bozikovic@alterbox.net
// bozho@kset.org
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// FileStream.h - implementation of IStream interface on any file
// (not really COM, I'm faking it here a bit :-)
// (not really COM, I'm faking it here a bit :-)
//
#pragma once
@@ -35,14 +35,14 @@
// CreateFileStream - opens/creates a file and returns an IStream interface
HRESULT CreateFileStream(
LPCTSTR lpFileName, // file name
DWORD dwDesiredAccess, // access mode
DWORD dwShareMode, // share mode
LPSECURITY_ATTRIBUTES lpSecurityAttributes, // SD
DWORD dwCreationDisposition, // how to create
DWORD dwFlagsAndAttributes, // file attributes
HANDLE hTemplateFile, // handle to template file
IStream** ppStream // pointer to IStream interface
LPCTSTR lpFileName, // file name
DWORD dwDesiredAccess, // access mode
DWORD dwShareMode, // share mode
LPSECURITY_ATTRIBUTES lpSecurityAttributes, // SD
DWORD dwCreationDisposition, // how to create
DWORD dwFlagsAndAttributes, // file attributes
HANDLE hTemplateFile, // handle to template file
IStream** ppStream // pointer to IStream interface
);