Add rayman2 source files

This commit is contained in:
2024-09-18 02:33:44 +08:00
parent bcc093f8ed
commit fb036c54fd
14339 changed files with 2596224 additions and 0 deletions

View File

@@ -0,0 +1,41 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__3CB795CD_F6C0_11D0_B56C_006097828C2B__INCLUDED_)
#define AFX_STDAFX_H__3CB795CD_F6C0_11D0_B56C_006097828C2B__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#ifndef _AFX_NO_OLE_SUPPORT
#include <afxole.h> // MFC OLE classes
#include <afxodlgs.h> // MFC OLE dialog classes
#include <afxdisp.h> // MFC OLE automation classes
#endif // _AFX_NO_OLE_SUPPORT
#ifndef _AFX_NO_DB_SUPPORT
#include <afxdb.h> // MFC ODBC database classes
#endif // _AFX_NO_DB_SUPPORT
#ifndef _AFX_NO_DAO_SUPPORT
#include <afxdao.h> // MFC DAO database classes
#endif // _AFX_NO_DAO_SUPPORT
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__3CB795CD_F6C0_11D0_B56C_006097828C2B__INCLUDED_)

View File

@@ -0,0 +1,86 @@
#if !defined(AFX_WAW_MAIN_HPP__5EB444B7_880C_11D1_9AC1_006097BAFA4F__INCLUDED_)
#define AFX_WAW_MAIN_HPP__5EB444B7_880C_11D1_9AC1_006097BAFA4F__INCLUDED_
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
#include <afxtempl.h>
#include "WAW_Res.h"
/////////////////////////////////////////////////////////////////////////////
// WAW_MainDialog dialog
class WAW_MainDialog : public CDialog
{
// Construction
public:
WAW_MainDialog(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(WAW_MainDialog)
enum { IDD = IDD_DIALOG_WAWMainDlg };
// NOTE: the ClassWizard will add data members here
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(WAW_MainDialog)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(WAW_MainDialog)
virtual BOOL OnInitDialog();
afx_msg void OnKeydownTreeWaw(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDeleteitemTreeWaw(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnSize(UINT nType, int cx, int cy);
afx_msg void OnClose();
afx_msg void OnMove(int x, int y);
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
//***********************************************
//*** Specific Members **************************
//***********************************************
// Atributes :
public:
protected:
private:
CString m_pri_csInitFileName;
int m_pri_iPosX;
int m_pri_iPosY;
int m_pri_iPosCx;
int m_pri_iPosCy;
// Functions :
public:
CListCtrl * m_pub_fn_pclGetListCtrl();
CTreeCtrl * m_pub_fn_pclGetTreeCtrl();
protected:
private:
BOOL m_pri_fn_bLoadInitFile();
BOOL m_pri_fn_bSaveInitFile();
//*** End Specific Members **************************
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Developer Studio will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_WAW_MAIN_HPP__5EB444B7_880C_11D1_9AC1_006097BAFA4F__INCLUDED_)

View File

@@ -0,0 +1,19 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by Waw.rc
//
#define IDD_DIALOG_WAWMainDlg 141
#define IDC_LIST_WAW 1034
#define IDC_TREE_WAW 1035
#define IDC_CUSTOM1 1036
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 143
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1037
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

View File

@@ -0,0 +1,20 @@
#ifndef __WAW_STRG_HPP
#define __WAW_STRG_HPP
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000
const CString WAW_g_C_csModuleNameForError = "WAtch Window for editors";
const CString WAW_g_C_csModuleVersion = "1.0.0 [" + CString(__DATE__) + "]";
const CString WAW_g_C_csSectionGeneral = "WAW_Section_General";
const CString WAW_g_C_csSectionPosition = "WAW_Section_Position";
const CString WAW_g_C_csEntryX = "WAW_Entry_X";
const CString WAW_g_C_csEntryY = "WAW_Entry_Y";
const CString WAW_g_C_csEntryCx = "WAW_Entry_Cx";
const CString WAW_g_C_csEntryCy = "WAW_Entry_Cy";
#endif //__WAW_STRG_HPP

View File

@@ -0,0 +1,175 @@
//Microsoft Developer Studio generated resource script.
//
#include "WAW_Res.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "afxres.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040c04b0"
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "DLL de Waw\0"
VALUE "FileVersion", "1, 0, 0, 0\0"
VALUE "InternalName", "Waw\0"
VALUE "LegalCopyright", "Copyright (C) 1998\0"
VALUE "OriginalFilename", "Waw.dll\0"
VALUE "ProductName", "Biblioth<74>que de liaison dynamique Waw\0"
VALUE "ProductVersion", "1, 0, 0, 0\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x40c, 1200
END
END
#endif // !_MAC
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// French (France) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE LANG_FRENCH, SUBLANG_FRENCH
#pragma code_page(1252)
#endif //_WIN32
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"WAW_Res.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""afxres.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"#define _AFX_NO_SPLITTER_RESOURCES\r\n"
"#define _AFX_NO_OLE_RESOURCES\r\n"
"#define _AFX_NO_TRACKER_RESOURCES\r\n"
"#define _AFX_NO_PROPERTY_RESOURCES\r\n"
"\r\n"
"#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)\r\n"
"#ifdef _WIN32\r\n"
"LANGUAGE 9, 1\r\n"
"#pragma code_page(1252)\r\n"
"#endif\r\n"
"#include ""l.fra\\afxres.rc"" // Standard components\r\n"
"#endif\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Dialog
//
IDD_DIALOG_WAWMainDlg DIALOG DISCARDABLE 0, 0, 240, 161
STYLE WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "Watch Window"
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "List1",IDC_LIST_WAW,"SysListView32",LVS_REPORT |
LVS_NOLABELWRAP | NOT WS_VISIBLE | WS_BORDER |
WS_TABSTOP,116,23,117,131
CONTROL "Tree1",IDC_TREE_WAW,"SysTreeView32",TVS_HASBUTTONS |
TVS_HASLINES | TVS_LINESATROOT | WS_BORDER | WS_TABSTOP,
7,7,226,147
END
/////////////////////////////////////////////////////////////////////////////
//
// DESIGNINFO
//
#ifdef APSTUDIO_INVOKED
GUIDELINES DESIGNINFO DISCARDABLE
BEGIN
IDD_DIALOG_WAWMainDlg, DIALOG
BEGIN
LEFTMARGIN, 7
RIGHTMARGIN, 233
TOPMARGIN, 7
BOTTOMMARGIN, 154
END
END
#endif // APSTUDIO_INVOKED
#endif // French (France) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
#define _AFX_NO_SPLITTER_RESOURCES
#define _AFX_NO_OLE_RESOURCES
#define _AFX_NO_TRACKER_RESOURCES
#define _AFX_NO_PROPERTY_RESOURCES
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_FRA)
#ifdef _WIN32
LANGUAGE 9, 1
#pragma code_page(1252)
#endif
#include "l.fra\afxres.rc" // Standard components
#endif
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,182 @@
# Microsoft Developer Studio Project File - Name="Waw" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 5.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=Waw - Win32 Release
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "Waw.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "Waw.mak" CFG="Waw - Win32 Release"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "Waw - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "Waw - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP Scc_ProjName ""$/cpa/tempgrp/WAW/Make", XNFAAAAA"
# PROP Scc_LocalPath "."
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "Waw - Win32 Release"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "x:\cpa\exe\main\edt_data"
# PROP Intermediate_Dir "..\Temp\Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /GX /O2 /I "..\inc" /I "x:\cpa\public" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_USRDLL" /D "VISUAL" /Yu"stdafx.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x40c /d "NDEBUG" /d "_AFXDLL"
# ADD RSC /l 0x40c /d "NDEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /dll /machine:I386
# ADD LINK32 /nologo /subsystem:windows /dll /incremental:yes /machine:I386 /out:"x:\cpa\exe\main\edt_data\WAW___vr.dll"
# SUBTRACT LINK32 /pdb:none /force
!ELSEIF "$(CFG)" == "Waw - Win32 Debug"
# PROP BASE Use_MFC 6
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 6
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "x:\cpa\exe\main\edt_data"
# PROP Intermediate_Dir "..\Temp\Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MDd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /Yu"stdafx.h" /FD /c
# ADD CPP /nologo /MD /W3 /GX /Z7 /Od /I "..\inc" /I "x:\cpa\public" /I "x:\cpa\public\WAW" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_USRDLL" /D "VISUAL" /D "CPA_WANTS_EXPORT" /FR /Yu"stdafx.h" /FD /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
# ADD BASE RSC /l 0x40c /d "_DEBUG" /d "_AFXDLL"
# ADD RSC /l 0x40c /i "..\res" /d "_DEBUG" /d "_AFXDLL"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 /nologo /subsystem:windows /dll /debug /machine:I386 /nodefaultlib:"msvcrtd.lib" /out:"x:\cpa\exe\main\edt_data\WAW___vd.dll" /pdbtype:sept
!ENDIF
# Begin Target
# Name "Waw - Win32 Release"
# Name "Waw - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=..\Src\_DLLCom.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\StdAfx.cpp
# ADD CPP /Yc"stdafx.h"
# End Source File
# Begin Source File
SOURCE=..\Src\WAW.def
# End Source File
# Begin Source File
SOURCE=..\Src\WAW_Data.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\WAW_List.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\WAW_Main.cpp
# End Source File
# Begin Source File
SOURCE=..\Src\WAW_User.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=..\Inc\StdAfx.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Public\WAW.h
# End Source File
# Begin Source File
SOURCE=..\..\..\Public\Waw\WAW_Data.hpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Public\Waw\WAW_List.hpp
# End Source File
# Begin Source File
SOURCE=..\Inc\WAW_Main.hpp
# End Source File
# Begin Source File
SOURCE=..\Inc\WAW_Res.h
# End Source File
# Begin Source File
SOURCE=..\Inc\WAW_Strg.hpp
# End Source File
# Begin Source File
SOURCE=..\..\..\Public\Waw\WAW_User.hpp
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=..\Inc\WAW.rc
# End Source File
# End Group
# Begin Group "Libs Debug"
# PROP Default_Filter ""
# Begin Source File
SOURCE=..\..\..\Exe\Main\EDT_DATA\ErO___vd.lib
# End Source File
# Begin Source File
SOURCE=..\..\..\Exe\Main\MaiDFEvd.lib
# End Source File
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,338 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="7.10"
Name="Waw"
ProjectGUID="{EBCC4A15-AC05-477A-B578-CDAEE6C4B841}"
SccProjectName="&quot;$/cpa/tempgrp/WAW/Make&quot;, XNFAAAAA"
SccAuxPath=""
SccLocalPath="."
SccProvider="MSSCCI:NXN alienbrain"
Keyword="MFCProj">
<Platforms>
<Platform
Name="Win32"/>
</Platforms>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="x:\cpa\exe\main\edt_data"
IntermediateDirectory=".\..\Temp\Debug"
ConfigurationType="2"
UseOfMFC="2"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\inc,x:\cpa\public,x:\cpa\public\WAW"
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_USRDLL;VISUAL;CPA_WANTS_EXPORT"
RuntimeLibrary="3"
UsePrecompiledHeader="3"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\..\Temp\Debug/Waw.pch"
AssemblerListingLocation=".\..\Temp\Debug/"
ObjectFile=".\..\Temp\Debug/"
ProgramDataBaseFileName=".\..\Temp\Debug/"
BrowseInformation="1"
WarningLevel="3"
SuppressStartupBanner="TRUE"
DebugInformationFormat="1"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="ero___vd.lib maidfevd.lib"
OutputFile="x:\cpa\exe\main\edt_data\WAW___vd.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
AdditionalLibraryDirectories="X:\cpa\exe\main\edt_data;X:\cpa\exe\main;X:\cpa\libd"
IgnoreDefaultLibraryNames=""
ModuleDefinitionFile="..\Src\WAW.def"
GenerateDebugInformation="TRUE"
ProgramDatabaseFile="x:\cpa\exe\main\edt_data/WAW___vd.pdb"
SubSystem="2"
ImportLibrary="x:\cpa\exe\main\edt_data/WAW___vd.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName="x:\cpa\exe\main\edt_data/Waw.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1036"
AdditionalIncludeDirectories="..\res"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="x:\cpa\exe\main\edt_data"
IntermediateDirectory=".\..\Temp\Release"
ConfigurationType="2"
UseOfMFC="2"
ATLMinimizesCRunTimeLibraryUsage="FALSE">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\inc,x:\cpa\public"
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_USRDLL;VISUAL"
StringPooling="TRUE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="TRUE"
UsePrecompiledHeader="3"
PrecompiledHeaderThrough="stdafx.h"
PrecompiledHeaderFile=".\..\Temp\Release/Waw.pch"
AssemblerListingLocation=".\..\Temp\Release/"
ObjectFile=".\..\Temp\Release/"
ProgramDataBaseFileName=".\..\Temp\Release/"
WarningLevel="3"
SuppressStartupBanner="TRUE"
CompileAs="0"/>
<Tool
Name="VCCustomBuildTool"/>
<Tool
Name="VCLinkerTool"
OutputFile="x:\cpa\exe\main\edt_data\WAW___vr.dll"
LinkIncremental="1"
SuppressStartupBanner="TRUE"
ModuleDefinitionFile="..\Src\WAW.def"
ProgramDatabaseFile="x:\cpa\exe\main\edt_data/WAW___vr.pdb"
SubSystem="2"
ImportLibrary="x:\cpa\exe\main\edt_data/WAW___vr.lib"
TargetMachine="1"/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="TRUE"
SuppressStartupBanner="TRUE"
TargetEnvironment="1"
TypeLibraryName="x:\cpa\exe\main\edt_data/Waw.tlb"
HeaderFileName=""/>
<Tool
Name="VCPostBuildEventTool"/>
<Tool
Name="VCPreBuildEventTool"/>
<Tool
Name="VCPreLinkEventTool"/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1036"/>
<Tool
Name="VCWebServiceProxyGeneratorTool"/>
<Tool
Name="VCXMLDataGeneratorTool"/>
<Tool
Name="VCWebDeploymentTool"/>
<Tool
Name="VCManagedWrapperGeneratorTool"/>
<Tool
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat">
<File
RelativePath="..\Src\_DLLCom.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="..\Src\StdAfx.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
UsePrecompiledHeader="1"
BrowseInformation="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
UsePrecompiledHeader="1"/>
</FileConfiguration>
</File>
<File
RelativePath="..\Src\WAW.def">
</File>
<File
RelativePath="..\Src\WAW_Data.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="..\Src\WAW_List.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="..\Src\WAW_Main.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
<File
RelativePath="..\Src\WAW_User.cpp">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BrowseInformation="1"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl">
<File
RelativePath="..\Inc\StdAfx.h">
</File>
<File
RelativePath="..\..\..\Public\WAW.h">
</File>
<File
RelativePath="..\..\..\Public\Waw\WAW_Data.hpp">
</File>
<File
RelativePath="..\..\..\Public\Waw\WAW_List.hpp">
</File>
<File
RelativePath="..\Inc\WAW_Main.hpp">
</File>
<File
RelativePath="..\Inc\WAW_Res.h">
</File>
<File
RelativePath="..\Inc\WAW_Strg.hpp">
</File>
<File
RelativePath="..\..\..\Public\Waw\WAW_User.hpp">
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe">
<File
RelativePath="..\Inc\WAW.rc">
<FileConfiguration
Name="Debug|Win32">
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
AdditionalIncludeDirectories="\cpa\tempgrp\Waw\Inc"/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32">
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions=""
AdditionalIncludeDirectories="\cpa\tempgrp\Waw\Inc"/>
</FileConfiguration>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -0,0 +1,5 @@
SCC = This is a source code control file
[Waw.vcproj]
SCC_Aux_Path = "P4SCC#srvperforce-ma:1666##raymandata##Editor"
SCC_Project_Name = Perforce Project

View File

@@ -0,0 +1,41 @@
Microsoft Developer Studio Workspace File, Format Version 5.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "Main"=..\..\..\Main\make\Main.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Project: "Waw"=.\Waw.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,6 @@
// stdafx.cpp : source file that includes just the standard includes
// Err.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

View File

@@ -0,0 +1,12 @@
; Waw.def : Declares the module parameters for the DLL.
LIBRARY
DESCRIPTION 'Waw Windows Dynamic Link Library'
EXPORTS
; Explicit exports can go here
WAW_fn_vInitModule
WAW_fn_vInitWatchWindow
WAW_fn_vRefreshWatchWindow

View File

@@ -0,0 +1,60 @@
///////////////////////////////////////////////////////////////////////////////
//
// Implementation file for Data used by WAW
//
///////////////////////////////////////////////////////////////////////////////
#include <StdAfx.h>
#include "WAW_Main.hpp"
#include "WAW_Data.hpp"
#include "WAW_Strg.hpp"
#include "ErO.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern WAW_MainDialog * WAW_g_pclWatchWindow;
//***********************************************
// Constructor
//***********************************************
WAW_Data::WAW_Data( CString _csDataName, CString _csDataValue, WAW_tdstUserInfo * _pstUserInfo, void * _pvUserData )
{
m_pri_csDataName = _csDataName;
m_pri_csDataValue = _csDataValue;
m_pri_pstUserInfo = _pstUserInfo;
m_pri_pvUserData = _pvUserData;
m_pri_bIsData = TRUE;
}
//***************************
// Destructor
//***************************
WAW_Data::~WAW_Data()
{}
WAW_Data * WAW_Data::m_pub_fn_pclGetParentData()
{
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Get the parent of a Data",
"WAW_Data::m_pub_fn_pclGetParentData",
E_ERROR_GRAVITY_FATAL,
"The pointer to CTreeCtrl is NULL" );
CTreeCtrl * pclTreeCtrl = WAW_g_pclWatchWindow->m_pub_fn_pclGetTreeCtrl();
ERROR_ASSERT( pclTreeCtrl != NULL );
if( pclTreeCtrl == NULL ) return NULL;
HTREEITEM hParentItem = pclTreeCtrl->GetParentItem( m_pri_hTreeItem );
if( hParentItem == NULL ) return NULL;
return (WAW_Data*)pclTreeCtrl->GetItemData( hParentItem );
}

View File

@@ -0,0 +1,217 @@
///////////////////////////////////////////////////////////////////////////////
//
// Implementation for List of Data
//
///////////////////////////////////////////////////////////////////////////////
#include <StdAfx.h>
#include "WAW_User.hpp"
#include "WAW_Main.hpp"
#include "WAW_List.hpp"
#include "WAW_Strg.hpp"
#include "ErO.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern WAW_MainDialog * WAW_g_pclWatchWindow;
extern CList<WAW_hUserInfo,WAW_hUserInfo> WAW_g_clListOfUser;
#define WAW_M_bCheckInfo(_hInfo) (WAW_g_clListOfUser.Find((_hInfo)) != NULL)
WAW_DataList::WAW_DataList( CString _csUserModuleName ) : CList<WAW_Data*,WAW_Data*>()
{
WAW_hUserInfo hInfo = WAW_fn_hFindInfo( _csUserModuleName );
if( hInfo == NULL ) return;
m_pri_hUserInfo = hInfo;
//m_pub_fn_vGetAll();
}
WAW_DataList::WAW_DataList( WAW_hUserInfo _hInfo ) : CList<WAW_Data*,WAW_Data*>()
{
if( !WAW_M_bCheckInfo( _hInfo ) ) return;
m_pri_hUserInfo = _hInfo;
m_pub_fn_vGetAll();
}
void WAW_DataList::m_pub_fn_vGetAll()
{
RemoveAll();
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Construct a list of Data",
"WAW_DataList::WAW_DataList",
E_ERROR_GRAVITY_INSTABLE,
"The pointer to CTreeCtrl is NULL" );
CTreeCtrl * pclTreeCtrl = WAW_g_pclWatchWindow->m_pub_fn_pclGetTreeCtrl();
ERROR_ASSERT( pclTreeCtrl != NULL );
if( pclTreeCtrl == NULL ) return;
HTREEITEM hItem = pclTreeCtrl->GetNextItem( NULL, TVGN_ROOT );
m_pri_fn_vFillList( pclTreeCtrl, hItem );
}
void WAW_DataList::m_pri_fn_vFillList( CTreeCtrl * _pclTree, HTREEITEM _hItem )
{
while( _hItem != NULL )
{
WAW_Data * pclData = (WAW_Data*)_pclTree->GetItemData( _hItem );
if( pclData->m_pri_pstUserInfo == m_pri_hUserInfo ) AddTail( pclData );
m_pri_fn_vFillList( _pclTree, _pclTree->GetChildItem( _hItem ) );
_hItem = _pclTree->GetNextItem( _hItem, TVGN_NEXT );
}
}
void WAW_DataList::m_pub_fn_vGetData()
{
m_pub_fn_vGetAll();
m_pub_fn_vSelectData();
}
void WAW_DataList::m_pub_fn_vSelectData()
{
POSITION pos = GetHeadPosition();
POSITION posOld = NULL;
while( pos != NULL )
{
posOld = pos;
WAW_Data * pclData = GetNext( pos );
if( !pclData->m_pri_bIsData ) RemoveAt( posOld );
}
}
void WAW_DataList::m_pub_fn_vGetNode()
{
m_pub_fn_vGetAll();
m_pub_fn_vSelectNode();
}
void WAW_DataList::m_pub_fn_vSelectNode()
{
POSITION pos = GetHeadPosition();
POSITION posOld = NULL;
while( pos != NULL )
{
posOld = pos;
WAW_Data * pclData = GetNext( pos );
if( pclData->m_pri_bIsData ) RemoveAt( posOld );
}
}
void WAW_DataList::m_pub_fn_vGetWithName( CString _csName )
{
m_pub_fn_vGetAll();
m_pub_fn_vSelectWithName( _csName );
}
void WAW_DataList::m_pub_fn_vSelectWithName( CString _csName )
{
POSITION pos = GetHeadPosition();
POSITION posOld = NULL;
while( pos != NULL )
{
posOld = pos;
WAW_Data * pclData = GetNext( pos );
if( pclData->m_pri_csDataName != _csName ) RemoveAt( posOld );
}
}
void WAW_DataList::m_pub_fn_vGetChildren( CString _csName )
{
m_pub_fn_vGetAll();
m_pub_fn_vSelectChildren( _csName );
}
void WAW_DataList::m_pub_fn_vSelectChildren( CString _csName )
{
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Select the children of a Data",
"WAW_DataList::m_pub_fn_vSelectChildren",
E_ERROR_GRAVITY_INSTABLE,
"The pointer to CTreeCtrl is NULL" );
CTreeCtrl * pclTreeCtrl = WAW_g_pclWatchWindow->m_pub_fn_pclGetTreeCtrl();
ERROR_ASSERT( pclTreeCtrl != NULL );
if( pclTreeCtrl == NULL ) return;
POSITION pos = GetHeadPosition();
POSITION posOld = NULL;
while( pos != NULL )
{
posOld = pos;
WAW_Data * pclData = GetNext( pos );
HTREEITEM hParentItem = pclTreeCtrl->GetParentItem( pclData->m_pri_hTreeItem );
if( hParentItem != NULL )
{
WAW_Data * pclParentData = (WAW_Data*)pclTreeCtrl->GetItemData( hParentItem );
if( pclParentData->m_pri_csDataName != _csName ) RemoveAt( posOld );
}
else RemoveAt( posOld );
}
}
void WAW_DataList::m_pub_fn_vGetVisible()
{
m_pub_fn_vGetAll();
m_pub_fn_vSelectVisible();
}
void WAW_DataList::m_pub_fn_vSelectVisible()
{
m_pri_fn_vUpdateVisible();
POSITION pos = GetHeadPosition();
POSITION posOld = NULL;
while( pos != NULL )
{
posOld = pos;
WAW_Data * pclData = GetNext( pos );
if( pclData->m_pri_bVisible == FALSE ) RemoveAt( posOld );
}
}
void WAW_DataList::m_pri_fn_vUpdateVisible()
{
POSITION pos = GetHeadPosition();
while( pos != NULL )
{
WAW_Data * pclData = GetNext( pos );
pclData->m_pri_bVisible = FALSE;
}
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Select the visible Data",
"WAW_DataList::m_pub_fn_vSelectVisible",
E_ERROR_GRAVITY_INSTABLE,
"The pointer to CTreeCtrl is NULL" );
CTreeCtrl * pclTreeCtrl = WAW_g_pclWatchWindow->m_pub_fn_pclGetTreeCtrl();
ERROR_ASSERT( pclTreeCtrl != NULL );
if( pclTreeCtrl == NULL ) return;
HTREEITEM hItem = pclTreeCtrl->GetFirstVisibleItem();
while( hItem != NULL )
{
WAW_Data * pclData = (WAW_Data*)pclTreeCtrl->GetItemData( hItem );
pclData->m_pri_bVisible = TRUE;
hItem = pclTreeCtrl->GetNextVisibleItem( hItem );
}
}

View File

@@ -0,0 +1,310 @@
///////////////////////////////////////////////////////////////////////////////
// //
// Implementation of Watch Dialog and List //
// //
///////////////////////////////////////////////////////////////////////////////
#include "StdAfx.h"
#define ACTIVE_EDITOR
#define CPA_WANTS_IMPORT
#include "ACP_base.h"
#include "IncItf.h"
#undef ACTIVE_EDITOR
#undef CPA_WANTS_IMPORT
#include "WAW_Main.hpp"
#include "WAW_Data.hpp"
#include "WAW_User.hpp"
#include "WAW_Strg.hpp"
#include "ErO.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern HMODULE WAW_g_hModule;
extern WAW_MainDialog * WAW_g_pclWatchWindow;
/////////////////////////////////////////////////////////////////////////////
// WAW_MainDialog dialog
WAW_MainDialog::WAW_MainDialog(CWnd* pParent /*=NULL*/)
: CDialog(WAW_MainDialog::IDD, pParent)
{
//{{AFX_DATA_INIT(WAW_MainDialog)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
HINSTANCE hOldInstance = AfxGetResourceHandle();
AfxSetResourceHandle( WAW_g_hModule );
BOOL bValue = CDialog::Create(WAW_MainDialog::IDD, &g_oBaseFrame);
// pParent);
m_pri_iPosX = 50;
m_pri_iPosY = 50;
m_pri_iPosCx = 200;
m_pri_iPosCy = 200;
AfxSetResourceHandle( hOldInstance );
}
void WAW_MainDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(WAW_MainDialog)
// NOTE: the ClassWizard will add DDX and DDV calls here
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(WAW_MainDialog, CDialog)
//{{AFX_MSG_MAP(WAW_MainDialog)
ON_NOTIFY(TVN_KEYDOWN, IDC_TREE_WAW, OnKeydownTreeWaw)
ON_NOTIFY(TVN_DELETEITEM, IDC_TREE_WAW, OnDeleteitemTreeWaw)
ON_WM_SIZE()
ON_WM_CLOSE()
ON_WM_MOVE()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// WAW_MainDialog message handlers
BOOL WAW_MainDialog::OnInitDialog()
{
CDialog::OnInitDialog();
char * pcPath = new char[MAX_PATH];
GetModuleFileName( WAW_g_hModule, pcPath, MAX_PATH );
m_pri_csInitFileName = pcPath;
delete[] pcPath;
int i = m_pri_csInitFileName.ReverseFind( '\\' );
m_pri_csInitFileName = m_pri_csInitFileName.Left( i+1 ) + "WAWInit.ini";
m_pri_fn_bLoadInitFile();
//Always visible at the beginning
SetWindowPos( &CWnd::wndTop/*Most*/, m_pri_iPosX, m_pri_iPosY, m_pri_iPosCx, m_pri_iPosCy, SWP_HIDEWINDOW);
CRect *pclRect = new CRect;
GetWindowRect( pclRect );
ScreenToClient( pclRect );
pclRect->DeflateRect( 10, 30, 10, 10 );
m_pub_fn_pclGetTreeCtrl()->MoveWindow( pclRect );
delete pclRect;
ShowWindow( FALSE );
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void WAW_MainDialog::OnKeydownTreeWaw(NMHDR* pNMHDR, LRESULT* pResult)
{
TV_KEYDOWN* pTVKeyDown = (TV_KEYDOWN*)pNMHDR;
if ( pTVKeyDown->wVKey == 46 ) //"Suppr" was pressed
{
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Delete Data in Watch Window",
"WAW_MainDialog::OnKeydownTreeWaw",
E_ERROR_GRAVITY_INSTABLE,
"The pointer to CTreeCtrl is NULL" );
CTreeCtrl * pclTreeCtrl = m_pub_fn_pclGetTreeCtrl();
ERROR_ASSERT( pclTreeCtrl != NULL );
if( pclTreeCtrl == NULL ) return;
HTREEITEM hItem = pclTreeCtrl->GetSelectedItem();
if (hItem == NULL)
return;
WAW_Data * pclData = (WAW_Data*)pclTreeCtrl->GetItemData( hItem );
WAW_fn_bDeleteData( pclData );
}
*pResult = 0;
}
void WAW_MainDialog::OnDeleteitemTreeWaw(NMHDR* pNMHDR, LRESULT* pResult)
{
NM_TREEVIEW* pNMTreeView = (NM_TREEVIEW*)pNMHDR;
HTREEITEM hItem = pNMTreeView->itemOld.hItem;
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Send a message for deleted Data in Watch Window",
"WAW_MainDialog::OnDeleteitemTreeWaw",
E_ERROR_GRAVITY_INSTABLE,
"The pointer to CTreeCtrl is NULL" );
CTreeCtrl * pclTreeCtrl = m_pub_fn_pclGetTreeCtrl();
ERROR_ASSERT( pclTreeCtrl != NULL );
WAW_Data * pclData = (WAW_Data*)pclTreeCtrl->GetItemData( hItem );
if( pclData->m_pri_pstUserInfo->m_pfnCallBack!= NULL )
{
if( pclData->m_pri_bIsData )
pclData->m_pri_pstUserInfo->m_pfnCallBack( WAW_eDeletedData, (void*)pclData );
// else
// pclData->m_pri_pstUserInfo->m_pfnCallBack( WAW_eDeletedNode, (void*)pclData );
}
*pResult = 0;
}
void WAW_MainDialog::OnSize(UINT nType, int cx, int cy)
{
CDialog::OnSize(nType, cx, cy);
CTreeCtrl * pclTreeCtrl = m_pub_fn_pclGetTreeCtrl();
if( pclTreeCtrl == NULL ) return;
CRect *pclRect = new CRect;
GetWindowRect( pclRect );
ScreenToClient( pclRect );
pclRect->DeflateRect( 10, 30, 10, 10 );
pclTreeCtrl->MoveWindow( pclRect );
delete pclRect;
RECT * pstRect = new RECT;
GetWindowRect( pstRect );
m_pri_iPosX = pstRect->left;
m_pri_iPosY = pstRect->top;
m_pri_iPosCx = pstRect->right - pstRect->left;
m_pri_iPosCy = pstRect->bottom - pstRect->top;
m_pri_fn_bSaveInitFile();
}
void WAW_MainDialog::OnMove(int x, int y)
{
CDialog::OnMove(x, y);
RECT * pstRect = new RECT;
GetWindowRect( pstRect );
m_pri_iPosX = pstRect->left;
m_pri_iPosY = pstRect->top;
m_pri_iPosCx = pstRect->right - pstRect->left;
m_pri_iPosCy = pstRect->bottom - pstRect->top;
m_pri_fn_bSaveInitFile();
}
void WAW_MainDialog::OnClose()
{
WAW_fn_vSendMessage( WAW_eHideWindow, NULL );
CDialog::OnClose();
}
//*****************************************************************************
//*** Specific Members ********************************************************
//*****************************************************************************
CListCtrl * WAW_MainDialog::m_pub_fn_pclGetListCtrl()
{
return (CListCtrl*)GetDlgItem( IDC_LIST_WAW );
}
CTreeCtrl * WAW_MainDialog::m_pub_fn_pclGetTreeCtrl()
{
return (CTreeCtrl*)GetDlgItem( IDC_TREE_WAW );
}
BOOL WAW_MainDialog::m_pri_fn_bLoadInitFile()
{
CFile file;
if ( !file.Open(m_pri_csInitFileName, CFile::modeRead) ) return FALSE;
file.Close();
m_pri_iPosX = GetPrivateProfileInt(WAW_g_C_csSectionPosition,
WAW_g_C_csEntryX,
m_pri_iPosX,
LPCTSTR(m_pri_csInitFileName));
m_pri_iPosY = GetPrivateProfileInt(WAW_g_C_csSectionPosition,
WAW_g_C_csEntryY,
m_pri_iPosY,
LPCTSTR(m_pri_csInitFileName));
m_pri_iPosCx = GetPrivateProfileInt(WAW_g_C_csSectionPosition,
WAW_g_C_csEntryCx,
m_pri_iPosCx,
LPCTSTR(m_pri_csInitFileName));
m_pri_iPosCy = GetPrivateProfileInt(WAW_g_C_csSectionPosition,
WAW_g_C_csEntryCy,
m_pri_iPosCy,
LPCTSTR(m_pri_csInitFileName));
return TRUE;
}
BOOL WAW_MainDialog::m_pri_fn_bSaveInitFile()
{
CString csWriteString;
BOOL bReturn = TRUE;
RECT * pstRect = new RECT;
GetWindowRect( pstRect );
//ScreenToClient( pstRect );
if ( bReturn )
{
csWriteString.Format( "%ld", m_pri_iPosX/*pstRect->left*/ );
bReturn = WritePrivateProfileString(WAW_g_C_csSectionPosition,
WAW_g_C_csEntryX,
LPCTSTR(csWriteString),
LPCTSTR(m_pri_csInitFileName));
}
if ( bReturn )
{
csWriteString.Format( "%ld", m_pri_iPosY/*pstRect->top*/ );
bReturn = WritePrivateProfileString(WAW_g_C_csSectionPosition,
WAW_g_C_csEntryY,
LPCTSTR(csWriteString),
LPCTSTR(m_pri_csInitFileName));
}
if ( bReturn )
{
csWriteString.Format( "%ld", m_pri_iPosCx/*pstRect->right - pstRect->left*/ );
bReturn = WritePrivateProfileString(WAW_g_C_csSectionPosition,
WAW_g_C_csEntryCx,
LPCTSTR(csWriteString),
LPCTSTR(m_pri_csInitFileName));
}
if ( bReturn )
{
csWriteString.Format( "%ld", m_pri_iPosCy/*pstRect->bottom - pstRect->top*/ );
bReturn = WritePrivateProfileString(WAW_g_C_csSectionPosition,
WAW_g_C_csEntryCy,
LPCTSTR(csWriteString),
LPCTSTR(m_pri_csInitFileName));
}
return bReturn;
}

View File

@@ -0,0 +1,484 @@
///////////////////////////////////////////////////////////////////////////////
//
// Implementation file
//
///////////////////////////////////////////////////////////////////////////////
#include "StdAfx.h"
#include "WAW_Main.hpp"
#include "WAW_User.hpp"
#include "WAW_Strg.hpp"
#include "WAW_Data.hpp"
#include "ErO.h"
//*** Global Variables for Watch Dialog
WAW_MainDialog * WAW_g_pclWatchWindow = NULL;
CList<WAW_hUserInfo,WAW_hUserInfo> WAW_g_clListOfUser;
BOOL WAW_g_bAcceptMessage = TRUE;
CImageList * WAW_g_pclImageList = NULL;
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
#define WAW_M_bCheckInfo(_hInfo) (WAW_g_clListOfUser.Find((_hInfo)) != NULL)
//******************************
// Create the Main Dialog Window
//******************************
void WAW_fn_vInitWatchWindow()
{
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Create the Watch Window Main Dialog",
"WAW_fn_vInitWatchWindow",
E_ERROR_GRAVITY_INSTABLE,
"The Main Dialog is not allocated" );
if( WAW_g_pclWatchWindow == NULL )
WAW_g_pclWatchWindow = new WAW_MainDialog( AfxGetMainWnd() );
ERROR_ASSERT( WAW_g_pclWatchWindow != NULL );
if( WAW_g_pclImageList == NULL )
{
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Create the Watch Window Image List",
"WAW_fn_vInitWatchWindow",
E_ERROR_GRAVITY_INSTABLE,
"The Image List is not allocated" );
WAW_g_pclImageList = new CImageList;
ERROR_ASSERT( WAW_g_pclImageList != NULL );
if( WAW_g_pclImageList == NULL ) return;
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Create the Watch Window Image List",
"WAW_fn_vInitWatchWindow",
E_ERROR_GRAVITY_INSTABLE,
"The Image List is not created" );
BOOL bResult = WAW_g_pclImageList->Create( 16, 16, ILC_COLOR16, 10, 5 );
ERROR_ASSERT( bResult != NULL );
if( bResult == FALSE ) return;
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Create the Watch Window Image List",
"WAW_fn_vInitWatchWindow",
E_ERROR_GRAVITY_INSTABLE,
"The pointer to CTreeCtrl is NULL" );
CTreeCtrl * pclTreeCtrl = WAW_g_pclWatchWindow->m_pub_fn_pclGetTreeCtrl();
ERROR_ASSERT( pclTreeCtrl != NULL );
if( pclTreeCtrl == NULL ) return;
pclTreeCtrl->SetImageList( WAW_g_pclImageList, TVSIL_NORMAL );
}
}
void WAW_fn_vRefreshWatchWindow()
{
if( WAW_g_bAcceptMessage )
WAW_fn_vSendMessage( WAW_eUpdateData, NULL );
}
void WAW_fn_vSendMessage( WAW_tdeMessage _eMessage, void* _pvData )
{
// if the dialog window is not created, there is no message
if( WAW_g_pclWatchWindow == NULL ) return;
POSITION pos = WAW_g_clListOfUser.GetHeadPosition();
while( pos != NULL )
{
WAW_hUserInfo hInfo = WAW_g_clListOfUser.GetNext( pos );
if( hInfo->m_pfnCallBack != NULL ) hInfo->m_pfnCallBack( _eMessage, _pvData );
}
}
CWnd * WAW_fn_pclGetWatchWindowDialog()
{
return (CWnd*)WAW_g_pclWatchWindow;
}
CWnd * WAW_fn_pclGetWatchWindowTree()
{
if( WAW_g_pclWatchWindow != NULL )
return (CWnd*)WAW_g_pclWatchWindow->m_pub_fn_pclGetTreeCtrl();
else
return NULL;
}
//*******************************
// Display the Watch Window
//*******************************
void WAW_fn_vDisplayWatchWindow()
{
WAW_fn_vSendMessage( WAW_eShowWindow, NULL );
WAW_g_pclWatchWindow->ShowWindow( TRUE );
}
void WAW_fn_vHideWatchWindow()
{
WAW_fn_vSendMessage( WAW_eHideWindow, NULL );
WAW_g_pclWatchWindow->ShowWindow( FALSE );
}
void WAW_fn_vSetWatchWindowTopMost( BOOL _bTopMost )
{
if( _bTopMost )
WAW_g_pclWatchWindow->SetWindowPos( &CWnd::wndTopMost, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
else
WAW_g_pclWatchWindow->SetWindowPos( &CWnd::wndNoTopMost, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
}
WAW_hUserInfo WAW_fn_hFindInfo( CString _csUserModuleName )
{
BOOL bExist = FALSE;
WAW_hUserInfo hUserInfo = NULL;
POSITION pos = WAW_g_clListOfUser.GetHeadPosition();
while( (pos != NULL) && (!bExist) )
{
hUserInfo = WAW_g_clListOfUser.GetNext( pos );
bExist = ( hUserInfo->m_csUserModuleName == _csUserModuleName );
}
if( bExist ) return hUserInfo;
else return NULL;
}
//***************************************************************************************
// Register module using the Watch Window
//
// Input : _csUserModuleName, a name to identify the module
// _pfnCallBack, the CallBack used by the Watch Window to communicate
//
// Output : Handle of User Information, usefull to identify Module when it will add Data
//***************************************************************************************
WAW_hUserInfo WAW_fn_hUserRegister( CString _csUserModuleName, WAW_CallBack _pfnCallBack)
{
WAW_hUserInfo hUserInfo = WAW_fn_hFindInfo( _csUserModuleName );
if( hUserInfo != NULL ) return hUserInfo;
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Register new user for Watch Window",
"WAW_fn_vUserRegister",
E_ERROR_GRAVITY_INSTABLE,
"The new User is not allocated" );
WAW_tdstUserInfo * pstInfo = new WAW_tdstUserInfo;
ERROR_ASSERT( pstInfo != NULL );
pstInfo->m_csUserModuleName = _csUserModuleName;
pstInfo->m_pfnCallBack = _pfnCallBack;
WAW_g_clListOfUser.AddTail( pstInfo );
return pstInfo;
}
//*************************************************************************************************
// Add a Data in the Watch Window
//
// Input : _hInfo, the handle of user info given when the user registered
// _pclParentData, the parent of the data to add
// _csDataName, the name of the added data
// _csDataValue, a string representing the value of the added data
// _pvUserData, a pointer to a possibly usefull data for the user
//
// Outpout : a pointer to the WAW_Data added or NULL if a problem is encounted
//*************************************************************************************************
WAW_Data * WAW_fn_pclAddData( CString _csUserModuleName, WAW_Data * _pclParentData, CString _csDataName, CString _csDataValue, void *_pvUserData )
{
WAW_hUserInfo hInfo = WAW_fn_hFindInfo( _csUserModuleName );
if( hInfo != NULL )
return WAW_fn_pclAddData( hInfo, _pclParentData, _csDataName, _csDataValue, _pvUserData );
else return NULL;
}
WAW_Data * WAW_fn_pclAddData( WAW_hUserInfo _hInfo, WAW_Data * _pclParentData, CString _csDataName, CString _csDataValue, void *_pvUserData )
{
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Add Data in Watch Window",
"WAW_fn_pclAddData",
E_ERROR_GRAVITY_INSTABLE,
"The WAW_hUserInfo is invalid" );
ERROR_ASSERT( WAW_M_bCheckInfo( _hInfo ) );
if( !WAW_M_bCheckInfo( _hInfo ) ) return NULL;
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Add Data in Watch Window",
"WAW_fn_pclAddData",
E_ERROR_GRAVITY_INSTABLE,
"The new Data is not allocated" );
WAW_Data *pclData = new WAW_Data( _csDataName, _csDataValue, _hInfo, _pvUserData );
ERROR_ASSERT( pclData != NULL );
if( pclData == NULL ) return NULL;
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Add Data in Watch Window",
"WAW_fn_pclAddData",
E_ERROR_GRAVITY_INSTABLE,
"The pointer to CTreeCtrl is NULL" );
CTreeCtrl * pclTreeCtrl = WAW_g_pclWatchWindow->m_pub_fn_pclGetTreeCtrl();
ERROR_ASSERT( pclTreeCtrl != NULL );
if( pclTreeCtrl == NULL ) return NULL;
HTREEITEM hParentItem = ( _pclParentData == NULL ? NULL : _pclParentData->m_pri_hTreeItem );
HTREEITEM hChildItem = pclTreeCtrl->GetChildItem( hParentItem );
while( hChildItem != NULL )
{
if( ((WAW_Data*)pclTreeCtrl->GetItemData( hChildItem ))->m_pub_fn_csGetDataName() == _csDataName )
return (WAW_Data*)pclTreeCtrl->GetItemData( hChildItem );
hChildItem = pclTreeCtrl->GetNextItem( hChildItem, TVGN_NEXT );
}
if( hParentItem == NULL ) hParentItem = TVI_ROOT;
TV_INSERTSTRUCT stItem;
stItem.hParent = hParentItem;
stItem.hInsertAfter = TVI_LAST;
stItem.item.mask = TVIF_TEXT | TVIF_STATE;
CString csDataString = _csDataName + " : " + _csDataValue;
stItem.item.pszText = (char*)LPCTSTR( csDataString );
stItem.item.state = TVIS_EXPANDED;
stItem.item.stateMask = TVIS_EXPANDED;
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Add Data in Watch Window",
"WAW_fn_pclAddData",
E_ERROR_GRAVITY_INSTABLE,
"The new subitem is not added in CTree" );
HTREEITEM hItem = pclTreeCtrl->InsertItem( &stItem );
ERROR_ASSERT( hItem != NULL );
if( hItem == NULL ) return NULL;
pclData->m_pri_hTreeItem = hItem;
pclTreeCtrl->SetItemData( hItem, (DWORD)pclData );
return pclData;
}
//*************************************************************************************************
// Add a Node in the Watch Window
//
// Input : _hInfo, the handle of user info given when the user registered
// _pclParentData, the parent of the node to add
// _csDataName, the name of the added node
// _pvUserData, a pointer to a possibly usefull data for the user
//
// Outpout : a pointer to the WAW_Data added or NULL if a problem is encounted
//
//*************************************************************************************************
WAW_Data * WAW_fn_pclAddNode( CString _csUserModuleName, WAW_Data * _pclParentData, CString _csNodeName, void *_pvUserData )
{
WAW_hUserInfo hInfo = WAW_fn_hFindInfo( _csUserModuleName );
if( hInfo != NULL )
return WAW_fn_pclAddNode( hInfo, _pclParentData, _csNodeName, _pvUserData );
else return NULL;
}
WAW_Data * WAW_fn_pclAddNode( WAW_hUserInfo _hInfo, WAW_Data * _pclParentData, CString _csNodeName, void *_pvUserData )
{
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Add Node in Watch Window",
"WAW_fn_pclAddNode",
E_ERROR_GRAVITY_INSTABLE,
"The WAW_hUserInfo is invalid" );
ERROR_ASSERT( WAW_M_bCheckInfo( _hInfo ) );
if( !WAW_M_bCheckInfo( _hInfo ) ) return NULL;
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Add Node in Watch Window",
"WAW_fn_pclAddNode",
E_ERROR_GRAVITY_INSTABLE,
"The new Node is not allocated" );
WAW_Data *pclData = new WAW_Data( _csNodeName, "", _hInfo, _pvUserData );
ERROR_ASSERT( pclData != NULL );
if( pclData == NULL ) return NULL;
pclData->m_pri_bIsData = FALSE;
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Add Node in Watch Window",
"WAW_fn_pclAddNode",
E_ERROR_GRAVITY_INSTABLE,
"The pointer to CTreeCtrl is NULL" );
CTreeCtrl * pclTreeCtrl = WAW_g_pclWatchWindow->m_pub_fn_pclGetTreeCtrl();
ERROR_ASSERT( pclTreeCtrl != NULL );
if( pclTreeCtrl == NULL ) return NULL;
HTREEITEM hParentItem = ( _pclParentData == NULL ? NULL : _pclParentData->m_pri_hTreeItem );
HTREEITEM hChildItem = pclTreeCtrl->GetChildItem( hParentItem );
while( hChildItem != NULL )
{
if( ((WAW_Data*)pclTreeCtrl->GetItemData( hChildItem ))->m_pub_fn_csGetDataName() == _csNodeName )
return (WAW_Data*)pclTreeCtrl->GetItemData( hChildItem );
hChildItem = pclTreeCtrl->GetNextItem( hChildItem, TVGN_NEXT );
}
if( hParentItem == NULL ) hParentItem = TVI_ROOT;
TV_INSERTSTRUCT stItem;
stItem.hParent = hParentItem;
stItem.hInsertAfter = TVI_LAST;
stItem.item.mask = TVIF_TEXT | TVIF_STATE;
stItem.item.pszText = (char*)LPCTSTR( _csNodeName );
stItem.item.state = TVIS_EXPANDED;
stItem.item.stateMask = TVIS_EXPANDED;
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Add Node in Watch Window",
"WAW_fn_pclAddNode",
E_ERROR_GRAVITY_INSTABLE,
"The new subitem is not added in CTree" );
HTREEITEM hItem = pclTreeCtrl->InsertItem( &stItem );
ERROR_ASSERT( hItem != NULL );
if( hItem == NULL ) return NULL;
pclData->m_pri_hTreeItem = hItem;
pclTreeCtrl->SetItemData( hItem, (DWORD)pclData );
return pclData;
}
//*****************************************************************************
// Update the value of a Data placed in the Watch Window
//
// Input : _pclData, a pointer to the Data to update
// _csDataValue, a string representing the new value of the Data
//
// Output : TRUE if succesfull, otherwise FALSE
//*****************************************************************************
BOOL WAW_fn_bUpdateData( WAW_Data * _pclData, CString _csDataValue )
{
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Update Data in Watch Window",
"WAW_fn_bUpdateData",
E_ERROR_GRAVITY_WARNING,
"The Data to update is NULL : operation aborted" );
ERROR_ASSERT( _pclData != NULL );
if( _pclData == NULL ) return FALSE;
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Update Data in Watch Window",
"WAW_fn_pclUpdateData",
E_ERROR_GRAVITY_INSTABLE,
"The pointer to CTreeCtrl is NULL" );
CTreeCtrl * pclTreeCtrl = WAW_g_pclWatchWindow->m_pub_fn_pclGetTreeCtrl();
ERROR_ASSERT( pclTreeCtrl != NULL );
if( pclTreeCtrl == NULL ) return NULL;
if( _pclData->m_pri_csDataValue != _csDataValue )
{
CString csDataString = _pclData->m_pub_fn_csGetDataName() + " : " + _csDataValue;
BOOL bOk = pclTreeCtrl->SetItemText( _pclData->m_pri_hTreeItem, (char*)LPCTSTR( csDataString ) );
if( bOk ) _pclData->m_pri_csDataValue = _csDataValue;
return bOk;
}
return TRUE;
}
//*********************************************************
// Delete a specific Data from the Watch Window
//
// Input : _pclData, the pointer to the Data to delete
//
// Output : TRUE if successfull, otherwise FALSE
//*********************************************************
BOOL WAW_fn_bDeleteData( WAW_Data *_pclData )
{
WAW_g_bAcceptMessage = FALSE;
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Remove a Data from the Watch Window",
"WAW_fn_bRemoveData",
E_ERROR_GRAVITY_WARNING,
"The Data to remove is NULL : operation aborted" );
ERROR_ASSERT( _pclData != NULL );
if( _pclData == NULL ) return FALSE;
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Remove a Data from the Watch Window",
"WAW_fn_bRemoveData",
E_ERROR_GRAVITY_INSTABLE,
"The pointer to CTreeCtrl is NULL" );
CTreeCtrl * pclTreeCtrl = WAW_g_pclWatchWindow->m_pub_fn_pclGetTreeCtrl();
ERROR_ASSERT( pclTreeCtrl != NULL );
if( pclTreeCtrl == NULL ) return FALSE;
HTREEITEM hParentItem = pclTreeCtrl->GetParentItem( _pclData->m_pri_hTreeItem );
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Remove a Data from the Watch Window",
"WAW_fn_bRemoveData",
E_ERROR_GRAVITY_WARNING,
"The Data to remove is not deleted in CTreeCtrl" );
BOOL bOk = pclTreeCtrl->DeleteItem( _pclData->m_pri_hTreeItem );
ERROR_ASSERT( bOk );
delete _pclData;
WAW_g_bAcceptMessage = TRUE;
if( hParentItem != NULL ) return WAW_fn_bCheckForEmptyNode( hParentItem );
else return bOk;
}
BOOL WAW_fn_bCheckForEmptyNode( HTREEITEM _hItem )
{
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Check if the parent of a deleted data must be deleted",
"WAW_fn_bCheckForEmptyNode",
E_ERROR_GRAVITY_INSTABLE,
"The pointer to CTreeCtrl is NULL" );
CTreeCtrl * pclTreeCtrl = WAW_g_pclWatchWindow->m_pub_fn_pclGetTreeCtrl();
ERROR_ASSERT( pclTreeCtrl != NULL );
if( pclTreeCtrl == NULL ) return FALSE;
WAW_Data * pclData = (WAW_Data*)pclTreeCtrl->GetItemData( _hItem );
if( pclData->m_pri_bIsData || pclTreeCtrl->ItemHasChildren( _hItem ) ) return TRUE;
else return WAW_fn_bDeleteData( pclData );
}
BOOL WAW_fn_bSetDataIcon( WAW_Data * _pclData, HICON _hIcon, HICON _hSelectedIcon )
{
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Associate an icon to a data",
"WAW_fn_bSetDataIcon",
E_ERROR_GRAVITY_WARNING,
"The Data is NULL : operation aborted" );
ERROR_ASSERT( _pclData != NULL );
if( _pclData == NULL ) return FALSE;
ERROR_PREPARE_M( WAW_g_C_csModuleNameForError,
"Associate an icon to a data",
"WAW_fn_bSetDataIcon",
E_ERROR_GRAVITY_INSTABLE,
"The pointer to CTreeCtrl is NULL" );
CTreeCtrl * pclTreeCtrl = WAW_g_pclWatchWindow->m_pub_fn_pclGetTreeCtrl();
ERROR_ASSERT( pclTreeCtrl != NULL );
if( pclTreeCtrl == NULL ) return NULL;
int iIndex = WAW_g_pclImageList->Add( _hIcon );
if( iIndex == -1 )
return FALSE;
int iSelectedIndex = (_hSelectedIcon != NULL ? WAW_g_pclImageList->Add( _hSelectedIcon ) : iIndex );
if( iSelectedIndex == -1 ) return FALSE;
return pclTreeCtrl->SetItemImage( _pclData->m_pri_hTreeItem, iIndex, iSelectedIndex );
}

View File

@@ -0,0 +1,38 @@
#include "StdAfx.h"
#include "WAW_Main.hpp"
#include "WAW_Strg.hpp"
#include "ErO.h"
static AFX_EXTENSION_MODULE NEAR extensionDLL = { NULL, NULL };
//*** Global variables **************************
// The WAW Module
HMODULE WAW_g_hModule = 0;
extern WAW_MainDialog * WAW_g_pclWatchWindow;
//========================================================================
// Get current CPA version
//========================================================================
void __declspec(dllexport) WAW_fn_vInitModule( HMODULE _hModule )
{
WAW_g_hModule = _hModule;
//Register module for ErO
ERROR_g_fn_vAddAModuleDescriptor( WAW_g_C_csModuleNameForError,
WAW_g_C_csModuleVersion,
"David REIZER",
"01 48 18 53 74 (Montreuil)",
"dreizer@ubisoft.fr",
"Daniel PALIX",
"04 50 51 26 63 (Annecy)",
"dpalix@ubisoft.fr",
"",
"",
"" );
}

Binary file not shown.