You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1041) |
Sep
(746) |
Oct
(46) |
Nov
(89) |
Dec
(117) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(21) |
Feb
(236) |
Mar
(316) |
Apr
(166) |
May
(114) |
Jun
(18) |
Jul
(23) |
Aug
(10) |
Sep
(35) |
Oct
(8) |
Nov
(44) |
Dec
(54) |
| 2007 |
Jan
(7) |
Feb
(21) |
Mar
(3) |
Apr
(1) |
May
|
Jun
(78) |
Jul
(9) |
Aug
(12) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
|
From: andrew7 <bd...@us...> - 2006-12-07 13:43:29
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin/widgets In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22147/include/smartwin/widgets Modified Files: WidgetButton.h Log Message: Add AspectKeyPressed so buttons can capture keystrokes. Index: WidgetButton.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetButton.h,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- WidgetButton.h 9 Jul 2006 03:42:00 -0000 1.27 +++ WidgetButton.h 7 Dec 2006 13:43:26 -0000 1.28 @@ -40,6 +40,7 @@ #include "../aspects/AspectEnabled.h" #include "../aspects/AspectFocus.h" #include "../aspects/AspectGetParent.h" +#include "../aspects/AspectKeyPressed.h" #include "../aspects/AspectBackgroundColor.h" #include "../aspects/AspectPainting.h" #include "../aspects/AspectRaw.h" @@ -77,6 +78,7 @@ public AspectEnabled< EventHandlerClass, WidgetButton< EventHandlerClass, MessageMapPolicy >, MessageMapControl< EventHandlerClass, WidgetButton< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > >, public AspectFocus< EventHandlerClass, WidgetButton< EventHandlerClass, MessageMapPolicy >, MessageMapControl< EventHandlerClass, WidgetButton< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > >, public AspectFont< WidgetButton< EventHandlerClass, MessageMapPolicy > >, + public AspectKeyPressed< EventHandlerClass, WidgetButton< EventHandlerClass, MessageMapPolicy >, MessageMapControl< EventHandlerClass, WidgetButton< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > >, public AspectPainting< EventHandlerClass, WidgetButton< EventHandlerClass, MessageMapPolicy >, MessageMapControl< EventHandlerClass, WidgetButton< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > >, public AspectRaw< EventHandlerClass, WidgetButton< EventHandlerClass, MessageMapPolicy >, MessageMapControl< EventHandlerClass, WidgetButton< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > >, public AspectSizable< EventHandlerClass, WidgetButton< EventHandlerClass, MessageMapPolicy >, MessageMapControl< EventHandlerClass, WidgetButton< EventHandlerClass, MessageMapPolicy >, MessageMapPolicy > >, |
|
From: andrew7 <bd...@us...> - 2006-12-07 13:41:56
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin/aspects In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21697/include/smartwin/aspects Modified Files: AspectText.h Log Message: Extract tstring replaceEndlWithLfCr( tstring txt ) from setTextLines() for reuse by WidgetTextBox Index: AspectText.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/aspects/AspectText.h,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- AspectText.h 30 Nov 2006 00:39:07 -0000 1.18 +++ AspectText.h 7 Dec 2006 13:41:52 -0000 1.19 @@ -143,6 +143,10 @@ */ void setTextLines( const SmartUtil::tstring & txt ); + /// Returns a string in which \n is replaced with with \r\n + /** The purpose is to enable Windows textboxs to understand "endl" + */ + SmartUtil::tstring replaceEndlWithLfCr( const SmartUtil::tstring & txt ); /// Gets the text of the AspectText realizing class /** The Return value is the text of the realizing class. @@ -174,10 +178,10 @@ template< class EventHandlerClass, class WidgetType, class MessageMapType > -void AspectText< EventHandlerClass, WidgetType, MessageMapType >::setTextLines( const SmartUtil::tstring & inTxt ) +SmartUtil::tstring AspectText< EventHandlerClass, WidgetType, MessageMapType >::replaceEndlWithLfCr( const SmartUtil::tstring & txt ) { // Replaces \n with \r\n so that Windows textbox understands "endl" - SmartUtil::tstring txtEndl= inTxt; + SmartUtil::tstring txtEndl= txt; std::string::size_type pos= txtEndl.find( '\n', 0 ); while ( std::string::npos != pos ) { @@ -185,7 +189,13 @@ pos += 2; // Don't find the replacement \n. pos= txtEndl.find( '\n', pos ); } - setText( txtEndl ); + return txtEndl; +} + +template< class EventHandlerClass, class WidgetType, class MessageMapType > +void AspectText< EventHandlerClass, WidgetType, MessageMapType >::setTextLines( const SmartUtil::tstring & inTxt ) +{ + setText( replaceEndlWithLfCr( inTxt ) ); } |
|
From: andrew7 <bd...@us...> - 2006-12-06 00:59:22
|
Update of /cvsroot/smartwin/SmartWin/tests/swDll In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29401/tests/swDll Modified Files: swDll.vcproj swDllMain.vcproj Removed Files: stdafx.cpp Log Message: The empty stdafx.cpp cause problems wth the compile that required a -ZM switch Index: swDll.vcproj =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/swDll/swDll.vcproj,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- swDll.vcproj 10 Feb 2006 09:22:51 -0000 1.4 +++ swDll.vcproj 6 Dec 2006 00:59:13 -0000 1.5 @@ -1,114 +1,179 @@ <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" - Version="7.10" + Version="8.00" Name="swDll" ProjectGUID="{D8DDD4E5-C498-4750-8E1B-F2B3D95858A6}" - Keyword="Win32Proj"> + RootNamespace="swDll" + Keyword="Win32Proj" + > <Platforms> <Platform - Name="Win32"/> + Name="Win32" + /> </Platforms> + <ToolFiles> + </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="Debug" IntermediateDirectory="Debug" ConfigurationType="2" - CharacterSet="2"> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SWDLL_EXPORTS" - MinimalRebuild="TRUE" + MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" - RuntimeTypeInfo="TRUE" - UsePrecompiledHeader="3" + RuntimeTypeInfo="true" + UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="4"/> + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> <Tool - Name="VCCustomBuildTool"/> + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> <Tool Name="VCLinkerTool" AdditionalDependencies="smartwind.lib" OutputFile="$(OutDir)/swDll.dll" LinkIncremental="2" - GenerateDebugInformation="TRUE" + GenerateDebugInformation="true" ProgramDatabaseFile="$(OutDir)/swDll.pdb" SubSystem="2" ImportLibrary="$(OutDir)/swDll.lib" - TargetMachine="1"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> + TargetMachine="1" + /> <Tool - Name="VCPreBuildEventTool"/> + Name="VCALinkTool" + /> <Tool - Name="VCPreLinkEventTool"/> + Name="VCManifestTool" + /> <Tool - Name="VCResourceCompilerTool"/> + Name="VCXDCMakeTool" + /> <Tool - Name="VCWebServiceProxyGeneratorTool"/> + Name="VCBscMakeTool" + /> <Tool - Name="VCXMLDataGeneratorTool"/> + Name="VCFxCopTool" + /> <Tool - Name="VCWebDeploymentTool"/> + Name="VCAppVerifierTool" + /> <Tool - Name="VCManagedWrapperGeneratorTool"/> + Name="VCWebDeploymentTool" + /> <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + Name="VCPostBuildEventTool" + /> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="Release" IntermediateDirectory="Release" ConfigurationType="2" - CharacterSet="2"> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SWDLL_EXPORTS" RuntimeLibrary="0" - RuntimeTypeInfo="TRUE" - UsePrecompiledHeader="3" + RuntimeTypeInfo="true" + UsePrecompiledHeader="2" WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="3"/> + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> <Tool - Name="VCCustomBuildTool"/> + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> <Tool Name="VCLinkerTool" AdditionalDependencies="smartwin.lib" OutputFile="$(OutDir)/swDll.dll" LinkIncremental="1" - GenerateDebugInformation="TRUE" + GenerateDebugInformation="true" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" ImportLibrary="$(OutDir)/swDll.lib" - TargetMachine="1"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> + TargetMachine="1" + /> <Tool - Name="VCPreBuildEventTool"/> + Name="VCALinkTool" + /> <Tool - Name="VCPreLinkEventTool"/> + Name="VCManifestTool" + /> <Tool - Name="VCResourceCompilerTool"/> + Name="VCXDCMakeTool" + /> <Tool - Name="VCWebServiceProxyGeneratorTool"/> + Name="VCBscMakeTool" + /> <Tool - Name="VCXMLDataGeneratorTool"/> + Name="VCFxCopTool" + /> <Tool - Name="VCWebDeploymentTool"/> + Name="VCAppVerifierTool" + /> <Tool - Name="VCManagedWrapperGeneratorTool"/> + Name="VCWebDeploymentTool" + /> <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + Name="VCPostBuildEventTool" + /> </Configuration> </Configurations> <References> @@ -117,44 +182,36 @@ <Filter Name="Source Files" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> - <File - RelativePath=".\stdafx.cpp"> - <FileConfiguration - Name="Debug|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - <FileConfiguration - Name="Release|Win32"> - <Tool - Name="VCCLCompilerTool" - UsePrecompiledHeader="1"/> - </FileConfiguration> - </File> + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > <File - RelativePath=".\swDll.cpp"> + RelativePath=".\swDll.cpp" + > </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > <File - RelativePath=".\helloDll.h"> + RelativePath=".\helloDll.h" + > </File> <File - RelativePath=".\stdafx.h"> + RelativePath=".\stdafx.h" + > </File> <File - RelativePath=".\swdll.h"> + RelativePath=".\swdll.h" + > </File> </Filter> <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > </Filter> </Files> <Globals> --- stdafx.cpp DELETED --- Index: swDllMain.vcproj =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/swDll/swDllMain.vcproj,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- swDllMain.vcproj 10 Feb 2006 09:22:51 -0000 1.5 +++ swDllMain.vcproj 6 Dec 2006 00:59:13 -0000 1.6 @@ -1,108 +1,172 @@ <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" - Version="7.10" + Version="8.00" Name="swDllMain" ProjectGUID="{128282C2-0D42-46A8-A32C-2EAC0068E554}" - Keyword="Win32Proj"> + Keyword="Win32Proj" + > <Platforms> <Platform - Name="Win32"/> + Name="Win32" + /> </Platforms> + <ToolFiles> + </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="Debug" IntermediateDirectory="Debug" ConfigurationType="1" - CharacterSet="2"> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" - MinimalRebuild="TRUE" + MinimalRebuild="true" BasicRuntimeChecks="3" - RuntimeLibrary="5" + RuntimeLibrary="1" UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="4"/> + Detect64BitPortabilityProblems="true" + DebugInformationFormat="4" + /> <Tool - Name="VCCustomBuildTool"/> + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> <Tool Name="VCLinkerTool" OutputFile="$(OutDir)/swDllMain.exe" LinkIncremental="2" - GenerateDebugInformation="TRUE" + GenerateDebugInformation="true" ProgramDatabaseFile="$(OutDir)/swDllMain.pdb" SubSystem="1" - TargetMachine="1"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> + TargetMachine="1" + /> <Tool - Name="VCPreBuildEventTool"/> + Name="VCALinkTool" + /> <Tool - Name="VCPreLinkEventTool"/> + Name="VCManifestTool" + /> <Tool - Name="VCResourceCompilerTool"/> + Name="VCXDCMakeTool" + /> <Tool - Name="VCWebServiceProxyGeneratorTool"/> + Name="VCBscMakeTool" + /> <Tool - Name="VCXMLDataGeneratorTool"/> + Name="VCFxCopTool" + /> <Tool - Name="VCWebDeploymentTool"/> + Name="VCAppVerifierTool" + /> <Tool - Name="VCManagedWrapperGeneratorTool"/> + Name="VCWebDeploymentTool" + /> <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + Name="VCPostBuildEventTool" + /> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="Release" IntermediateDirectory="Release" ConfigurationType="1" - CharacterSet="2"> + InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" + CharacterSet="2" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" - RuntimeLibrary="4" + RuntimeLibrary="0" UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="TRUE" - DebugInformationFormat="3"/> + Detect64BitPortabilityProblems="true" + DebugInformationFormat="3" + /> <Tool - Name="VCCustomBuildTool"/> + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + /> + <Tool + Name="VCPreLinkEventTool" + /> <Tool Name="VCLinkerTool" OutputFile="$(OutDir)/swDllMain.exe" LinkIncremental="1" - GenerateDebugInformation="TRUE" + GenerateDebugInformation="true" SubSystem="1" OptimizeReferences="2" EnableCOMDATFolding="2" - TargetMachine="1"/> - <Tool - Name="VCMIDLTool"/> - <Tool - Name="VCPostBuildEventTool"/> + TargetMachine="1" + /> <Tool - Name="VCPreBuildEventTool"/> + Name="VCALinkTool" + /> <Tool - Name="VCPreLinkEventTool"/> + Name="VCManifestTool" + /> <Tool - Name="VCResourceCompilerTool"/> + Name="VCXDCMakeTool" + /> <Tool - Name="VCWebServiceProxyGeneratorTool"/> + Name="VCBscMakeTool" + /> <Tool - Name="VCXMLDataGeneratorTool"/> + Name="VCFxCopTool" + /> <Tool - Name="VCWebDeploymentTool"/> + Name="VCAppVerifierTool" + /> <Tool - Name="VCManagedWrapperGeneratorTool"/> + Name="VCWebDeploymentTool" + /> <Tool - Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + Name="VCPostBuildEventTool" + /> </Configuration> </Configurations> <References> @@ -111,23 +175,28 @@ <Filter Name="Source Files" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > <File - RelativePath=".\swDllMain.cpp"> + RelativePath=".\swDllMain.cpp" + > </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > <File - RelativePath=".\swdll.h"> + RelativePath=".\swdll.h" + > </File> </Filter> <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > </Filter> </Files> <Globals> |
|
From: Thomas H. <pol...@us...> - 2006-12-04 10:06:08
|
Update of /cvsroot/smartwin/SmartWin/tests In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7183/tests Modified Files: SmartWinUnitTests.sln Log Message: Added up the Anchors sample into the VS7.1 solution... Index: SmartWinUnitTests.sln =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/SmartWinUnitTests.sln,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- SmartWinUnitTests.sln 10 Sep 2006 08:42:40 -0000 1.52 +++ SmartWinUnitTests.sln 4 Dec 2006 10:06:01 -0000 1.53 @@ -247,12 +247,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tester1Endpoint", "http://localhost/Tester1Endpoint/Tester1Endpoint.csproj", "{23EFE810-FF52-4E6E-AFAA-2C0AA6E66941}" ProjectSection(ProjectDependencies) = postProject EndProjectSection - ProjectSection(ProjectDependencies) = postProject - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SmartSOAPGoogleAPITester", "SmartSOAPGoogleAPITester\SmartSOAPGoogleAPITester.vcproj", "{69AD6BC8-9A9F-4384-B08D-0297E625A733}" ProjectSection(ProjectDependencies) = postProject @@ -279,6 +273,10 @@ ProjectSection(ProjectDependencies) = postProject EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Anchors", "Anchors\Anchors.vcproj", "{565CA7FA-B7AE-46E3-95BC-3C24FEEA2430}" + ProjectSection(ProjectDependencies) = postProject + EndProjectSection +EndProject Global GlobalSection(SolutionConfiguration) = preSolution Debug = Debug @@ -327,8 +325,11 @@ {CE16DE02-BFB1-4D2D-86AE-7CDA20583FA8}.ReleaseUnicode.ActiveCfg = ReleaseUnicode|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.Debug.ActiveCfg = Debug|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.DebugHeap.ActiveCfg = DebugUnicode|Win32 + {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.DebugHeap.Build.0 = DebugUnicode|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.DebugUnicode.ActiveCfg = DebugUnicode|Win32 + {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.DebugUnicode.Build.0 = DebugUnicode|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.DebugUnicodeThreads.ActiveCfg = DebugUnicode|Win32 + {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.DebugUnicodeThreads.Build.0 = DebugUnicode|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.Release.ActiveCfg = Release|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.Release.Build.0 = Release|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.ReleaseUnicode.ActiveCfg = ReleaseUnicode|Win32 @@ -539,8 +540,11 @@ {3FD06460-C646-4F9D-8214-EA14C2BA1A3C}.ReleaseUnicode.Build.0 = Release|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.Debug.ActiveCfg = Debug|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.DebugHeap.ActiveCfg = DebugUnicode|Win32 + {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.DebugHeap.Build.0 = DebugUnicode|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.DebugUnicode.ActiveCfg = DebugUnicode|Win32 + {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.DebugUnicode.Build.0 = DebugUnicode|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.DebugUnicodeThreads.ActiveCfg = DebugUnicode|Win32 + {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.DebugUnicodeThreads.Build.0 = DebugUnicode|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.Release.ActiveCfg = Release|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.Release.Build.0 = Release|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.ReleaseUnicode.ActiveCfg = ReleaseUnicode|Win32 @@ -710,6 +714,18 @@ {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.Release.Build.0 = Release|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.ReleaseUnicode.ActiveCfg = ReleaseUnicode|Win32 {172CA8E8-BB8C-418B-8FF7-D7B77657DB2E}.ReleaseUnicode.Build.0 = ReleaseUnicode|Win32 + {565CA7FA-B7AE-46E3-95BC-3C24FEEA2430}.Debug.ActiveCfg = Debug|Win32 + {565CA7FA-B7AE-46E3-95BC-3C24FEEA2430}.Debug.Build.0 = Debug|Win32 + {565CA7FA-B7AE-46E3-95BC-3C24FEEA2430}.DebugHeap.ActiveCfg = DebugUnicode|Win32 + {565CA7FA-B7AE-46E3-95BC-3C24FEEA2430}.DebugHeap.Build.0 = DebugUnicode|Win32 + {565CA7FA-B7AE-46E3-95BC-3C24FEEA2430}.DebugUnicode.ActiveCfg = DebugUnicode|Win32 + {565CA7FA-B7AE-46E3-95BC-3C24FEEA2430}.DebugUnicode.Build.0 = DebugUnicode|Win32 + {565CA7FA-B7AE-46E3-95BC-3C24FEEA2430}.DebugUnicodeThreads.ActiveCfg = DebugUnicode|Win32 + {565CA7FA-B7AE-46E3-95BC-3C24FEEA2430}.DebugUnicodeThreads.Build.0 = DebugUnicode|Win32 + {565CA7FA-B7AE-46E3-95BC-3C24FEEA2430}.Release.ActiveCfg = Release|Win32 + {565CA7FA-B7AE-46E3-95BC-3C24FEEA2430}.Release.Build.0 = Release|Win32 + {565CA7FA-B7AE-46E3-95BC-3C24FEEA2430}.ReleaseUnicode.ActiveCfg = ReleaseUnicode|Win32 + {565CA7FA-B7AE-46E3-95BC-3C24FEEA2430}.ReleaseUnicode.Build.0 = ReleaseUnicode|Win32 EndGlobalSection GlobalSection(SolutionItems) = postSolution ..\makeSetup.bat = ..\makeSetup.bat |
|
From: Thomas H. <pol...@us...> - 2006-12-04 10:06:05
|
Update of /cvsroot/smartwin/SmartWin/tests/Anchors In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv7183/tests/Anchors Modified Files: Anchors.vcproj Log Message: Added up the Anchors sample into the VS7.1 solution... Index: Anchors.vcproj =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/Anchors/Anchors.vcproj,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Anchors.vcproj 30 Nov 2006 00:54:54 -0000 1.1 +++ Anchors.vcproj 4 Dec 2006 10:06:00 -0000 1.2 @@ -1,338 +1,214 @@ <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" - Version="8.00" + Version="7.10" Name="Anchors" - ProjectGUID="{05949643-0000-0000-0000-000000000000}" - Keyword="Win32Proj" - > + ProjectGUID="{565CA7FA-B7AE-46E3-95BC-3C24FEEA2430}" + Keyword="Win32Proj"> <Platforms> <Platform - Name="Win32" - /> + Name="Win32"/> </Platforms> - <ToolFiles> - </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="Debug" IntermediateDirectory="Debug" ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> + CharacterSet="2"> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" - MinimalRebuild="true" + MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="1" - TreatWChar_tAsBuiltInType="true" - RuntimeTypeInfo="true" + TreatWChar_tAsBuiltInType="TRUE" + RuntimeTypeInfo="TRUE" UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="4"/> <Tool - Name="VCPreLinkEventTool" - /> + Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalDependencies="" - OutputFile="$(OutDir)/Anchor.exe" + OutputFile="$(OutDir)/WidgetStatusBar.exe" LinkIncremental="2" - GenerateDebugInformation="true" - ProgramDatabaseFile="$(OutDir)/Anchor.pdb" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile="$(OutDir)/WidgetStatusBar.pdb" SubSystem="2" - TargetMachine="1" - /> + TargetMachine="1"/> <Tool - Name="VCALinkTool" - /> + Name="VCMIDLTool"/> <Tool - Name="VCManifestTool" - /> + Name="VCPostBuildEventTool"/> <Tool - Name="VCXDCMakeTool" - /> + Name="VCPreBuildEventTool"/> <Tool - Name="VCBscMakeTool" - /> + Name="VCPreLinkEventTool"/> <Tool - Name="VCFxCopTool" - /> + Name="VCResourceCompilerTool"/> <Tool - Name="VCAppVerifierTool" - /> + Name="VCWebServiceProxyGeneratorTool"/> <Tool - Name="VCWebDeploymentTool" - /> + Name="VCXMLDataGeneratorTool"/> <Tool - Name="VCPostBuildEventTool" - /> + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="Release" IntermediateDirectory="Release" ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="2" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> + CharacterSet="2"> <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" RuntimeLibrary="0" - TreatWChar_tAsBuiltInType="true" - RuntimeTypeInfo="true" + TreatWChar_tAsBuiltInType="TRUE" + RuntimeTypeInfo="TRUE" UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="3"/> <Tool - Name="VCPreLinkEventTool" - /> + Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalDependencies="" - OutputFile="$(OutDir)/Anchor.exe" + OutputFile="$(OutDir)/WidgetStatusBar.exe" LinkIncremental="1" - GenerateDebugInformation="true" + GenerateDebugInformation="TRUE" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" - TargetMachine="1" - /> + TargetMachine="1"/> <Tool - Name="VCALinkTool" - /> + Name="VCMIDLTool"/> <Tool - Name="VCManifestTool" - /> + Name="VCPostBuildEventTool"/> <Tool - Name="VCXDCMakeTool" - /> + Name="VCPreBuildEventTool"/> <Tool - Name="VCBscMakeTool" - /> + Name="VCPreLinkEventTool"/> <Tool - Name="VCFxCopTool" - /> + Name="VCResourceCompilerTool"/> <Tool - Name="VCAppVerifierTool" - /> + Name="VCWebServiceProxyGeneratorTool"/> <Tool - Name="VCWebDeploymentTool" - /> + Name="VCXMLDataGeneratorTool"/> <Tool - Name="VCPostBuildEventTool" - /> + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> <Configuration Name="DebugUnicode|Win32" OutputDirectory="$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> + CharacterSet="1"> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;UNICODE;_UNICODE" - MinimalRebuild="true" + MinimalRebuild="TRUE" BasicRuntimeChecks="3" RuntimeLibrary="1" - TreatWChar_tAsBuiltInType="true" - RuntimeTypeInfo="true" + TreatWChar_tAsBuiltInType="TRUE" + RuntimeTypeInfo="TRUE" UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="4" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="4"/> <Tool - Name="VCPreLinkEventTool" - /> + Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalDependencies="" - OutputFile="$(OutDir)/Anchor.exe" + OutputFile="$(OutDir)/WidgetStatusBar.exe" LinkIncremental="2" - GenerateDebugInformation="true" - ProgramDatabaseFile="$(OutDir)/Anchor.pdb" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile="$(OutDir)/WidgetStatusBar.pdb" SubSystem="2" - TargetMachine="1" - /> + TargetMachine="1"/> <Tool - Name="VCALinkTool" - /> + Name="VCMIDLTool"/> <Tool - Name="VCManifestTool" - /> + Name="VCPostBuildEventTool"/> <Tool - Name="VCXDCMakeTool" - /> + Name="VCPreBuildEventTool"/> <Tool - Name="VCBscMakeTool" - /> + Name="VCPreLinkEventTool"/> <Tool - Name="VCFxCopTool" - /> + Name="VCResourceCompilerTool"/> <Tool - Name="VCAppVerifierTool" - /> + Name="VCWebServiceProxyGeneratorTool"/> <Tool - Name="VCWebDeploymentTool" - /> + Name="VCXMLDataGeneratorTool"/> <Tool - Name="VCPostBuildEventTool" - /> + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> <Configuration Name="ReleaseUnicode|Win32" OutputDirectory="$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="1" - InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" - CharacterSet="1" - > - <Tool - Name="VCPreBuildEventTool" - /> - <Tool - Name="VCCustomBuildTool" - /> - <Tool - Name="VCXMLDataGeneratorTool" - /> - <Tool - Name="VCWebServiceProxyGeneratorTool" - /> - <Tool - Name="VCMIDLTool" - /> + CharacterSet="1"> <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_UNICODE" RuntimeLibrary="0" - TreatWChar_tAsBuiltInType="true" - RuntimeTypeInfo="true" + TreatWChar_tAsBuiltInType="TRUE" + RuntimeTypeInfo="TRUE" UsePrecompiledHeader="0" WarningLevel="3" - Detect64BitPortabilityProblems="true" - DebugInformationFormat="3" - /> - <Tool - Name="VCManagedResourceCompilerTool" - /> - <Tool - Name="VCResourceCompilerTool" - /> + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="3"/> <Tool - Name="VCPreLinkEventTool" - /> + Name="VCCustomBuildTool"/> <Tool Name="VCLinkerTool" AdditionalDependencies="" - OutputFile="$(OutDir)/Anchor.exe" + OutputFile="$(OutDir)/WidgetStatusBar.exe" LinkIncremental="1" - GenerateDebugInformation="true" + GenerateDebugInformation="TRUE" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" - TargetMachine="1" - /> + TargetMachine="1"/> <Tool - Name="VCALinkTool" - /> + Name="VCMIDLTool"/> <Tool - Name="VCManifestTool" - /> + Name="VCPostBuildEventTool"/> <Tool - Name="VCXDCMakeTool" - /> + Name="VCPreBuildEventTool"/> <Tool - Name="VCBscMakeTool" - /> + Name="VCPreLinkEventTool"/> <Tool - Name="VCFxCopTool" - /> + Name="VCResourceCompilerTool"/> <Tool - Name="VCAppVerifierTool" - /> + Name="VCWebServiceProxyGeneratorTool"/> <Tool - Name="VCWebDeploymentTool" - /> + Name="VCXMLDataGeneratorTool"/> <Tool - Name="VCPostBuildEventTool" - /> + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> </Configuration> </Configurations> <References> @@ -341,35 +217,25 @@ <Filter Name="Source Files" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" - UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2132D752A2FF}" - > + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> <File - RelativePath=".\SWMainForm.cpp" - > + RelativePath=".\SWMainForm.cpp"> </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" - UniqueIdentifier="{93995380-89BD-4b04-88EB-123BE52EBFB}" - > + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> <File - RelativePath=".\SWMainForm.h" - > + RelativePath=".\SWMainForm.h"> </File> </Filter> <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" - UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-13FB121AAD01}" - > - <File - RelativePath=".\icon.ico" - > - </File> + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> <File - RelativePath=".\resource.rc" - > + RelativePath=".\resource.rc"> </File> </Filter> </Files> |
|
From: andrew7 <bd...@us...> - 2006-11-30 04:03:45
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24468/include/smartwin Modified Files: SmartWin.h Log Message: Add Anchors Index: SmartWin.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/SmartWin.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- SmartWin.h 9 Sep 2006 15:37:32 -0000 1.14 +++ SmartWin.h 30 Nov 2006 04:03:41 -0000 1.15 @@ -59,6 +59,7 @@ #include "widgets/WidgetModalDialog.h" #include "widgets/WidgetMDIChild.h" #include "BasicTypes.h" +#include "Anchors.h" #include "Place.h" #include "CallbackFuncPrototypes.h" #include "Command.h" |
|
From: andrew7 <bd...@us...> - 2006-11-30 04:03:15
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv24362/include/smartwin Modified Files: MessageMapPolicyClasses.h Log Message: Adjust to allow WidgetModalDialog to work. Index: MessageMapPolicyClasses.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/MessageMapPolicyClasses.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- MessageMapPolicyClasses.h 15 Oct 2006 01:52:01 -0000 1.13 +++ MessageMapPolicyClasses.h 30 Nov 2006 04:03:11 -0000 1.14 @@ -122,35 +122,71 @@ : protected private_::DestructionClass { protected: + +/* Debugging problems with menus and WidgetModalDialogs. + + void snapUserData( char header[], HWND hw ) + { + std::stringstream msg; + msg << header << std::hex << ::GetWindowLong( hw, GWL_USERDATA ) << std::endl; + _RPT0( _CRT_WARN, msg.str().c_str() ); + + if ( ::IsMenu( hw ) ) { + _RPT0( _CRT_WARN, _T("Aha, it is a menu") ); + } + } + + void snapChildren() + { + snapUserData( "kill called on ! isChild ", this->handle() ); + + int sz= (int)itsChildren.size(); + for ( int c=0; c < sz; c++ ) { + snapUserData( " children are ", itsChildren[c]->handle() ); + } + } +*/ + LRESULT kill() { // Handle either the Modal dialog widget or something created inside it. // We can differentiate because "modal dialog boxes cannot have the WS_CHILD style". if ( this->isChild ) { - killMe(); // For a widget in the ModalDialog, - return 0; // do as MessageMapPolicyNormalWidget does. + // snapUserData( "kill called on isChild ", this->handle() ); + // For a widget in the ModalDialog, + killMe(); // do as MessageMapPolicyNormalWidget does. + } else { + // snapChildren(); + + // For the ModalDialog widget itself, just erase me from two lists. + // ( Since the modal dialog widget is stack based, + // isn't "collected automatically", and thus should not be deleted. ) + killChildren(); // needed for resource based WidgetModalDialogs. + eraseMeFromParentsChildren(); + eraseFromApplicationWidgets( this ); } - // Since the modal dialog widget is stack based, isn't "collected automatically", - // and thus should not be deleted. - killChildren(); - eraseMeFromParentsChildren(); + return 0; + } + // Remove from the Application based list of widgets. + void eraseFromApplicationWidgets( Widget * inWidget ) + { // Explicitly erase it here for ( std::list < Widget * >::iterator idx = Application::instance().itsWidgets.begin(); idx != Application::instance().itsWidgets.end(); ++idx ) { - if ( * idx == this ) + if ( * idx == inWidget ) { Application::instance().itsWidgets.erase( idx ); break; } } - - return 0; } + + enum canSubclassControls { Yup_we_can_do }; |
|
From: andrew7 <bd...@us...> - 2006-11-30 01:10:01
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetTextBox In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2546/tests/WidgetTextBox Modified Files: Main.cpp Log Message: Unicode Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetTextBox/Main.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Main.cpp 5 Nov 2006 20:23:12 -0000 1.15 +++ Main.cpp 30 Nov 2006 01:09:57 -0000 1.16 @@ -113,7 +113,7 @@ DWORD maxChars= textBoxs[8]->getTextLimit(); // Show how you can control the line formatting in textboxes - std::stringstream ss; ss << "\"first\" << endl" << std::endl << "<< \"second\""; + SmartUtil::tstringstream ss; ss << _T("\"first\" << endl" << std::endl << "<< \"second\"" ); // textBoxs[5]->setText( ss.str() ); // setText does not handle endl. textBoxs[5]->setTextLines( ss.str() ); // setTextLines does. } |
|
From: andrew7 <bd...@us...> - 2006-11-30 01:09:22
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetTabControl In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv2464/tests/WidgetTabControl Modified Files: Main.cpp Log Message: Changes to make it work with Unicode Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetTabControl/Main.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Main.cpp 20 Apr 2006 05:03:41 -0000 1.9 +++ Main.cpp 30 Nov 2006 01:09:18 -0000 1.10 @@ -84,9 +84,9 @@ tabSheetCS.location = SmartWin::Rectangle( getClientAreaSize() ).shrink( 30l ); sheet = createTabSheet( tabSheetCS ); - sheet->addPage( "Page 1", 0 ); - sheet->addPage( "Page 2", 1 ); - sheet->addPage( "Page 3", 2 ); + sheet->addPage( _T("Page 1"), 0 ); + sheet->addPage( _T("Page 2"), 1 ); + sheet->addPage( _T("Page 3"), 2 ); clientArea = sheet->getUsableArea(); clientArea.pos += tabSheetCS.location.pos; @@ -95,8 +95,8 @@ textBoxCS.style = WS_CHILD | WS_BORDER | ES_AUTOVSCROLL | ES_SUNKEN | ES_CENTER | ES_MULTILINE; textBoxCS.location = clientArea.shrink( 10l ); - textBoxCS.caption = _T( "Page one, demonstrates how to use a naive TabSheet in SmartWin, just for fun try to switch a couple of " - "times between the different tabs, then come back to this tab and try to REMOVE the words SmartWin from this text ( both places )" ); + textBoxCS.caption = _T( "Page one, demonstrates how to use a naive TabSheet in SmartWin, just for fun try to switch a couple of ") + _T( "times between the different tabs, then come back to this tab and try to REMOVE the words SmartWin from this text ( both places )" ); textPage1 = createTextBox( textBoxCS ); textPage1->setVisible( true ); |
|
From: andrew7 <bd...@us...> - 2006-11-30 01:08:18
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetRichTextBox In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1904/tests/WidgetRichTextBox Modified Files: Main.cpp Log Message: Unicode Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetRichTextBox/Main.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- Main.cpp 5 May 2006 17:21:46 -0000 1.16 +++ Main.cpp 30 Nov 2006 01:08:09 -0000 1.17 @@ -15,6 +15,8 @@ class WidgetTest1 : public WidgetFactory< WidgetWindow, WidgetTest1 > { + WidgetRichTextBoxPtr textBox; + public: WidgetTest1() {} @@ -26,6 +28,7 @@ SmartUtil::tstring tmpTxt = textField->getSelection(); this->setText( SmartUtil::tstring( _T( "New selection : " ) ) + tmpTxt + _T( ", " ) + boost::lexical_cast< SmartUtil::tstring >( ( int ) tmp->chrg.cpMin ) + SmartUtil::tstring( _T( ", " ) ) + boost::lexical_cast< SmartUtil::tstring >( ( int ) tmp->chrg.cpMax ) ); + textField->setBackgroundColor( RGB( rand()%255, rand()%255, rand()%255 ) ); return 0; } @@ -41,7 +44,7 @@ richTextBoxCS.location = SmartWin::Rectangle( 100, 100, 300, 300 ); richTextBoxCS.scrollBarHorizontallyFlag = false; richTextBoxCS.scrollBarVerticallyFlag = false; - WidgetRichTextBoxPtr textBox = createRichTextBox( richTextBoxCS ); + textBox = createRichTextBox( richTextBoxCS ); textBox->onKeyPressed( & WidgetTest1::richKeyPressed ); WPARAM wPar = 0; |
|
From: andrew7 <bd...@us...> - 2006-11-30 01:07:40
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetModalDialog In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv1487/tests/WidgetModalDialog Modified Files: NumDialog.h Log Message: Cleaup after getting a Right click initiated menu to work. Index: NumDialog.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetModalDialog/NumDialog.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- NumDialog.h 14 Nov 2006 14:58:33 -0000 1.11 +++ NumDialog.h 30 Nov 2006 01:07:36 -0000 1.12 @@ -4,11 +4,16 @@ #include "SmartWin.h" +// Uncomment this to have a button that raises an InDialog in the pure dialog. #define SHOW_INDIALOG #ifdef SHOW_INDIALOG #include "io/InDialog.h" // Input some integers, strings, and booleans. #endif +// Uncomment this to allow a right context menu in the pure dialog. +#define TRY_CONTEXT + + #include "resource.h" using namespace SmartWin; @@ -149,8 +154,6 @@ //----------------------------------------------------------- -// Uncomment thhis to see a bug -// #define TRY_CONTEXT /* PURE modal dialog does without resource files. @@ -200,12 +203,13 @@ WidgetButtonPtr itsCancelButton; WidgetButtonPtr itsAnotherModalButton; + SmartUtil::tstring itsPromptTxt; + SmartUtil::tstring itsResultTxt; + #ifdef TRY_CONTEXT - WidgetMenuPtr mainMenu, recentFiles; + WidgetMenuPtr mainMenu, recentFiles, file; #endif - SmartUtil::tstring itsPromptTxt; - SmartUtil::tstring itsResultTxt; // Needed to allow the Widgets to be subclassed before the dialog appears, // but after the dialog is created. @@ -237,32 +241,14 @@ #ifdef TRY_CONTEXT - // Create POP up menu too - ::SetWindowLong( this->handle(), GWL_USERDATA, 0x1111 ); - + // Creating a popup under mainMenu for the context menu mainMenu = createMenu(); - WidgetMenuPtr file = mainMenu->appendPopup( _T( "&Popup" ) ); - ::SetWindowLong( file->handle(), GWL_USERDATA, 0x5555 ); - - // Creating another popup UNDERNEATH mainMenu - recentFiles = file->appendPopup( _T( "Popup II" ) ); - ::SetWindowLong( recentFiles->handle(), GWL_USERDATA, 0x5555 ); + recentFiles = mainMenu->appendPopup( _T( "&Popup" ) ); recentFiles->appendItem( 3, _T( "alpha" ), & PureNumDialog::menuEventHandler ); recentFiles->appendItem( 4, _T( "beta" ), & PureNumDialog::menuEventHandler ); onRightMouseDown( & PureNumDialog::popupMenuViaRightClick ); - { - HWND hw= this->handle(); - long ud= ::GetWindowLong( hw, GWL_USERDATA ); - int sz= itsChildren.size(); - for ( int c=0; c < sz; c++ ) { - hw= itsChildren[c]->handle(); - ud= ::GetWindowLong( hw, GWL_USERDATA ); - } - } - #endif - // A layout approach to positioning the controls. // itsPrompt textbox // @@ -286,33 +272,6 @@ void ok_clicked( WidgetButtonPtr btn ) { - - - long ud; - HWND hw; - int count= 0; - stringstream ss; - - // A dialog doesn't clean up after itself when destroyed... Don't know why... - for ( std::vector < Widget * >::iterator idx = itsChildren.begin(); - idx != itsChildren.end(); - ++idx ) - { - count++; - - hw= ( * idx )->handle(); - ud= ::GetWindowLong( hw, GWL_USERDATA ); - if ( 0x5555 == ud ) { - continue; - } - ss << hex << "Child " << hw << ", userdat= " << ud << endl; - - } - - string msg= ss.str(); - - - itsResultTxt = itsTextBox->getText(); endDialog( IDOK ); // IDOK or IDCANCEL or any other value. } @@ -327,13 +286,12 @@ { recentFiles->trackPopupMenu( this ); } -#endif void menuEventHandler( WidgetMenuPtr menu, unsigned item ) { createMessageBox().show( menu->getText( item ) ); } - +#endif // Tests use of ModalDialog from another ModalDialog and @@ -346,9 +304,9 @@ #ifdef SHOW_INDIALOG int int1 = - 8; float float1 = ( float ) 98.6; - SmartUtil::tstring str1 = "hello"; + SmartUtil::tstring str1 = _T("hello"); - InDialog myInDialog( this, "First InDialog Attempt !" ); + InDialog myInDialog( this, _T("First InDialog Attempt !") ); myInDialog .add( _T( "Temperature:" ), & int1 ) .add( _T( "Average temperature:" ), & float1 ) |
|
From: andrew7 <bd...@us...> - 2006-11-30 01:05:11
|
Update of /cvsroot/smartwin/SmartWin/tests/WidgetGraph In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv423/tests/WidgetGraph Modified Files: Main.cpp WidgetGraph.h Log Message: Unicode Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetGraph/Main.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Main.cpp 20 Apr 2006 05:03:40 -0000 1.9 +++ Main.cpp 30 Nov 2006 01:05:08 -0000 1.10 @@ -20,6 +20,7 @@ void simpleXYData() { + this->setText( _T( "WidgetGraph short sample" ) ); this->setBounds( 0, 0, 250, 200 ); this->setText( _T( "WidgetGraph test of X - Y data graph" ) ); short xdata[] = @@ -50,6 +51,7 @@ void socialSecurity() { + this->setText( _T( "WidgetGraph int sample" ) ); this->setBounds( 0, 200, 500, 200 ); // Assets at end of year @@ -84,6 +86,7 @@ void doubleXYData() { + this->setText( _T( "WidgetGraph double sample" ) ); this->setBounds( 250, 0, 250, 200 ); this->setText( _T( "WidgetGraph test of double X - Y data graph" ) ); double xdata[] = @@ -123,10 +126,6 @@ if ( typeid( double ) == typeid( mytype ) ) doubleXYData(); if ( typeid( int ) == typeid( mytype ) ) histogram(); - SmartUtil::tstring title( _T( "WidgetGraph sample for type " ) ); - title += typeid( mytype ).name(); - this->setText( title ); - layout(); onSized( & WidgetGraphTest::isResized ); } Index: WidgetGraph.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/WidgetGraph/WidgetGraph.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- WidgetGraph.h 5 May 2006 17:14:42 -0000 1.7 +++ WidgetGraph.h 30 Nov 2006 01:05:08 -0000 1.8 @@ -50,8 +50,6 @@ void setYData( const SmartUtil::tstring & inYAxisTitle, NumIter beg, NumIter end ) { setData( itsY, inYAxisTitle, beg, end ); -// itsY.setData( beg, end ); -// calcStrSizes( itsY ); } private: @@ -334,6 +332,8 @@ if ( 0 == itsY.size() ) { + if ( 0 == itsX.size() ) return; // No data at all. + // Draw histogram of X only data. drawHistogram( canvas, rc, graphRect ); } @@ -352,7 +352,7 @@ Point getNumericSize( Numeric n, SmartUtil::tstring & str ) { - std::stringstream ss; + SmartUtil::tstringstream ss; ss << n; str = ss.str(); return this->getTextSize( str ); @@ -366,7 +366,8 @@ void chooseProperties( const SmartWin::MouseEventResult & mouse ) { - InDialog myInDialog( this, "Graph parameters" ); + SmartUtil::tstring title= _T("Graph parameters"); + InDialog myInDialog( this, title ); myInDialog .add( _T( "Axis present?" ), & axisPresent ) .add( _T( "Point color ..." ), & itsPointColor ) |
|
From: andrew7 <bd...@us...> - 2006-11-30 01:04:03
|
Update of /cvsroot/smartwin/SmartWin/tests/Threads In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv32012/tests/Threads Modified Files: Main.cpp Log Message: Unicode Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/Threads/Main.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Main.cpp 20 Apr 2006 05:03:39 -0000 1.7 +++ Main.cpp 30 Nov 2006 01:03:59 -0000 1.8 @@ -62,7 +62,7 @@ // Thread 1 function unsigned long newThread1( SmartUtil::tstring & message ) { - std::stringstream str; + SmartUtil::tstringstream str; int idx = 0; // Loop until closing is true @@ -83,7 +83,7 @@ str.str( _T( "" ) ); str.clear(); str << ++idx; - text1->setText( text1->getText() + ( message + _T( " : " ) + str.str() ) + " " + sharedObject + _T( "\r\n" ) ); + text1->setText( text1->getText() + ( message + _T( " : " ) + str.str() ) + _T(" ") + sharedObject + _T( "\r\n" ) ); text1->showCaret(); // Sleeping for 40 milliseconds @@ -116,9 +116,9 @@ sharedObject.push_back( tmp ); // Doing time demanding locked operation - std::stringstream str; + SmartUtil::tstringstream str; str << ++idx; - text2->setText( text2->getText() + ( message + _T( " : " ) + str.str() + " " + sharedObject + _T( "\r\n" ) ) ); + text2->setText( text2->getText() + ( message + _T( " : " ) + str.str() + _T(" ") + sharedObject + _T( "\r\n" ) ) ); text2->showCaret(); // Sleeping for 50 milliseconds @@ -247,7 +247,7 @@ void initAndCreate() { // Setting text of our shared object... - sharedObject = "ABCDEFGH"; + sharedObject = _T("ABCDEFGH"); // Creating window createWindow(); |
|
From: andrew7 <bd...@us...> - 2006-11-30 01:03:37
|
Update of /cvsroot/smartwin/SmartWin/tests/sw_mdi In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31948/tests/sw_mdi Modified Files: MdiDraw.h MdiEdit.h MdiFrame.h MdiGrid.h MdiTree.h MdiWidg.h Log Message: Unicode support and update Menus to be raised reasonably. Index: MdiTree.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/sw_mdi/MdiTree.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- MdiTree.h 17 Jul 2006 18:52:02 -0000 1.10 +++ MdiTree.h 30 Nov 2006 01:03:33 -0000 1.11 @@ -121,20 +121,12 @@ void PopupMenuViaRightClick( const SmartWin::MouseEventResult & mouse ) { - SmartWin::Rectangle possize = this->getBounds(); - int x = possize.pos.x + mouse.pos.x; - int y = possize.pos.y + mouse.pos.y; - - ::TrackPopupMenu( reinterpret_cast< HMENU >( itsPopmenu->handle() ), - TPM_CENTERALIGN | TPM_VCENTERALIGN, - x, y, 0, this->handle(), 0 ); + itsPopmenu->trackPopupMenu( this ); } void PopupMenuViaButton( typename MdiTree< parent, MdiParent >::WidgetButtonPtr btn ) { - SmartWin::Rectangle btn_possize = btn->getBounds(); - - itsPopmenu->trackPopupMenu( this, btn_possize.pos.x, btn_possize.pos.y + btn_possize.size.y, TPM_LEFTALIGN | TPM_TOPALIGN ); + itsPopmenu->trackPopupMenu( this ); } void addNode( typename MdiTree< parent, MdiParent >::WidgetButtonPtr btn ) @@ -235,7 +227,11 @@ SmartUtil::tstring filePath; HtmlFilenameFromUser( filePath ); +#ifdef UNICODE + wfstream file( filePath.c_str(), ios_base::in ); +#else fstream file( filePath.c_str(), ios_base::in ); +#endif if ( ! file.good() ) return; itsCurrentFilename = filePath; this->setText( itsCurrentFilename + _T( " - Grid" ) ); @@ -272,7 +268,11 @@ void FileSave( SmartUtil::tstring & filePath ) { +#ifdef UNICODE + wfstream file( filePath.c_str(), ios_base::out ); +#else fstream file( filePath.c_str(), ios_base::out ); +#endif if ( ! file.good() ) return; html_put hp( file ); @@ -325,7 +325,7 @@ layout( sz.newSize ); } - void OnTextReady( const string & newtext ) + void OnTextReady( const SmartUtil::tstring & newtext ) {} bool KeyPressed( typename MdiTree< parent, MdiParent >::WidgetTextBoxPtr textField, int key ) @@ -334,12 +334,12 @@ { case VK_RETURN : OnTextReady( itsInputBox->getText() ); - itsInputBox->setText( "" ); + itsInputBox->setText( _T("") ); return true; case VK_ESCAPE : // itsAddBut->setText( "" ); - itsInputBox->setText( "" ); + itsInputBox->setText( _T("") ); return true; default: return false; } @@ -403,7 +403,7 @@ // Configure the prompt and input text box. itsMenuBut = this->createButton(); - itsMenuBut->setText( "menu" ); + itsMenuBut->setText( _T("menu") ); itsMenuBut->onClicked( & MdiTree< parent, MdiParent >::PopupMenuViaButton ); itsAddBut = this->createButton(); Index: MdiFrame.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/sw_mdi/MdiFrame.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- MdiFrame.h 15 Oct 2006 14:30:11 -0000 1.4 +++ MdiFrame.h 30 Nov 2006 01:03:33 -0000 1.5 @@ -329,7 +329,7 @@ ( this, itsMdiParent, & MdiFrame::editClosed, uniquebase() ); itsEdits.push_back( me ); itsHands.push_back( me->handle() ); - me->setText( "Edit Widget" ); + me->setText( _T("Edit Widget") ); wantResized(); } @@ -342,7 +342,7 @@ ( this, itsMdiParent, & MdiFrame::treeClosed, uniquebase() ); itsTrees.push_back( me ); itsHands.push_back( me->handle() ); - me->setText( "Tree Widget" ); + me->setText( _T("Tree Widget") ); wantResized(); } @@ -354,7 +354,7 @@ me = new MdiGrid< MdiFrame, WidgetMDIParent > ( this, itsMdiParent, & MdiFrame::gridClosed, uniquebase() ); - me->setText( "Grid Widget" ); + me->setText( _T("Grid Widget") ); itsGrids.push_back( me ); itsHands.push_back( me->handle() ); wantResized(); @@ -367,7 +367,7 @@ me = new MdiDraw< MdiFrame, WidgetMDIParent > ( this, itsMdiParent, & MdiFrame::drawClosed, uniquebase() ); - me->setText( "Draw Widget" ); + me->setText( _T("Draw Widget") ); itsDraws.push_back( me ); itsHands.push_back( me->handle() ); wantResized(); @@ -380,7 +380,7 @@ me = new MdiWidg< MdiFrame, WidgetMDIParent > ( this, itsMdiParent, & MdiFrame::widgClosed, uniquebase() ); - me->setText( "Widget" ); + me->setText( _T("Widget") ); itsWidgs.push_back( me ); itsHands.push_back( me->handle() ); wantResized(); Index: MdiWidg.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/sw_mdi/MdiWidg.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- MdiWidg.h 17 Jul 2006 18:52:02 -0000 1.9 +++ MdiWidg.h 30 Nov 2006 01:03:33 -0000 1.10 @@ -93,23 +93,12 @@ void PopupMenuViaRightClick( const SmartWin::MouseEventResult & mouse ) { - SmartWin::Rectangle possize = this->getBounds(); - int x = possize.pos.x + mouse.pos.x; - int y = possize.pos.y + mouse.pos.y; - - ::TrackPopupMenu( reinterpret_cast< HMENU >( itsPopmenu->handle() ), - TPM_CENTERALIGN | TPM_VCENTERALIGN, - x, y, 0, this->handle(), 0 ); + itsPopmenu->trackPopupMenu( this ); } void PopupMenuViaButton( typename MdiWidg< parent, MdiParent >::WidgetButtonPtr btn ) { - SmartWin::Rectangle btn_possize( btn->getSize() ); - - ::TrackPopupMenu( reinterpret_cast< HMENU >( itsPopmenu->handle() ), - TPM_LEFTALIGN | TPM_TOPALIGN, - btn_possize.pos.x, btn_possize.pos.y + btn_possize.size.y, - 0, this->handle(), 0 ); + itsPopmenu->trackPopupMenu( this ); } void new_tab( typename MdiWidg< parent, MdiParent >::WidgetTabSheetPtr sheet ) @@ -172,12 +161,12 @@ { case VK_RETURN : // OnTextReady( InputBox->getText() ); - itsInputBox->setText( "" ); + itsInputBox->setText( _T("") ); return true; case VK_ESCAPE : - itsPrompt->setText( "" ); - itsInputBox->setText( "" ); + itsPrompt->setText( _T("") ); + itsInputBox->setText( _T("") ); return true; default: return false; } @@ -212,11 +201,11 @@ this->createMDIChild( seedMdiChild ); itsTabSheet = this->createTabSheet(); - itsTabSheet->addPage( "buttons", 0 ); + itsTabSheet->addPage( _T("buttons"), 0 ); itsButtonPage = this->createWidgetChildWindow(); - itsTabSheet->addPage( "combolists", 1 ); + itsTabSheet->addPage( _T("combolists"), 1 ); itsComboPage = this->createWidgetChildWindow(); - itsTabSheet->addPage( "textboxes", 2 ); + itsTabSheet->addPage( _T("textboxes"), 2 ); itsTextBoxPage = this->createWidgetChildWindow(); itsTabSheet->onSelectionChanged( & MdiWidg< parent, MdiParent >::new_tab ); itsTabSheet->setHotTrack(); @@ -245,7 +234,7 @@ // Configure the itsPrompt and input text box. itsMenuBut = this->createButton(); - itsMenuBut->setText( "menu" ); + itsMenuBut->setText( _T("menu") ); itsMenuBut->onClicked( & MdiWidg< parent, MdiParent >::PopupMenuViaButton ); typename MdiWidg< parent, MdiParent >::WidgetStatic::Seed seedStatic; Index: MdiDraw.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/sw_mdi/MdiDraw.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- MdiDraw.h 9 Jul 2006 03:42:01 -0000 1.6 +++ MdiDraw.h 30 Nov 2006 01:03:33 -0000 1.7 @@ -70,13 +70,7 @@ void PopupMenuViaRightClick( const SmartWin::MouseEventResult & mouse ) { - SmartWin::Rectangle possize = this->getBounds(); - int x = possize.pos.x + mouse.pos.x; - int y = possize.pos.y + mouse.pos.y; - - ::TrackPopupMenu( reinterpret_cast< HMENU >( itsPopmenu->handle() ), - TPM_CENTERALIGN | TPM_VCENTERALIGN, - x, y, 0, this->handle(), 0 ); + itsPopmenu->trackPopupMenu( this ); } void painting( SmartWin::Canvas & canvas ) @@ -150,7 +144,7 @@ CreateCannedEmf( filePath.c_str() ); } - void CreateCannedEmf( const char * filename ) + void CreateCannedEmf( const TCHAR * filename ) { SmartWin::Rectangle rc = sw::Rectangle( this->getClientAreaSize() ); RECT r; @@ -161,7 +155,7 @@ UpdateCanvas uc( this ); map10um( uc.getDc(), r ); - HDC enhhdc = CreateEnhMetaFile( uc.getDc(), filename, & r, "description" ); + HDC enhhdc = CreateEnhMetaFile( uc.getDc(), filename, & r, _T("description") ); paint( enhhdc, xlim, ylim ); itsHEmf = CloseEnhMetaFile( enhhdc ); } Index: MdiGrid.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/sw_mdi/MdiGrid.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- MdiGrid.h 17 Jul 2006 18:52:01 -0000 1.10 +++ MdiGrid.h 30 Nov 2006 01:03:33 -0000 1.11 @@ -11,6 +11,8 @@ #include "SmartWin.h" using namespace SmartWin; #include <string> +#include <fstream> + using namespace std; #include "io/iolib.h" #include "io/html_get.h" @@ -129,20 +131,12 @@ void PopupMenuViaRightClick( const SmartWin::MouseEventResult & mouse ) { - SmartWin::Rectangle possize = this->getBounds(); - int x = possize.pos.x + mouse.pos.x; - int y = possize.pos.y + mouse.pos.y; - - ::TrackPopupMenu( reinterpret_cast< HMENU >( itsPopmenu->handle() ), - TPM_CENTERALIGN | TPM_VCENTERALIGN, - x, y, 0, this->handle(), 0 ); + itsPopmenu->trackPopupMenu( this ); } void PopupMenuViaButton( typename MdiGrid::WidgetButtonPtr btn ) { - SmartWin::Rectangle btn_possize = btn->getBounds(); - - itsPopmenu->trackPopupMenu( this, btn_possize.pos.x, btn_possize.pos.y + btn_possize.size.y, TPM_LEFTALIGN | TPM_TOPALIGN ); + itsPopmenu->trackPopupMenu( this ); } void HtmlFilenameFromUser( SmartUtil::tstring & txtfilename ) @@ -222,8 +216,11 @@ { SmartUtil::tstring filePath; HtmlFilenameFromUser( filePath ); - +#ifdef UNICODE + wfstream file( filePath.c_str(), ios_base::in ); +#else fstream file( filePath.c_str(), ios_base::in ); +#endif if ( ! file.good() ) return; itsCurrentFilename = filePath; this->setText( itsCurrentFilename + _T( " - Grid" ) ); @@ -260,7 +257,11 @@ void FileSave( SmartUtil::tstring & filePath ) { +#ifdef UNICODE + wfstream file( filePath.c_str(), ios_base::out ); +#else fstream file( filePath.c_str(), ios_base::out ); +#endif if ( ! file.good() ) return; html_put hp( file ); @@ -349,15 +350,15 @@ void add_col_menu() { - itsPrompt->setText( "Add column named : " ); + itsPrompt->setText( _T("Add column named : ") ); itsInputMode = COL_NAME; itsInputBox->setFocus(); } - void add_col( const string & column_name ) + void add_col( const SmartUtil::tstring & column_name ) { - vector< vector< string > > data; - vector< string > row; + vector< vector< SmartUtil::tstring > > data; + vector< SmartUtil::tstring > row; int colcount = ( int ) itsGrid->getColumnCount(); int rowcount = ( int ) itsGrid->getRowCount(); @@ -369,7 +370,7 @@ { data[ r ].push_back( itsGrid->getCellText( c, r ) ); } - data[ r ].push_back( "" ); // Extra unused column + data[ r ].push_back( _T("") ); // Extra unused column } itsColnames.push_back( column_name ); colcount++; @@ -420,7 +421,7 @@ return ( true ); } - void OnTextReady( const string & newtext ) + void OnTextReady( const SmartUtil::tstring & newtext ) { switch ( itsInputMode ) { @@ -432,7 +433,7 @@ if ( itsGrid->getRowCount() > 0 ) { itsInputMode = COL_DATA; - itsPrompt->setText( "Column data: " ); + itsPrompt->setText( _T("Column data: ") ); itsRow = 0; } break; @@ -442,7 +443,7 @@ if ( itsRow >= itsGrid->getRowCount() ) { itsInputMode = NO_INPUT; - itsPrompt->setText( "" ); + itsPrompt->setText( _T("") ); itsGrid->setFocus(); } break; @@ -452,7 +453,7 @@ if ( itsCol >= itsGrid->getColumnCount() ) { itsInputMode = NO_INPUT; - itsPrompt->setText( "" ); + itsPrompt->setText( _T("") ); itsGrid->setFocus(); } else @@ -469,12 +470,12 @@ { case VK_RETURN : OnTextReady( itsInputBox->getText() ); - itsInputBox->setText( "" ); + itsInputBox->setText( _T("") ); return true; case VK_ESCAPE : - itsPrompt->setText( "" ); - itsInputBox->setText( "" ); + itsPrompt->setText( _T("") ); + itsInputBox->setText( _T("") ); itsInputMode = NO_INPUT; return true; default: return false; @@ -483,32 +484,32 @@ return true; } - void sim_entry( char txt[] ) + void sim_entry( TCHAR txt[] ) { itsInputBox->setText( txt ); KeyPressed( itsInputBox, VK_RETURN ); } void canned_table() { - add_col( string( "Year" ) ); - add_col( string( "Sales" ) ); - add_col( string( "Profits" ) ); + add_col( SmartUtil::tstring( _T("Year") ) ); + add_col( SmartUtil::tstring( _T("Sales") ) ); + add_col( SmartUtil::tstring( _T("Profits") ) ); add_row(); - sim_entry( "2000" ); sim_entry( "1020" ); sim_entry( "210" ); + sim_entry( _T("2000") ); sim_entry( _T("1020") ); sim_entry( _T("210") ); add_row(); - sim_entry( "2001" ); sim_entry( "1120" ); sim_entry( "250" ); + sim_entry( _T("2001") ); sim_entry( _T("1120") ); sim_entry( _T("250") ); add_row(); - sim_entry( "2002" ); sim_entry( "1280" ); sim_entry( "290" ); + sim_entry( _T("2002") ); sim_entry( _T("1280") ); sim_entry( _T("290") ); itsGrid->setSelectedIndex( 1 ); del_row(); add_col_menu(); - sim_entry( "Dividends" ); - sim_entry( "75" ); - sim_entry( "77" ); + sim_entry( _T("Dividends") ); + sim_entry( _T("75") ); + sim_entry( _T("77") ); } /* @@ -552,7 +553,7 @@ // The menu button itsMenuBut = this->createButton(); - itsMenuBut->setText( "menu" ); + itsMenuBut->setText( _T("menu") ); itsMenuBut->onClicked( & MdiGrid::PopupMenuViaButton ); // The prompt for element input. Index: MdiEdit.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/sw_mdi/MdiEdit.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- MdiEdit.h 17 Jul 2006 18:52:01 -0000 1.10 +++ MdiEdit.h 30 Nov 2006 01:03:33 -0000 1.11 @@ -70,14 +70,14 @@ case EMAIL : { - string emailtext = string( itsTextField->getText() ); + SmartUtil::tstring emailtext = itsTextField->getText(); itsIo.FileEmailFile( emailtext ); } break; case PRINT : { - string printtext = string( itsTextField->getText() ); + SmartUtil::tstring printtext = itsTextField->getText(); itsIo.print( printtext ); } break; @@ -136,20 +136,12 @@ void PopupMenuViaRightClick( const SmartWin::MouseEventResult & mouse ) { - SmartWin::Rectangle possize = this->getBounds(); - int x = possize.pos.x + mouse.pos.x; - int y = possize.pos.y + mouse.pos.y; - - ::TrackPopupMenu( reinterpret_cast< HMENU >( itsPopmenu->handle() ), - TPM_CENTERALIGN | TPM_VCENTERALIGN, - x, y, 0, this->handle(), 0 ); + itsPopmenu->trackPopupMenu( this ); } void PopupMenuViaButton( typename MdiEdit< parent, MdiParent >::WidgetButton * btn ) { - SmartWin::Rectangle btn_possize = btn->getBounds(); - - itsPopmenu->trackPopupMenu( this, btn_possize.pos.x, btn_possize.pos.y + btn_possize.size.y, TPM_LEFTALIGN | TPM_TOPALIGN ); + itsPopmenu->trackPopupMenu( this ); } bool KeyPressed( typename MdiEdit< parent, MdiParent >::WidgetTextBox * textField, int key ) @@ -234,18 +226,18 @@ SmartUtil::tstring title; if ( readfile ) { - title = "Read file using Ftp parameters of:"; + title = _T("Read file using Ftp parameters of:"); } else { - title = "Write file using Ftp parameters of: "; + title = _T("Write file using Ftp parameters of: "); } InDialog sd( this, title ); - sd.add( "Ftp server: ", & itsFtpServer ) - .add( "Filename: ", & itsFtpFilename ) - .add( "Username: ", & itsFtpUsername ) - .add( "Password: ", & itsFtpPassword ); + sd.add( _T("Ftp server: "), & itsFtpServer ) + .add( _T("Filename: "), & itsFtpFilename ) + .add( _T("Username: "), & itsFtpUsername ) + .add( _T("Password: "), & itsFtpPassword ); if ( IDOK == sd.createDialog() ) { @@ -253,7 +245,7 @@ if ( readfile ) { // Read a FTP file and make it the current text. - string ftptext; + SmartUtil::tstring ftptext; if ( itsIo.FtpReadFile( itsFtpServer, itsFtpFilename, itsFtpUsername, itsFtpPassword.itsString, ftptext ) ) @@ -262,13 +254,13 @@ } else { - this->createMessageBox().show( "Ftp read failed", "FtpError" ); + this->createMessageBox().show( _T("Ftp read failed"), _T("FtpError") ); } } else { // Write the current text to a FTP file. - string ftptext = string( itsTextField->getText() ); + SmartUtil::tstring ftptext = itsTextField->getText(); itsIo.FtpWriteFile( ftptext, itsFtpServer, itsFtpFilename, itsFtpUsername, itsFtpPassword.itsString ); @@ -297,8 +289,8 @@ void find_input_text() { - InDialog findDlg( this, "Find text" ); - findDlg.add( "Find what: ", & itsFindText ); + InDialog findDlg( this, _T("Find text") ); + findDlg.add( _T("Find what: "), & itsFindText ); if ( IDOK == findDlg.createDialog() ) { // Blocks until the dialog is finished. @@ -440,7 +432,7 @@ onClosing( & MdiEdit< parent, MdiParent >::closeMdi ); itsMenuBut = this->createButton(); - itsMenuBut->setText( "menu" ); + itsMenuBut->setText( _T("menu") ); itsMenuBut->onClicked( & MdiEdit< parent, MdiParent >::PopupMenuViaButton ); // See documentation for Edit Control Styles from CreateWindow(). @@ -458,9 +450,9 @@ init_font(); init_menu( base ); - itsFtpServer = "upload.comcast.net"; - itsFtpFilename = "ftp.txt"; - itsFtpUsername = "andrew7webb"; + itsFtpServer = _T("upload.comcast.net"); + itsFtpFilename = _T("ftp.txt"); + itsFtpUsername = _T("andrew7webb"); } ~MdiEdit() |
|
From: andrew7 <bd...@us...> - 2006-11-30 01:02:17
|
Update of /cvsroot/smartwin/SmartWin/tests/SmartSOAPWsdlParserTester In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv31380/tests/SmartSOAPWsdlParserTester Modified Files: Main.cpp ProxyClasses.h Log Message: Unicode support Index: ProxyClasses.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/SmartSOAPWsdlParserTester/ProxyClasses.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ProxyClasses.h 3 Sep 2006 15:25:24 -0000 1.3 +++ ProxyClasses.h 30 Nov 2006 01:02:09 -0000 1.4 @@ -469,7 +469,7 @@ node.addChild( _T( "decimalValue" ), boost::lexical_cast< SmartUtil::tstring >( decimalValue ), _T( "" ) ); if ( arrayOfContents.get() != 0 ) { - SmartXML::XmlNode & arrayOfContentsNode = node.addChild( "arrayOfContents", _T( "" ), "" ); + SmartXML::XmlNode & arrayOfContentsNode = node.addChild( _T("arrayOfContents"), _T( "" ), _T("") ); arrayOfContents->serialize( arrayOfContentsNode ); } } @@ -544,12 +544,12 @@ { if ( arrayOfreallyAdvancedStuff.get() != 0 ) { - SmartXML::XmlNode & arrayOfreallyAdvancedStuffNode = node.addChild( "arrayOfreallyAdvancedStuff", _T( "" ), "" ); + SmartXML::XmlNode & arrayOfreallyAdvancedStuffNode = node.addChild( _T("arrayOfreallyAdvancedStuff"), _T( "" ), _T("") ); arrayOfreallyAdvancedStuff->serialize( arrayOfreallyAdvancedStuffNode ); } if ( reallyAdvancedStuff.get() != 0 ) { - SmartXML::XmlNode & reallyAdvancedStuffNode = node.addChild( "reallyAdvancedStuff", _T( "" ), "" ); + SmartXML::XmlNode & reallyAdvancedStuffNode = node.addChild( _T("reallyAdvancedStuff"), _T( "" ), _T("") ); reallyAdvancedStuff->serialize( reallyAdvancedStuffNode ); } } @@ -616,7 +616,7 @@ node.addChild( _T( "dateTimeValue" ), dateTimeValue.toString(), _T( "" ) ); if ( extraValues.get() != 0 ) { - SmartXML::XmlNode & extraValuesNode = node.addChild( "extraValues", _T( "" ), "" ); + SmartXML::XmlNode & extraValuesNode = node.addChild( _T("extraValues"), _T( "" ), _T("") ); extraValues->serialize( extraValuesNode ); } } @@ -684,12 +684,12 @@ node.addChild( _T( "y" ), boost::lexical_cast< SmartUtil::tstring >( y ), _T( "" ) ); if ( tmp.get() != 0 ) { - SmartXML::XmlNode & tmpNode = node.addChild( "tmp", _T( "" ), "" ); + SmartXML::XmlNode & tmpNode = node.addChild( _T("tmp"), _T( "" ), _T("") ); tmp->serialize( tmpNode ); } if ( tmp2.get() != 0 ) { - SmartXML::XmlNode & tmp2Node = node.addChild( "tmp2", _T( "" ), "" ); + SmartXML::XmlNode & tmp2Node = node.addChild( _T("tmp2"), _T( "" ), _T("") ); tmp2->serialize( tmp2Node ); } } @@ -760,12 +760,12 @@ { if ( arrayOfreallyAdvancedStuff.get() != 0 ) { - SmartXML::XmlNode & arrayOfreallyAdvancedStuffNode = node.addChild( "arrayOfreallyAdvancedStuff", _T( "" ), "" ); + SmartXML::XmlNode & arrayOfreallyAdvancedStuffNode = node.addChild( _T("arrayOfreallyAdvancedStuff"), _T( "" ), + _T("") ); arrayOfreallyAdvancedStuff->serialize( arrayOfreallyAdvancedStuffNode ); } if ( reallyAdvancedStuff.get() != 0 ) { - SmartXML::XmlNode & reallyAdvancedStuffNode = node.addChild( "reallyAdvancedStuff", _T( "" ), "" ); + SmartXML::XmlNode & reallyAdvancedStuffNode = node.addChild( _T("reallyAdvancedStuff"), _T( "" ), _T("") ); reallyAdvancedStuff->serialize( reallyAdvancedStuffNode ); } } @@ -834,7 +834,7 @@ { if ( GetArrayOfStringsResult.get() != 0 ) { - SmartXML::XmlNode & GetArrayOfStringsResultNode = node.addChild( "GetArrayOfStringsResult", _T( "" ), "" ); + SmartXML::XmlNode & GetArrayOfStringsResultNode = node.addChild( _T("GetArrayOfStringsResult"), _T( "" ), _T("") ); GetArrayOfStringsResult->serialize( GetArrayOfStringsResultNode ); } } @@ -854,7 +854,7 @@ { if ( getStuff.get() != 0 ) { - SmartXML::XmlNode & getStuffNode = node.addChild( "getStuff", _T( "" ), "" ); + SmartXML::XmlNode & getStuffNode = node.addChild( _T("getStuff"), _T( "" ), _T("") ); getStuff->serialize( getStuffNode ); } } @@ -874,7 +874,7 @@ { if ( GetCustomObjectResult.get() != 0 ) { - SmartXML::XmlNode & GetCustomObjectResultNode = node.addChild( "GetCustomObjectResult", _T( "" ), "" ); + SmartXML::XmlNode & GetCustomObjectResultNode = node.addChild( _T("GetCustomObjectResult"), _T( "" ), _T("") ); GetCustomObjectResult->serialize( GetCustomObjectResultNode ); } } @@ -918,7 +918,7 @@ { if ( input.get() != 0 ) { - SmartXML::XmlNode & inputNode = node.addChild( "input", _T( "" ), "" ); + SmartXML::XmlNode & inputNode = node.addChild( _T("input"), _T( "" ), _T("") ); input->serialize( inputNode ); } } @@ -938,7 +938,7 @@ { if ( GetReallyAdvancedReturnValueResult.get() != 0 ) { - SmartXML::XmlNode & GetReallyAdvancedReturnValueResultNode = node.addChild( "GetReallyAdvancedReturnValueResult", _T( "" ), "" ); + SmartXML::XmlNode & GetReallyAdvancedReturnValueResultNode = node.addChild( _T("GetReallyAdvancedReturnValueResult"), _T( "" ), _T("") ); GetReallyAdvancedReturnValueResult->serialize( GetReallyAdvancedReturnValueResultNode ); } } Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/SmartSOAPWsdlParserTester/Main.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Main.cpp 5 May 2006 17:21:44 -0000 1.2 +++ Main.cpp 30 Nov 2006 01:02:09 -0000 1.3 @@ -20,14 +20,14 @@ hello.number = 5; cout << "Calling hello world" << endl; HelloWorldResponseInput helloResponse = proxy.HelloWorld( hello ); - cout << * helloResponse.HelloWorldResult << endl << endl; + cout << (* helloResponse.HelloWorldResult).c_str() << endl << endl; // Calling GetDateTimeNow GetDateTimeNowInput getDate; getDate.offset = 1; cout << "Calling GetDateTimeNow" << endl; GetDateTimeNowResponseInput getDateResponse = proxy.GetDateTimeNow( getDate ); - cout << getDateResponse.GetDateTimeNowResult.toString() << endl << endl; + cout << getDateResponse.GetDateTimeNowResult.toString().c_str() << endl << endl; // Calling GetCustomObject GetCustomObjectInput getCustom; @@ -37,12 +37,12 @@ GetCustomObjectResponseInput getCustomResponse = proxy.GetCustomObject( getCustom ); cout << getCustomResponse.GetCustomObjectResult->decimalValue << endl; cout << getCustomResponse.GetCustomObjectResult->intValue << endl; - cout << * getCustomResponse.GetCustomObjectResult->stringValue << endl; + cout << (* getCustomResponse.GetCustomObjectResult->stringValue).c_str() << endl; for ( int x = 0; x != getCustomResponse.GetCustomObjectResult->arrayOfContents->TestReturnStuffContents.size(); ++x ) { - cout << x << " " << * getCustomResponse.GetCustomObjectResult->arrayOfContents->TestReturnStuffContents[x]->stringValue << endl; + cout << x << " " << (* getCustomResponse.GetCustomObjectResult->arrayOfContents->TestReturnStuffContents[x]->stringValue).c_str() << endl; } cout << endl; @@ -56,7 +56,7 @@ x != getArrayResponse.GetArrayOfStringsResult->string.size(); ++x ) { - cout << x << " " << * getArrayResponse.GetArrayOfStringsResult->string[x] << endl; + cout << x << " " << (* getArrayResponse.GetArrayOfStringsResult->string[x]).c_str() << endl; } cout << endl; @@ -89,13 +89,13 @@ { if ( resp.GetReallyAdvancedReturnValueResult->reallyAdvancedStuff.get() ) { - cout << resp.GetReallyAdvancedReturnValueResult->reallyAdvancedStuff->dateTimeValue.toString() << endl; + cout << resp.GetReallyAdvancedReturnValueResult->reallyAdvancedStuff->dateTimeValue.toString().c_str() << endl; cout << resp.GetReallyAdvancedReturnValueResult->reallyAdvancedStuff->decimalValue << endl; cout << resp.GetReallyAdvancedReturnValueResult->reallyAdvancedStuff->doubleValue << endl; cout << resp.GetReallyAdvancedReturnValueResult->reallyAdvancedStuff->floatValue << endl; cout << resp.GetReallyAdvancedReturnValueResult->reallyAdvancedStuff->intValue << endl; if ( resp.GetReallyAdvancedReturnValueResult->reallyAdvancedStuff->stringValue.get() ) - cout << * resp.GetReallyAdvancedReturnValueResult->reallyAdvancedStuff->stringValue << endl; + cout << (* resp.GetReallyAdvancedReturnValueResult->reallyAdvancedStuff->stringValue).c_str() << endl; else cout << "resp.GetReallyAdvancedReturnValueResult->reallyAdvancedStuff->stringValue is NOT there" << endl; } @@ -106,13 +106,13 @@ { if ( resp.GetReallyAdvancedReturnValueResult->arrayOfreallyAdvancedStuff->ReallyAdvancedStuff[x].get() ) { - cout << resp.GetReallyAdvancedReturnValueResult->arrayOfreallyAdvancedStuff->ReallyAdvancedStuff[x]->dateTimeValue.toString() << endl; + cout << resp.GetReallyAdvancedReturnValueResult->arrayOfreallyAdvancedStuff->ReallyAdvancedStuff[x]->dateTimeValue.toString().c_str() << endl; cout << resp.GetReallyAdvancedReturnValueResult->arrayOfreallyAdvancedStuff->ReallyAdvancedStuff[x]->decimalValue << endl; cout << resp.GetReallyAdvancedReturnValueResult->arrayOfreallyAdvancedStuff->ReallyAdvancedStuff[x]->doubleValue << endl; cout << resp.GetReallyAdvancedReturnValueResult->arrayOfreallyAdvancedStuff->ReallyAdvancedStuff[x]->floatValue << endl; cout << resp.GetReallyAdvancedReturnValueResult->arrayOfreallyAdvancedStuff->ReallyAdvancedStuff[x]->intValue << endl; if ( resp.GetReallyAdvancedReturnValueResult->arrayOfreallyAdvancedStuff->ReallyAdvancedStuff[x]->stringValue.get() ) - cout << * resp.GetReallyAdvancedReturnValueResult->arrayOfreallyAdvancedStuff->ReallyAdvancedStuff[x]->stringValue << endl; + cout << (* resp.GetReallyAdvancedReturnValueResult->arrayOfreallyAdvancedStuff->ReallyAdvancedStuff[x]->stringValue).c_str() << endl; cout << resp.GetReallyAdvancedReturnValueResult->arrayOfreallyAdvancedStuff->ReallyAdvancedStuff[x]->doubleValue << endl; if ( resp.GetReallyAdvancedReturnValueResult->arrayOfreallyAdvancedStuff->ReallyAdvancedStuff[x]->extraValues.get() ) @@ -148,7 +148,7 @@ } catch ( std::exception & err ) { - MessageBox( 0, err.what(), "", MB_OK ); + cout << std::endl << "EXCEPTION: " << err.what() << std::endl; } int x; |
|
From: andrew7 <bd...@us...> - 2006-11-30 01:01:20
|
Update of /cvsroot/smartwin/SmartWin/tests/OpenGLSample1 In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv30879/tests/OpenGLSample1 Modified Files: Main.cpp Log Message: Add arrows to move around. (Just a bit of fun) Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/OpenGLSample1/Main.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Main.cpp 5 May 2006 17:21:44 -0000 1.4 +++ Main.cpp 30 Nov 2006 01:01:17 -0000 1.5 @@ -21,8 +21,21 @@ PAINTSTRUCT ps; HDC hDC; HWND hWnd; + float xoff, yoff, zoff; public: + + OpenGLWin() + { + homePosition(); + } + + void homePosition() + { + xoff = 0.0f; yoff = 0.0f; zoff = -5.0f; + } + + void init() { Seed cs; @@ -38,6 +51,9 @@ onPainting( & OpenGLWin::painting ); onClosing( & OpenGLWin::willClose ); setBounds( 100, 100, 700, 600 ); + + onKeyPressed( & OpenGLWin::KeyPressed ); + updateWidget(); } @@ -102,7 +118,7 @@ 30.0, // Field-of-view angle gldAspect, // Aspect ratio of view volume 1.0, // Distance to near clipping plane - 10.0 ); // Distance to far clipping plane + 100.0 ); // Distance to far clipping plane glViewport( 0, 0, glnWidth, glnHeight ); wglMakeCurrent( NULL, NULL ); ReleaseDC( hWnd, hDC ); @@ -179,7 +195,7 @@ glLoadIdentity(); // move the viewpoint out to where we can see everything - glTranslatef( 0.0f, 0.0f, - 5.0f ); + glTranslatef( xoff, yoff, zoff ); // 0, 0, -5.0 // Draw a large triangle out of three smaller triangles // sharing common vertex colors @@ -216,6 +232,49 @@ // Flush the drawing pipeline since it's single buffered glFlush (); } + + // IN: virtkey is a virtual key, which includes the special keys. + bool KeyPressed( int virtkey ) + { + float adj = 0.2f; + switch ( virtkey ) + { + case VK_SHIFT : return false; + + case VK_HOME : + case VK_ESCAPE : homePosition(); + break; + + case VK_LEFT : xoff -= adj; break; // Arrows + case VK_UP : yoff += adj; break; + case VK_RIGHT : xoff += adj; break; + case VK_DOWN : yoff -= adj; break; + + default: + bool control = getControlPressed(); + char key = virtualKeyToChar( virtkey ); + if ( key != 0 ) + { + if ( '+' == key ) { + zoff += 1.0f; + break; + } + if ( '-' == key ) { + zoff -= 1.0f; + break; + } + } + else + { + return false; + } + } + updateWidget(); + return true; + } + + + }; int SmartWinMain( Application & app ) |
|
From: andrew7 <bd...@us...> - 2006-11-30 00:59:48
|
Update of /cvsroot/smartwin/SmartWin/tests/iolib In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv29878/tests/iolib Modified Files: iodemo.cpp Log Message: Unicode and conditional compile for various options. (Helps debugging) Index: iodemo.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/iolib/iodemo.cpp,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- iodemo.cpp 9 Oct 2006 01:15:15 -0000 1.23 +++ iodemo.cpp 30 Nov 2006 00:59:44 -0000 1.24 @@ -5,6 +5,14 @@ * The license to the library can be found at http://smartwinlib.org * License for library is Open Source and BSD */ + +#define TRY_BOX_STREAM 1 +#define TRY_IN_DIALOG 1 +#define TRY_HTTP 1 +#define TRY_HTML_IO 1 + + + // iolib.cpp // Show the SmartWin++ library features // that are contained in the io subdirectory of SmartWin. @@ -12,11 +20,21 @@ // #include "SmartSOAP.h" // Fundamental include #include "SmartWin.h" // Fundamental include -#include "io/textbox_stream.h" // iostream for textboxes; an easy way to port command line programs. #include "io/iolib.h" // Print, ftp, email, and transfer strings and files. + +#ifdef TRY_HTML_IO #include "io/html_put.h" // Serialize widgets into a html file. #include "io/html_get.h" // Convert a html file subset back into widget contents. +#endif + +#ifdef TRY_BOX_STREAM +#include "io/textbox_stream.h" // iostream for textboxes; an easy way to port command line programs. +#endif + +#ifdef TRY_IN_DIALOG #include "io/InDialog.h" // Input some integers, strings, and booleans. +#endif + // The file state.html contains the starting state of the program and is worth a look. @@ -44,6 +62,7 @@ IolibClass() {} +#ifdef TRY_HTML_IO // Ask for a html filename, and then save the various widgets to that file. void saveState( WidgetMenuPtr menu, unsigned item ) { @@ -58,7 +77,7 @@ // Save the various widgets to "filePath". void FileSave( SmartUtil::tstring & filePath ) { - fstream file( filePath.c_str(), ios_base::out ); + SmartUtil::tfstream file( filePath.c_str(), ios_base::out ); // if ( ! file.good() ) return; @@ -98,7 +117,7 @@ // Restore the state of the various widgets from "filePath". void loadState( SmartUtil::tstring filePath ) { - fstream file( filePath.c_str(), ios_base::in ); + SmartUtil::tfstream file( filePath.c_str(), ios_base::in ); if ( ! file.good() ) return; @@ -160,7 +179,9 @@ createMessageBox().show( _T( "itsTree" ), errTitle ); return; } } +#endif +#ifdef TRY_BOX_STREAM // The iostream itsTextboxStream is used for command line (c:/> never dies !) // like input and output inside a WidgetTextBox. // @@ -183,34 +204,36 @@ TextBox_iostream<IolibClass> itsTextboxStream( itsHTTPGet ); itsTextboxStream << "Enter text here = "; // Arrives in WidgetTextBox itsHTTPGet - SmartUtil::tstring textin; + string textin; itsTextboxStream >> textin; // gets text from the user's keyboard. itsTextboxStream << _T( "You entered " ) << textin << std::endl; // How to use iostreams to read text from the WidgetTextBox itsHTTPGet - stringstream ss( itsHTTPGet->getText() ); - string first_token; + SmartUtil::tstringstream ss( itsHTTPGet->getText() ); + SmartUtil::tstring first_token; ss >> first_token; // Will get "Enter". } +#endif +#ifdef TRY_IN_DIALOG void menuInDialog( WidgetMenuPtr menu, unsigned item ) { int int1 = - 8, int2 = 0, int3 = 0; BoundedLong bl( 1994, 1900, 2050 ); float float1 = ( float ) 98.6; double doub1 = 876.543; - SmartUtil::tstring str1 = "hello"; + SmartUtil::tstring str1 = _T("hello"); PasswordString pass1; // or ( 8, "" ) bool bool1 = true; - ChoiceString cs( "scissors|rock|paper", 2 ); + ChoiceString cs( _T("scissors|rock|paper"), 2 ); - FileString loadFs( "C:\\path\\gumbo.txt" ); - loadFs.addFilter( "JPG files", "*.jpg" ); - FileString saveFs( "", false ); - saveFs.addFilter( "JPG files", "*.jpg" ); - DirString ds( "c:\\", false ); - // DirString ds( "\\", true ); + FileString loadFs( _T("C:\\path\\gumbo.txt") ); + loadFs.addFilter( _T("JPG files"), _T("*.jpg") ); + FileString saveFs( _T(""), false ); + saveFs.addFilter( _T("JPG files"), _T("*.jpg") ); + DirString ds( _T("c:\\"), false ); + // DirString ds( _T("\\"), true ); @@ -221,7 +244,7 @@ bool c; - InDialog myInDialog( this, "First InDialog Attempt !" ); + InDialog myInDialog( this, _T("First InDialog Attempt !") ); if ( IDCANCEL == myInDialog .add( _T( "Input file ..." ), & loadFs ) .add( _T( "Output file ..." ), & saveFs ) @@ -238,11 +261,11 @@ .add( _T( "Background color ..." ), & background ) .createDialog() ) return; - InDialog myInDialog2( this, "A really long title will make the dialog adjust to its width." ); - myInDialog2.add( "Pandas:", & int2 ).createDialog(); + InDialog myInDialog2( this, _T("A really long title will make the dialog adjust to its width.") ); + myInDialog2.add( _T("Pandas:"), & int2 ).createDialog(); - InDialog myInDialog3( this, "Short Title." ); - myInDialog3.add( "Pandas:", & int3 ).createDialog(); + InDialog myInDialog3( this, _T("Short Title.") ); + myInDialog3.add( _T("Pandas:"), & int3 ).createDialog(); // Ask for a font for the next dialog. WidgetChooseFont widget = createChooseFont(); @@ -251,26 +274,29 @@ { FontPtr choosenFont( font ); - InDialog myInDialog5( this, "InDialog with variable fonts !", choosenFont ); + InDialog myInDialog5( this, _T("InDialog with variable fonts !"), choosenFont ); - char * srpArray[] = - { "scissors", "rock", "paper" + TCHAR * srpArray[] = + { _T("scissors"), _T("rock"), _T("paper") }; - vector< SmartUtil::tstring > srp( srpArray, & srpArray[ sizeof( srpArray ) / sizeof( char * ) ] ); + vector< SmartUtil::tstring > srp( srpArray, & srpArray[ sizeof( srpArray ) / sizeof( TCHAR * ) ] ); ChoiceString csVector( srp, 2 ); myInDialog5 - .add( "Hippos:", & int1 ) - .add( "Ducks:", & int2 ) - .add( "Otters:", & int3 ) - .add( "Say:", & str1 ) - .add( "Password:", & pass1 ) - .add( "Throw:", & csVector ) - .add( "Average weight:", & doub1 ) - .add( "Fries ?", & bool1 ) + .add( _T("Hippos:"), & int1 ) + .add( _T("Ducks:"), & int2 ) + .add( _T("Otters:"), & int3 ) + .add( _T("Say:"), & str1 ) + .add( _T("Password:"), & pass1 ) + .add( _T("Throw:"), & csVector ) + .add( _T("Average weight:"), & doub1 ) + .add( _T("Fries ?"), & bool1 ) .createDialog(); } + + } +#endif void checkclicked( WidgetCheckBoxPtr chk ) { @@ -282,11 +308,12 @@ void menuClearText( WidgetMenuPtr menu, unsigned item ) { - itsHTTPGet->setText( "" ); - itsHTTPResp->setText( "" ); - itsHtmlFile->setText( "" ); + itsHTTPGet->setText( _T("") ); + itsHTTPResp->setText( _T("") ); + itsHtmlFile->setText( _T("") ); } +#ifdef TRY_HTTP // This is a demonstration of the iostream for simple TCP/IP communication. // The example uses the HTTP protocol to ask a web server for a file. // @@ -296,65 +323,71 @@ // void menuTcpStream( WidgetMenuPtr menu, unsigned item ) { - string host = itsHostname->getSelectedValue(); - SmartNetwork::TcpTextStream tcp( host.c_str(), "80", 30 ); // Port 80 for a HHTP web server. - itsHTTPGet->setText( host + _T( " connected." ) ); - stringstream ss; - ss << "GET / HTTP/1.1\r\n" - << "Accept: */*\r\n" - << "Host: " << host << "\r\n" - << "Connection: Keep-Alive\r\n" - << "\r\n"; + SmartUtil::tstring thost = itsHostname->getSelectedValue(); + string host= SmartUtil::UnicodeConverter<TCHAR,char>::doConvert( thost, SmartUtil::ConversionCodepage::UTF8 ); + + SmartNetwork::TcpTextStream tcp( host, "80", 30 ); // Port 80 for a HHTP web server. + itsHTTPGet->setText( thost + _T( " connected." ) ); + + SmartUtil::tstringstream ss; + ss << _T("GET / HTTP/1.1\r\n") + << _T("Accept: */*\r\n") + << _T("Host: " << thost << "\r\n") + << _T("Connection: Keep-Alive\r\n") + << _T("\r\n"); tcp << ss.str(); itsHTTPGet->setText( ss.str() ); - string headers, content; + SmartUtil::tstring headers, content; fetchHeadersContent( tcp, headers, content ); itsHTTPResp->setText( headers ); // The response from the webserver itsHtmlFile->setText( content ); // The file returned by the webserver. + } void menuTcpStream2( WidgetMenuPtr menu, unsigned item ) { - string host = itsHostname->getSelectedValue(); - SmartNetwork::TcpTextStream tcp( host.c_str(), "80", 30 ); // Port 80 for a HHTP web server. + SmartUtil::tstring thost = itsHostname->getSelectedValue(); + string host= SmartUtil::UnicodeConverter<TCHAR,char>::doConvert( thost, SmartUtil::ConversionCodepage::UTF8 ); + + SmartNetwork::TcpTextStream tcp( host, "80", 30 ); // Port 80 for a HHTP web server. tcp << itsHTTPGet->getText(); - string headers, content; + SmartUtil::tstring headers, content; fetchHeadersContent( tcp, headers, content ); itsHTTPResp->setText( headers ); // The response from the webserver itsHtmlFile->setText( content ); // The file returned by the webserver. } - void fetchHeaders( SmartNetwork::TcpTextStream & tcp, string & headers ) + void fetchHeaders( SmartNetwork::TcpTextStream & tcp, SmartUtil::tstring & headers ) { const int bsize = 99999; - char buff[ bsize ]; + TCHAR buff[ bsize ]; while ( tcp.getline( buff, bsize ) ) { int n = tcp.gcount(); if ( n < 3 ) break; headers += buff; - headers += "\n"; + headers += _T("\n"); } } // Rather uninteresting code unless you are interested in HTTP - void fetchHeadersContent( SmartNetwork::TcpTextStream & tcp, string & headers, string & content ) + void fetchHeadersContent( SmartNetwork::TcpTextStream & tcp, SmartUtil::tstring & headers, SmartUtil::tstring & content ) { long length = 0; bool length_known = false; - stringstream ss; - string name; + SmartUtil::tstringstream ss; + SmartUtil::tstring name; const int bsize = 65536; - char buff[ bsize ]; + TCHAR buff[ bsize ]; while ( tcp.getline( buff, bsize ) ) { headers += buff; - headers += "\n"; + headers += _T("\n"); ss.str( buff ); if ( ss.str().size() < 3 ) @@ -362,7 +395,7 @@ content.clear(); const int chunksize = 4096; - char buff[ chunksize ]; + TCHAR buff[ chunksize ]; streamsize chunk = chunksize; if ( length_known ) { @@ -379,20 +412,21 @@ while ( tcp.getline( buff, bsize ) ) { content.append( buff ); - content.append( "\r\n" ); + content.append( _T("\r\n") ); } } return ; } ss >> name; - if ( name == "Content-Length:" ) + if ( name == _T("Content-Length:") ) { ss >> length; length_known = true; } } } +#endif void menuCloseEvent( WidgetMenuPtr menu, unsigned item ) { @@ -460,24 +494,36 @@ itsMainMenu = createMenu(); WidgetMenuPtr file = itsMainMenu->appendPopup( _T( "&File" ) ); int m = 1; +#ifdef TRY_BOX_STREAM file->appendItem( m++, _T( "iostream in TextBox" ), &IolibClass::menuIostreamTextBox ); file->appendSeparatorItem(); +#endif + +#ifdef TRY_IN_DIALOG file->appendItem( m++, _T( "Try InDialog" ), &IolibClass::menuInDialog ); file->appendSeparatorItem(); +#endif + +#ifdef TRY_HTTP file->appendItem( m++, _T( "Send HTTP GET using TCP iostream" ), &IolibClass::menuTcpStream ); file->appendItem( m++, _T( "Send the stuff in the left textbox to the host in the dropdown" ), &IolibClass::menuTcpStream2 ); file->appendSeparatorItem(); +#endif + +#ifdef TRY_HTML_IO file->appendItem( m++, _T( "&Copy text selection" ), &IolibClass::copyTextToClipboard ); file->appendItem( m++, _T( "&Clear text" ), &IolibClass::menuClearText ); file->appendSeparatorItem(); file->appendItem( m++, _T( "&Save state" ), &IolibClass::saveState ); file->appendItem( m++, _T( "&Load state" ), &IolibClass::loadState ); file->appendSeparatorItem(); +#endif file->appendItem( m++, _T( "&Exit" ), &IolibClass::menuCloseEvent ); itsMainMenu->attach( this ); // Attaching main menu to main window - loadState( "state.html" ); - +#ifdef TRY_HTML_IO + loadState( _T("state.html") ); +#endif itsHostname->addValue(_T("localhost")); layout(); // for the first time, and only AFTER all Widgets are created. |
|
From: andrew7 <bd...@us...> - 2006-11-30 00:57:16
|
Update of /cvsroot/smartwin/SmartWin/tests/Canvas In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv28741/tests/Canvas Modified Files: canvas_all.cpp Log Message: Unicode and dev-cpp compiler adjust Index: canvas_all.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/Canvas/canvas_all.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- canvas_all.cpp 19 Nov 2006 17:57:28 -0000 1.10 +++ canvas_all.cpp 30 Nov 2006 00:57:12 -0000 1.11 @@ -269,8 +269,8 @@ { std::basic_stringstream< TCHAR > ss; switch( mouse.ButtonPressed ) { - case mouse.LEFT: ss << "Left "; break; - case mouse.RIGHT: ss << "Right "; break; + case MouseEventResult::LEFT: ss << "Left "; break; + case MouseEventResult::RIGHT: ss << "Right "; break; } ss << _T( "Double click at " ) << mouse.pos.x << _T( "," ) << mouse.pos.y; if ( mouse.isShiftPressed ) ss << _T( " shifted" ); @@ -339,7 +339,7 @@ default: bool control = getControlPressed(); - char key = virtualKeyToChar( virtkey ); + TCHAR key = virtualKeyToChar( virtkey ); if ( key != 0 ) { msg.append( _T( "Key '" ) ); |
|
From: andrew7 <bd...@us...> - 2006-11-30 00:54:57
|
Update of /cvsroot/smartwin/SmartWin/tests/Anchors In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv27342/tests/Anchors Added Files: Anchors.dev Anchors.vcproj SWMainForm.cpp SWMainForm.h icon.ico resource.rc Log Message: First version of Anchors, a new way to layout SmartWin Widgets --- NEW FILE: Anchors.vcproj --- <?xml version="1.0" encoding="Windows-1252"?> <VisualStudioProject ProjectType="Visual C++" Version="8.00" Name="Anchors" ProjectGUID="{05949643-0000-0000-0000-000000000000}" Keyword="Win32Proj" > <Platforms> <Platform Name="Win32" /> </Platforms> <ToolFiles> </ToolFiles> <Configurations> <Configuration Name="Debug|Win32" OutputDirectory="Debug" IntermediateDirectory="Debug" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" CharacterSet="2" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" TreatWChar_tAsBuiltInType="true" RuntimeTypeInfo="true" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" DebugInformationFormat="4" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalDependencies="" OutputFile="$(OutDir)/Anchor.exe" LinkIncremental="2" GenerateDebugInformation="true" ProgramDatabaseFile="$(OutDir)/Anchor.pdb" SubSystem="2" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> <Configuration Name="Release|Win32" OutputDirectory="Release" IntermediateDirectory="Release" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" CharacterSet="2" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS" RuntimeLibrary="0" TreatWChar_tAsBuiltInType="true" RuntimeTypeInfo="true" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalDependencies="" OutputFile="$(OutDir)/Anchor.exe" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> <Configuration Name="DebugUnicode|Win32" OutputDirectory="$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" CharacterSet="1" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" Optimization="0" PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;UNICODE;_UNICODE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="1" TreatWChar_tAsBuiltInType="true" RuntimeTypeInfo="true" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" DebugInformationFormat="4" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalDependencies="" OutputFile="$(OutDir)/Anchor.exe" LinkIncremental="2" GenerateDebugInformation="true" ProgramDatabaseFile="$(OutDir)/Anchor.pdb" SubSystem="2" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> <Configuration Name="ReleaseUnicode|Win32" OutputDirectory="$(ConfigurationName)" IntermediateDirectory="$(ConfigurationName)" ConfigurationType="1" InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops" CharacterSet="1" > <Tool Name="VCPreBuildEventTool" /> <Tool Name="VCCustomBuildTool" /> <Tool Name="VCXMLDataGeneratorTool" /> <Tool Name="VCWebServiceProxyGeneratorTool" /> <Tool Name="VCMIDLTool" /> <Tool Name="VCCLCompilerTool" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;UNICODE;_UNICODE" RuntimeLibrary="0" TreatWChar_tAsBuiltInType="true" RuntimeTypeInfo="true" UsePrecompiledHeader="0" WarningLevel="3" Detect64BitPortabilityProblems="true" DebugInformationFormat="3" /> <Tool Name="VCManagedResourceCompilerTool" /> <Tool Name="VCResourceCompilerTool" /> <Tool Name="VCPreLinkEventTool" /> <Tool Name="VCLinkerTool" AdditionalDependencies="" OutputFile="$(OutDir)/Anchor.exe" LinkIncremental="1" GenerateDebugInformation="true" SubSystem="2" OptimizeReferences="2" EnableCOMDATFolding="2" TargetMachine="1" /> <Tool Name="VCALinkTool" /> <Tool Name="VCManifestTool" /> <Tool Name="VCXDCMakeTool" /> <Tool Name="VCBscMakeTool" /> <Tool Name="VCFxCopTool" /> <Tool Name="VCAppVerifierTool" /> <Tool Name="VCWebDeploymentTool" /> <Tool Name="VCPostBuildEventTool" /> </Configuration> </Configurations> <References> </References> <Files> <Filter Name="Source Files" Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2132D752A2FF}" > <File RelativePath=".\SWMainForm.cpp" > </File> </Filter> <Filter Name="Header Files" Filter="h;hpp;hxx;hm;inl;inc;xsd" UniqueIdentifier="{93995380-89BD-4b04-88EB-123BE52EBFB}" > <File RelativePath=".\SWMainForm.h" > </File> </Filter> <Filter Name="Resource Files" Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-13FB121AAD01}" > <File RelativePath=".\icon.ico" > </File> <File RelativePath=".\resource.rc" > </File> </Filter> </Files> <Globals> </Globals> </VisualStudioProject> --- NEW FILE: SWMainForm.h --- //SmartWin Form Autogenerated Header File //User can't edit this file directly #ifndef __SWMAINFORM_H__ #define __SWMAINFORM_H__ //region Definitions #ifndef SALLYIDE_VERSION #define SALLYIDE_VERSION 500 #endif #ifndef SALLYIDE_SW_VERSION #define SALLYIDE_SW_VERSION 200 #endif #ifdef UNICODE #ifndef _UNICODE #define _UNICODE #endif #endif //endregion #include <SmartWin.h> //ASW #include <SwVersionAdjustments.h> #include <vector> // User Editable Block: Extra Include Code (private IDE comment) // #include "smartwin/anchors.h" // End User Editable Block: Extra Include Code (private IDE comment) //region class SWMainForm : public sw::WidgetFactory<sw::WidgetWindow,SWMainForm> class SWMainForm : public sw::WidgetFactory<sw::WidgetWindow,SWMainForm> { private: WidgetDataGridPtr widgetDataGrid1; WidgetGroupBoxPtr widgetGroupBox1; WidgetComboBoxPtr widgetComboBox1; WidgetButtonPtr widgetButton1; // User Editable Block: Extra Variables Code (private IDE comment) AnchorManager manager; // End User Editable Block: Extra Variables Code (private IDE comment) public: //region void initAndCreate void initAndCreate() { WidgetWindow::Seed cs; cs.style=WS_VISIBLE | WS_THICKFRAME | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_OVERLAPPED; cs.exStyle=0; sw::Point desktopSizePrivate=getDesktopSize(); sw::Point initialSizePrivate(480,432); sw::Point initialLocationPrivate((desktopSizePrivate.x-initialSizePrivate.x)/2,(desktopSizePrivate.y-initialSizePrivate.y)/2); if (initialLocationPrivate.x<0) initialLocationPrivate.x=0; if (initialLocationPrivate.y<0) initialLocationPrivate.y=0; cs.location=sw::Rectangle(initialLocationPrivate,sw::Point(480,432)); cs.background=CreateSolidBrush(::GetSysColor(COLOR_3DFACE)); cs.caption=_T("SmartWin Main Window"); cs.location.size.x=480; cs.location.size.y=432; this->createWindow(cs); this->setIconSmall(100); this->setIconLarge(100); this->setFocus(); this->setBounds(initialLocationPrivate,initialSizePrivate); this->setText(_T("SmartWin Main Window")); this->onSized(& SWMainForm::OnSWMainFormSized); sw::Message SWMainFormMinMaxMessage(WM_GETMINMAXINFO); this->onRaw(&SWMainForm::SWMainFormMinMaxEventIDEPrivate,SWMainFormMinMaxMessage); this->onEnabled(&SWMainForm::SWMainFormEnabledIDEPrivate); this->setVisible(true); // // widgetGroupBox1 // widgetGroupBox1=createGroupBox(); sw::FontPtr FontwidgetGroupBox1=sw::createFont( _T("Tahoma"), 14, 0, 400, ANSI_CHARSET, FALSE, FALSE, FALSE, 0, OUT_DEFAULT_PRECIS ); widgetGroupBox1->setFont(FontwidgetGroupBox1); widgetGroupBox1->setBounds(sw::Point(8,8),sw::Point(448,352)); widgetGroupBox1->setText(_T(" as???????")); widgetGroupBox1->onEnabled(&SWMainForm::widgetGroupBox1EnabledIDEPrivate); // // widgetDataGrid1 // WidgetDataGrid::Seed widgetDataGrid1Seed; widgetDataGrid1Seed.exStyle=WS_EX_CLIENTEDGE; widgetDataGrid1Seed.style=WS_VISIBLE | WS_CHILD | LVS_AUTOARRANGE | LVS_REPORT; widgetDataGrid1=createDataGrid(widgetDataGrid1Seed); widgetDataGrid1->setFont(FontwidgetGroupBox1); widgetDataGrid1->setBounds(sw::Point(24,56),sw::Point(416,288)); widgetDataGrid1->setCheckBoxes(true); widgetDataGrid1->setFullRowSelect(true); widgetDataGrid1->setGridLines(true); widgetDataGrid1->setReadOnly(true); widgetDataGrid1->setSingleRowSelection(false); widgetDataGrid1->setItemCount(3); std::vector <SmartUtil::tstring> widgetDataGrid1ColumnVector; widgetDataGrid1ColumnVector.push_back(_T("ColumnHeader")); widgetDataGrid1ColumnVector.push_back(_T("ColumnHeader")); widgetDataGrid1ColumnVector.push_back(_T("ColumnHeader")); widgetDataGrid1->createColumns(widgetDataGrid1ColumnVector); widgetDataGrid1->setColumnWidth(0,104); widgetDataGrid1->setColumnWidth(1,97); widgetDataGrid1->setColumnWidth(2,60); widgetDataGrid1->insertRow(-1,-1); widgetDataGrid1->setRowChecked(0,true); widgetDataGrid1->setCellText(0,0,_T("tyui yu ")); widgetDataGrid1->setCellText(1,0,_T("")); widgetDataGrid1->setCellText(2,0,_T("")); widgetDataGrid1->insertRow(-1,-1); widgetDataGrid1->setCellText(0,1,_T("")); widgetDataGrid1->insertRow(-1,-1); widgetDataGrid1->setCellText(0,2,_T("")); widgetDataGrid1->setView(LVS_REPORT); // // widgetComboBox1 // WidgetComboBox::Seed widgetComboBox1Seed; widgetComboBox1Seed.style=WS_VISIBLE | WS_CHILD | CBS_AUTOHSCROLL | WS_VSCROLL | CBS_HASSTRINGS | CBS_DROPDOWNLIST; widgetComboBox1=createComboBox(widgetComboBox1Seed); widgetComboBox1->addValue(_T("rt6 u")); widgetComboBox1->addValue(_T(".56u ")); widgetComboBox1->addValue(_T("56u ")); widgetComboBox1->addValue(_T("t6uy 5t6u5")); widgetComboBox1->addValue(_T("y6u t")); widgetComboBox1->addValue(_T("6u 5r6")); widgetComboBox1->addValue(_T("rt ")); widgetComboBox1->addValue(_T("y ")); widgetComboBox1->setSelectedIndex(3); widgetComboBox1->setFont(FontwidgetGroupBox1); widgetComboBox1->setBounds(sw::Point(24,32),sw::Point(256,168)); // // widgetButton1 // widgetButton1=createButton(); widgetButton1->setFont(FontwidgetGroupBox1); widgetButton1->setBounds(sw::Point(384,368),sw::Point(75,25)); widgetButton1->setText(_T("Button1")); SWMainForm::PostConstructor(); } //endregion private: //region Private IDE Generated Events HRESULT SWMainFormMinMaxEventIDEPrivate(LPARAM lParam,WPARAM wParam) { MINMAXINFO* mmi=(MINMAXINFO*)lParam; if (mmi) { sw::Point deskSize=getDesktopSize(); int xMax=(2048<=deskSize.x?2048:deskSize.x); int yMax=(1536<=deskSize.y?1536:deskSize.y); mmi->ptMaxSize.x=xMax; mmi->ptMaxSize.y=yMax; mmi->ptMaxTrackSize.x=xMax; mmi->ptMaxTrackSize.y=yMax; mmi->ptMaxPosition.x=0; mmi->ptMaxPosition.y=0; mmi->ptMinTrackSize.x=200; mmi->ptMinTrackSize.y=150; return (HRESULT) 0; } return (HRESULT) 1; } void SWMainFormEnabledIDEPrivate(bool flag) { //region SubControl Enabled AutoGenerated Code widgetButton1->setEnabled(flag); widgetGroupBox1->setEnabled(flag); //endregion } void widgetGroupBox1EnabledIDEPrivate(WidgetGroupBoxPtr widgetGroupBox,bool flag) { //region SubControl Enabled AutoGenerated Code widgetDataGrid1->setEnabled(flag); widgetComboBox1->setEnabled(flag); //endregion widgetGroupBox->updateWidget(); } //endregion //region Events void SWMainForm::PostConstructor(); void SWMainForm::OnSWMainFormSized(const sw::WidgetSizedEventResult& e); //endregion // User Editable Block: Extra Private Methods Code (private IDE comment) // End User Editable Block: Extra Private Methods Code (private IDE comment) public: // User Editable Block: Extra Public Methods Code (private IDE comment) // End User Editable Block: Extra Public Methods Code (private IDE comment) }; //endregion #endif #ifdef _NEVER_DEFINE_ME_ //region IDE Generated Region (Do not touch) //region Form Loading /* <Components version="1.0"><Widget_Controls.WidgetWindow><Name value="SWMainForm" /><ExtraVariableCode value="AnchorManager manager;" /><IsMainForm value="True" /><AutoResize value="False" /><MinimumSize value="{Width=200, Height=150}" /><ClientSize value="{Width=472, Height=405}" /><Text value="SmartWin Main Window" /><IconLargeID value="100" /><IconSmallID value="100" /><ExtraIncludeCode value="#include "anchors.h"" /><HasFocus value="True" /><Controls><Widget_Controls.WidgetButton><Name value="widgetButton1" /><Size value="{Width=75, Height=25}" /><Accessibility value="Private" /><IsEnabled value="True" /><Text value="Button1" /><Font value="[Font: Name=Tahoma, Size=8.25, Style=0, Units=3, GdiCharSet=1, GdiVerticalFont=False]" /><HasFocus value="False" /><Location value="{X=384,Y=368}" /><IsVisible value="True" /></Widget_Controls.WidgetButton><Widget_Controls.WidgetGroupBox><Name value="widgetGroupBox1" /><Size value="{Width=448, Height=352}" /><Location value="{X=8,Y=8}" /><Accessibility value="Private" /><IsEnabled value="True" /><Text value=" as???????" /><Font value="[Font: Name=Tahoma, Size=8.25, Style=0, Units=3, GdiCharSet=1, GdiVerticalFont=False]" /><HasFocus value="False" /><IsVisible value="True" /><Controls><Widget_Controls.WidgetDataGrid><Name value="widgetDataGrid1" /><CheckBoxes value="True" /><ContextMenuName value="" /><StateImageListName value="" /><ViewType value="Details" /><ImageListKind value="ICON_IMAGELIST" /><ViewTypeLargeIconIsActive value="False" /><GridLines value="True" /><NumberOfExtraImages value="0" /><EnableSorting value="False" /><Accessibility value="Private" /><IsEnabled value="True" /><LargeImageListName value="" /><FullRowSelect value="True" /><Location value="{X=16,Y=48}" /><ImageListString value="" /><Size value="{Width=416, Height=288}" /><SmallImageListName value="" /><HasFocus value="False" /><TextColor value="Color [WindowText]" /><IsVisible value="True" /><ImageSize value="{Width=16, Height=16}" /><Font value="[Font: Name=Tahoma, Size=8.25, Style=0, Units=3, GdiCharSet=1, GdiVerticalFont=False]" /><AutoResizeImages value="True" /><BackgroundColor value="Color [Window]" /><ImageListPixelFormat value="ILC_COLOR24" /><IconListString value="" /><Columns><System.Windows.Forms.ColumnHeader><Width value="104" /><Name value="columnHeader1" /></System.Windows.Forms.ColumnHeader><System.Windows.Forms.ColumnHeader><Width value="97" /><Name value="columnHeader2" /></System.Windows.Forms.ColumnHeader><System.Windows.Forms.ColumnHeader><Name value="columnHeader3" /></System.Windows.Forms.ColumnHeader></Columns><CheckedItems><System.Windows.Forms.ListViewItem><StateImageIndex value="1" /><Checked value="True" /><ForeColor value="Color [WindowText]" /><BackColor value="Color [Window]" /><Font value="[Font: Name=Tahoma, Size=8.25, Style=0, Units=3, GdiCharSet=1, GdiVerticalFont=False]" /><Text value="tyui yu " /><Text value=" " /><Text value=" " /></System.Windows.Forms.ListViewItem></CheckedItems><CheckedIndices><System.Int32 value="0" /></CheckedIndices><Items><System.Windows.Forms.ListViewItem><StateImageIndex value="1" /><Checked value="True" /><ForeColor value="Color [WindowText]" /><BackColor value="Color [Window]" /><Font value="[Font: Name=Tahoma, Size=8.25, Style=0, Units=3, GdiCharSet=1, GdiVerticalFont=False]" /><Text value="tyui yu " /><Text value=" " /><Text value=" " /></System.Windows.Forms.ListViewItem><System.Windows.Forms.ListViewItem><StateImageIndex value="0" /><ForeColor value="Color [WindowText]" /><BackColor value="Color [Window]" /><Font value="[Font: Name=Tahoma, Size=8.25, Style=0, Units=3, GdiCharSet=1, GdiVerticalFont=False]" /><Text value=" " /></System.Windows.Forms.ListViewItem><System.Windows.Forms.ListViewItem><StateImageIndex value="0" /><ForeColor value="Color [WindowText]" /><BackColor value="Color [Window]" /><Font value="[Font: Name=Tahoma, Size=8.25, Style=0, Units=3, GdiCharSet=1, GdiVerticalFont=False]" /><Text value=" " /></System.Windows.Forms.ListViewItem></Items></Widget_Controls.WidgetDataGrid><Widget_Controls.WidgetComboBox><Name value="widgetComboBox1" /><Accessibility value="Private" /><IsEnabled value="True" /><IsVisible value="True" /><Font value="[Font: Name=Tahoma, Size=8.25, Style=0, Units=3, GdiCharSet=1, GdiVerticalFont=False]" /><SetTextColor value="Color [WindowText]" /><DropDownStyle value="DropDownList" /><SelIndex value="3" /><SetBackgroundColor value="Color [Window]" /><Location value="{X=16,Y=24}" /><HasFocus value="False" /><ContextMenuName value="" /><Size value="{Width=256, Height=21}" /><Items><System.String value="rt6 u" /><System.String value=".56u " /><System.String value="56u " /><System.String value="t6uy 5t6u5" /><System.String value="y6u t" /><System.String value="6u 5r6" /><System.String value="rt " /><System.String value="y " /></Items></Widget_Controls.WidgetComboBox></Controls></Widget_Controls.WidgetGroupBox></Controls></Widget_Controls.WidgetWindow></Components> */ //endregion Form Loading //region Events Loading /* [Custom Events For Object: SWMainForm] Sized=OnSWMainFormSized */ //endregion Events Loading //endregion IDE Generated Region (Do not touch) #endif --- NEW FILE: resource.rc --- #define ID_ICON_100 100 ID_ICON_100 ICON DISCARDABLE "icon.ico" --- NEW FILE: Anchors.dev --- [Project] FileName=Anchors.dev Name=Anchors UnitCount=1 Type=0 Ver=1 ObjFiles= Includes=.\..\..\include Libs= PrivateResource= ResourceIncludes= MakeIncludes= Compiler= CppCompiler= Linker=../../lib/libSmartWin.a_@@_-lcomctl32_@@_ IsCpp=1 Icon= ExeOutput= ObjectOutput= OverrideOutput=0 OverrideOutputName=Anchors.exe HostApplication= Folders= CommandLine= UseCustomMakefile=0 CustomMakefile= IncludeVersionInfo=0 SupportXPThemes=0 CompilerSet=0 CompilerSettings=0000000000000000000000 [Unit1] FileName=SWMainForm.cpp CompileCpp=1 Folder=Anchors Compile=1 Link=1 Priority=1000 OverrideBuildCmd=0 BuildCmd= [VersionInfo] Major=0 Minor=1 Release=1 Build=1 LanguageID=1033 CharsetID=1252 CompanyName= FileVersion= FileDescription=Developed using the Dev-C++ IDE InternalName= LegalCopyright= LegalTrademarks= OriginalFilename= ProductName= ProductVersion= AutoIncBuildNr=0 --- NEW FILE: SWMainForm.cpp --- #include "SWMainForm.h" // Note: Generated from the Sally IDE : Check out http://sallyide.sourceforge.net/ // //region int SmartWinMain(sw::Application& app) int SmartWinMain(sw::Application& app) { #ifdef _MUST_INITIALIZE_COM_ CoInitialize(NULL); //requires ole32 #endif #ifdef _MUST_INITIALIZE_OLE_ OleInitialize(NULL); //requires ole32 #endif #ifdef _GDIPLUS_H Gdiplus::GdiplusStartupInput gdiplusStartupInput; ULONG_PTR gdiplusToken; Gdiplus::GdiplusStartup(&gdiplusToken,&gdiplusStartupInput,NULL); #endif SWMainForm* mainForm=new SWMainForm; #ifdef SW_HEARTBEAT app.setHeartBeatFunction(mainForm); #endif mainForm->initAndCreate(); int ret=app.run(); #ifdef _GDIPLUS_H Gdiplus::GdiplusStartup(&gdiplusToken,&gdiplusStartupInput,NULL); #endif #ifdef _MUST_INITIALIZE_OLE_ OleUninitialize(); #endif #ifdef _MUST_INITIALIZE_COM_ CoUninitialize(); #endif return ret; } //endregion void SWMainForm::PostConstructor() { // This is how you setup the widgets to be anchored. manager.addAnchored( widgetDataGrid1, AnchoredItem::left | AnchoredItem::top | AnchoredItem::right ); manager.addAnchored( widgetGroupBox1, AnchoredItem::box ); manager.addAnchored( widgetButton1, AnchoredItem::dialog ); } void SWMainForm::OnSWMainFormSized(const sw::WidgetSizedEventResult& e) { // And this is how you adjust the widgets after a resize. manager.resizeAnchored(); } //region SallyIDE Text Editor Settings //Caret=(57,39) //endregion --- NEW FILE: icon.ico --- (This appears to be a binary file; contents omitted.) |
|
From: andrew7 <bd...@us...> - 2006-11-30 00:52:51
|
Update of /cvsroot/smartwin/SmartWin/tests/Anchors In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26302/Anchors Log Message: Directory /cvsroot/smartwin/SmartWin/tests/Anchors added to the repository |
|
From: andrew7 <bd...@us...> - 2006-11-30 00:51:41
|
Update of /cvsroot/smartwin/SmartWin/tests/AddressBook In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv25399/tests/AddressBook Modified Files: CentralWidget.cpp CentralWidget.h Log Message: Unicode support Index: CentralWidget.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/AddressBook/CentralWidget.h,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- CentralWidget.h 5 May 2006 17:14:39 -0000 1.9 +++ CentralWidget.h 30 Nov 2006 00:51:36 -0000 1.10 @@ -24,7 +24,7 @@ void save( const SmartUtil::tstring & path ); void load( const SmartUtil::tstring & path ); void add( const SmartUtil::tstring & firstName, const SmartUtil::tstring & lastName, - const SmartUtil::tstring & address, const SmartUtil::tstring & email ); + const SmartUtil::tstring & address, const SmartUtil::tstring & email ); void search( const SmartUtil::tstring & firstName, const SmartUtil::tstring & lastName, const SmartUtil::tstring & address, const SmartUtil::tstring & email ); Index: CentralWidget.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/tests/AddressBook/CentralWidget.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- CentralWidget.cpp 17 Jun 2006 20:55:58 -0000 1.16 +++ CentralWidget.cpp 30 Nov 2006 00:51:36 -0000 1.17 @@ -24,10 +24,10 @@ std::ofstream file( path.c_str() ); for ( unsigned idx = 0; idx < itsListView->getRowCount(); ++idx ) { - file << itsListView->getCellText( 0, idx ) << std::endl; - file << itsListView->getCellText( 1, idx ) << std::endl; - file << itsListView->getCellText( 2, idx ) << std::endl; - file << itsListView->getCellText( 3, idx ) << std::endl; + file << itsListView->getCellText( 0, idx ).c_str() << std::endl; + file << itsListView->getCellText( 1, idx ).c_str() << std::endl; + file << itsListView->getCellText( 2, idx ).c_str() << std::endl; + file << itsListView->getCellText( 3, idx ).c_str() << std::endl; } } @@ -48,7 +48,11 @@ if ( !file.good() || file.eof() ) break; - add( firstName, lastName, address, email ); + // The UnicodeConverter function does nothing if TCHAR is char, but converts to Unicode if TCHAR is w_char + add( SmartUtil::UnicodeConverter<char, TCHAR>::doConvert( firstName, SmartUtil::ConversionCodepage::UTF8 ), + SmartUtil::UnicodeConverter<char, TCHAR>::doConvert( lastName, SmartUtil::ConversionCodepage::UTF8 ), + SmartUtil::UnicodeConverter<char, TCHAR>::doConvert( address, SmartUtil::ConversionCodepage::UTF8 ), + SmartUtil::UnicodeConverter<char, TCHAR>::doConvert( email, SmartUtil::ConversionCodepage::UTF8 ) ); } } @@ -59,22 +63,24 @@ * License for library is Open Source and BSD */ void ABCentralWidget::add( const SmartUtil::tstring & firstName, const SmartUtil::tstring & lastName, - const SmartUtil::tstring & address, const SmartUtil::tstring & email ) + const SmartUtil::tstring & address, const SmartUtil::tstring & email ) { bool valid = false; if ( firstName.size() != 0 || lastName.size() != 0 || address.size() != 0 || email.size() != 0 ) { - if ( firstName.find_first_not_of( _T( " \t\r\n" ) ) != std::string::npos - || firstName.find_first_not_of( _T( " \t\r\n" ) ) != std::string::npos - || firstName.find_first_not_of( _T( " \t\r\n" ) ) != std::string::npos - || firstName.find_first_not_of( _T( " \t\r\n" ) ) != std::string::npos ) + TCHAR seps[] = _T(" \t\r\n"); + if ( firstName.find_first_not_of( seps ) != std::string::npos + || firstName.find_first_not_of( seps ) != std::string::npos + || firstName.find_first_not_of( seps ) != std::string::npos + || firstName.find_first_not_of( seps ) != std::string::npos ) { valid = true; } } if ( valid ) { - std::vector< SmartUtil::tstring > row; // Yet another example of where SmartWin++ uses standardized container classes + // Yet another example of where SmartWin++ uses standardized container classes. + std::vector< SmartUtil::tstring > row; row.push_back( firstName ); row.push_back( lastName ); row.push_back( address ); |
|
From: andrew7 <bd...@us...> - 2006-11-30 00:47:09
|
Update of /cvsroot/smartwin/SmartWin/SmartUtil In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv23790/SmartUtil Modified Files: tstring.h Log Message: Add tiostream Index: tstring.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/SmartUtil/tstring.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- tstring.h 9 Sep 2006 15:37:32 -0000 1.7 +++ tstring.h 30 Nov 2006 00:47:06 -0000 1.8 @@ -53,7 +53,12 @@ # if defined _ISTREAM_ || defined _GLIBCXX_ISTREAM typedef std::wistream tistream; # endif //_ISTREAM_ -# if defined _FSTREAM_ || defined _GLIBCXX_FSTREAM +# if defined _OSTREAM_ || defined _GLIBCXX_OSTREAM +# if defined _ISTREAM_ || defined _GLIBCXX_ISTREAM + typedef std::wiostream tiostream; +# endif //_ISTREAM_ +# endif //_OSTREAM_ +# if defined _IOSFWD_ || defined _FSTREAM_ || defined _GLIBCXX_FSTREAM typedef std::wfilebuf tfilebuf; typedef std::wfstream tfstream; typedef std::wifstream tifstream; @@ -74,7 +79,12 @@ # if defined _ISTREAM_ || defined _GLIBCXX_ISTREAM typedef std::istream tistream; # endif //_ISTREAM_ -# if defined _FSTREAM_ || defined _GLIBCXX_FSTREAM +# if defined _OSTREAM_ || defined _GLIBCXX_OSTREAM +# if defined _ISTREAM_ || defined _GLIBCXX_ISTREAM + typedef std::iostream tiostream; +# endif //_ISTREAM_ +# endif //_OSTREAM_ +# if defined _IOSFWD_ || defined _FSTREAM_ || defined _GLIBCXX_FSTREAM typedef std::filebuf tfilebuf; typedef std::fstream tfstream; typedef std::ifstream tifstream; |
|
From: andrew7 <bd...@us...> - 2006-11-30 00:45:40
|
Update of /cvsroot/smartwin/SmartWin/SmartUtil In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22886/SmartUtil Modified Files: StringConversion.h Log Message: Documentation improve Index: StringConversion.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/SmartUtil/StringConversion.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- StringConversion.h 3 Sep 2006 15:25:24 -0000 1.6 +++ StringConversion.h 30 Nov 2006 00:45:35 -0000 1.7 @@ -69,13 +69,17 @@ * Often you would for instance use a WidgetLoadFile or a WidgetSaveFile Widget to retrieve a path from the user.<br> * These classes returns their file paths in UNICODE format ifi UNICODE is defined.<br> * But the std::fstream constructors cannot take any string types other than char * types for a file path.<br> - * Then you can use this class to convert from wchar_t string to char strings. + * Then you can use this class to convert from wchar_t string to char strings. <br> + * Example: <br> + * std::string charHi = "hello"; + * SmartUtil::tstring hi= SmartUtil::UnicodeConverter<char, TCHAR>::doConvert( charHi, SmartUtil::ConversionCodepage::UTF8 ); <br> + * will convert if needed, and do nothing if TCHAR is char ! */ template< > class UnicodeConverter< wchar_t, char > { public: - /** There may axist many reasons as to why conversion is NOT possible. + /** There may exist many reasons as to why conversion is NOT possible. * E.g. we may have a string which contains a character which has not been fully seen! * You might have had some stream operation which haven't extracted a string containing the whole character, meaning * you may have seen a leading byte for an UTF-8 conversion but no trailing byte etc. @@ -86,7 +90,7 @@ } /// Returns true if conversion is possible - /** There may axist many reasons as to why conversion is NOT possible. + /** There may exist many reasons as to why conversion is NOT possible. * E.g. we may have a string which contains a character which has not been fully seen! * You might have had some stream operation which haven't extracted a string containing the whole character, meaning * you may have seen a leading byte for an UTF-8 conversion but no trailing byte etc. @@ -133,7 +137,7 @@ { public: /// Returns true if conversion is possible - /** There may axist many reasons as to why conversion is NOT possible. + /** There may exist many reasons as to why conversion is NOT possible. * E.g. we may have a string which contains a character which has not been fully seen! * You might have had some stream operation which haven't extracted a string containing the whole character, meaning * you may have seen a leading byte for an UTF-8 conversion but no trailing byte etc. @@ -254,7 +258,7 @@ class UnicodeConverter< char, char > { public: - /** There may axist many reasons as to why conversion is NOT possible. + /** There may exist many reasons as to why conversion is NOT possible. * E.g. we may have a string which contains a character which has not been fully seen! * You might have had some stream operation which haven't extracted a string containing the whole character, meaning * you may have seen a leading byte for an UTF-8 conversion but no trailing byte etc. @@ -265,7 +269,7 @@ } /// Returns true if conversion is possible - /** There may axist many reasons as to why conversion is NOT possible. + /** There may exist many reasons as to why conversion is NOT possible. * E.g. we may have a string which contains a character which has not been fully seen! * You might have had some stream operation which haven't extracted a string containing the whole character, meaning * you may have seen a leading byte for an UTF-8 conversion but no trailing byte etc. @@ -304,7 +308,7 @@ class UnicodeConverter< wchar_t, wchar_t > { public: - /** There may axist many reasons as to why conversion is NOT possible. + /** There may exist many reasons as to why conversion is NOT possible. * E.g. we may have a string which contains a character which has not been fully seen! * You might have had some stream operation which haven't extracted a string containing the whole character, meaning * you may have seen a leading byte for an UTF-8 conversion but no trailing byte etc. @@ -315,7 +319,7 @@ } /// Returns true if conversion is possible - /** There may axist many reasons as to why conversion is NOT possible. + /** There may exist many reasons as to why conversion is NOT possible. * E.g. we may have a string which contains a character which has not been fully seen! * You might have had some stream operation which haven't extracted a string containing the whole character, meaning * you may have seen a leading byte for an UTF-8 conversion but no trailing byte etc. |
|
From: andrew7 <bd...@us...> - 2006-11-30 00:44:59
|
Update of /cvsroot/smartwin/SmartWin/SmartSOAP/Tester1 In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv22406/SmartSOAP/Tester1 Modified Files: Main.cpp Log Message: Unicode support Index: Main.cpp =================================================================== RCS file: /cvsroot/smartwin/SmartWin/SmartSOAP/Tester1/Main.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Main.cpp 3 Sep 2006 15:25:24 -0000 1.14 +++ Main.cpp 30 Nov 2006 00:44:55 -0000 1.15 @@ -17,7 +17,7 @@ class HelloWorldReturnValue { public: - string helloWorldString; + tstring helloWorldString; }; // This is the object being "sent" to the HelloWorld function @@ -30,20 +30,20 @@ class HelloWorldSerializer { public: - string serialize( const HelloWorldSender & sender ) + tstring serialize( const HelloWorldSender & sender ) { // We're using the SmartXML classes to serialize our request, but we strictly speaking don't have to do so! - XmlDocument doc( "Envelope", "", "soap" ); + XmlDocument doc( _T("Envelope"), _T(""), _T("soap") ); XmlNode & rootNode = ( * doc.getDocumentNode() ); - rootNode.addNamespace( XmlNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi" ) ); - rootNode.addNamespace( XmlNamespace( "http://www.w3.org/2001/XMLSchema", "xsd" ) ); - rootNode.addNamespace( XmlNamespace( "http://schemas.xmlsoap.org/soap/envelope/", "soap" ) ); + rootNode.addNamespace( XmlNamespace( _T("http://www.w3.org/2001/XMLSchema-instance"), _T("xsi") ) ); + rootNode.addNamespace( XmlNamespace( _T("http://www.w3.org/2001/XMLSchema"), _T("xsd") ) ); + rootNode.addNamespace( XmlNamespace( _T("http://schemas.xmlsoap.org/soap/envelope/"), _T("soap") ) ); - XmlNode & bodyNode = rootNode.addChild( "Body", "", "soap" ); + XmlNode & bodyNode = rootNode.addChild( _T("Body"), _T(""), _T("soap") ); - XmlNode & helloWorldNode = bodyNode.addChild( "HelloWorld", "", "" ); - helloWorldNode.addNamespace( XmlNamespace( "http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject" ) ); - helloWorldNode.addChild( "number", boost::lexical_cast< string >( sender.intValue ), "" ); + XmlNode & helloWorldNode = bodyNode.addChild( _T("HelloWorld"), _T(""), _T("") ); + helloWorldNode.addNamespace( XmlNamespace( _T("http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject") ) ); + helloWorldNode.addChild( _T("number"), boost::lexical_cast< tstring >( sender.intValue ), _T("") ); return doc.toString(); } @@ -59,7 +59,7 @@ // This is a "Proxy Function" which will call our HelloWorld WebService function abstracting away all the details of the WebService. // You don't actually NEED one of these, but the code will be much easier to understand if you DO! -string helloWorld( int number ) +tstring helloWorld( int number ) { // First we create a HelloWorldSender which will be passed onto the WebService HelloWorld function HelloWorldSender sender; @@ -71,8 +71,8 @@ // Then we create our SoapRequest SoapRequest< HelloWorldSerializer, HelloWorldSender, HelloWorldReturnValue > soap( "localhost", // Which host is our WebService located at - "/Tester1Endpoint/CustomObjects.asmx", // What is the PATH to our WebService - "SOAPAction:\"http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject/HelloWorld\"", // What is the SOAPAction or basically the NAMESPACE of our WebService + the name of the function we're calling + _T("/Tester1Endpoint/CustomObjects.asmx"), // What is the PATH to our WebService + _T("SOAPAction:\"http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject/HelloWorld\""), // What is the SOAPAction or basically the NAMESPACE of our WebService + the name of the function we're calling 80, // Which TCP/IP port is the WebService listening on serializer, // The serializer/deserializer for our WebService call sender // The object we actually want to send @@ -92,33 +92,33 @@ { public: int howMany; - std::string whatShouldTheyContain; + tstring whatShouldTheyContain; }; class GetArrayOfStringsReturnValue { public: - vector< string > returnedStrings; + vector< tstring > returnedStrings; }; class GetArrayOfStringsSerializer { public: - string serialize( const GetArrayOfStringsSender & sender ) + tstring serialize( const GetArrayOfStringsSender & sender ) { // We're using the SmartXML classes to serialize our request - XmlDocument doc( "Envelope", "", "soap" ); + XmlDocument doc( _T("Envelope"), _T(""), _T("soap") ); XmlNode & rootNode = ( * doc.getDocumentNode() ); - rootNode.addNamespace( XmlNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi" ) ); - rootNode.addNamespace( XmlNamespace( "http://www.w3.org/2001/XMLSchema", "xsd" ) ); - rootNode.addNamespace( XmlNamespace( "http://schemas.xmlsoap.org/soap/envelope/", "soap" ) ); + rootNode.addNamespace( XmlNamespace( _T("http://www.w3.org/2001/XMLSchema-instance"), _T("xsi") ) ); + rootNode.addNamespace( XmlNamespace( _T("http://www.w3.org/2001/XMLSchema"), _T("xsd") ) ); + rootNode.addNamespace( XmlNamespace( _T("http://schemas.xmlsoap.org/soap/envelope/"), _T("soap") ) ); - XmlNode & bodyNode = rootNode.addChild( "Body", "", "soap" ); + XmlNode & bodyNode = rootNode.addChild( _T("Body"), _T(""), _T("soap") ); - XmlNode & helloWorldNode = bodyNode.addChild( "GetArrayOfStrings", "", "" ); - helloWorldNode.addNamespace( XmlNamespace( "http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject" ) ); - helloWorldNode.addChild( "howMany", boost::lexical_cast< string >( sender.howMany ), "" ); - helloWorldNode.addChild( "whatShouldTheyContain", sender.whatShouldTheyContain, "" ); + XmlNode & helloWorldNode = bodyNode.addChild( _T("GetArrayOfStrings"), _T(""), _T("") ); + helloWorldNode.addNamespace( XmlNamespace( _T("http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject") ) ); + helloWorldNode.addChild( _T("howMany"), boost::lexical_cast< tstring >( sender.howMany ), _T("") ); + helloWorldNode.addChild( _T("whatShouldTheyContain"), sender.whatShouldTheyContain, _T("") ); return doc.toString(); } @@ -137,7 +137,7 @@ } }; -vector< string > getArrayOfStrings( const string & content, int howMany ) +vector< tstring > getArrayOfStrings( const tstring & content, int howMany ) { GetArrayOfStringsSender sender; sender.howMany = howMany; @@ -149,8 +149,8 @@ // Then we create our SoapRequest SoapRequest< GetArrayOfStringsSerializer, GetArrayOfStringsSender, GetArrayOfStringsReturnValue > soap( "localhost", // Which host is our WebService located at - "/Tester1Endpoint/CustomObjects.asmx", // What is the PATH to our WebService - "SOAPAction:\"http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject/GetArrayOfStrings\"", // What is the SOAPAction or basically the NAMESPACE of our WebService + the name of the function we're calling + _T("/Tester1Endpoint/CustomObjects.asmx"), // What is the PATH to our WebService + _T("SOAPAction:\"http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject/GetArrayOfStrings\""), // What is the SOAPAction or basically the NAMESPACE of our WebService + the name of the function we're calling 80, // Which TCP/IP port is the WebService listening on serializer, // The serializer/deserializer for our WebService call sender // The object we actually want to send @@ -169,14 +169,14 @@ class TestReturnStuffContents { public: - string stringValue; + tstring stringValue; }; class TestReturnStuff { public: int intValue; - string stringValue; + tstring stringValue; double decimalValue; vector< TestReturnStuffContents > arrayOfContents; }; @@ -184,27 +184,27 @@ class TestGetStuff { public: - string getStuffString; + tstring getStuffString; }; class GetCustomObjectSerializer { public: - string serialize( const TestGetStuff & sender ) + tstring serialize( const TestGetStuff & sender ) { // We're using the SmartXML classes to serialize our request - XmlDocument doc( "Envelope", "", "soap" ); + XmlDocument doc( _T("Envelope"), _T(""), _T("soap") ); XmlNode & rootNode = ( * doc.getDocumentNode() ); - rootNode.addNamespace( XmlNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi" ) ); - rootNode.addNamespace( XmlNamespace( "http://www.w3.org/2001/XMLSchema", "xsd" ) ); - rootNode.addNamespace( XmlNamespace( "http://schemas.xmlsoap.org/soap/envelope/", "soap" ) ); + rootNode.addNamespace( XmlNamespace( _T("http://www.w3.org/2001/XMLSchema-instance"), _T("xsi") ) ); + rootNode.addNamespace( XmlNamespace( _T("http://www.w3.org/2001/XMLSchema"), _T("xsd") ) ); + rootNode.addNamespace( XmlNamespace( _T("http://schemas.xmlsoap.org/soap/envelope/"), _T("soap") ) ); - XmlNode & bodyNode = rootNode.addChild( "Body", "", "soap" ); + XmlNode & bodyNode = rootNode.addChild( _T("Body"), _T(""), _T("soap") ); - XmlNode & helloWorldNode = bodyNode.addChild( "GetCustomObject", "", "" ); - helloWorldNode.addNamespace( XmlNamespace( "http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject" ) ); - XmlNode & getStuffNode = helloWorldNode.addChild( "getStuff", "", "" ); - getStuffNode.addChild( "getStuffString", sender.getStuffString, "" ); + XmlNode & helloWorldNode = bodyNode.addChild( _T("GetCustomObject"), _T(""), _T("") ); + helloWorldNode.addNamespace( XmlNamespace( _T("http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject") ) ); + XmlNode & getStuffNode = helloWorldNode.addChild( _T("getStuff"), _T(""), _T("") ); + getStuffNode.addChild( _T("getStuffString"), sender.getStuffString, _T("") ); return doc.toString(); } @@ -236,8 +236,8 @@ // Then we create our SoapRequest SoapRequest< GetCustomObjectSerializer, TestGetStuff, TestReturnStuff > soap( "localhost", - "/Tester1Endpoint/CustomObjects.asmx", - "SOAPAction:\"http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject/GetCustomObject\"", + _T("/Tester1Endpoint/CustomObjects.asmx"), + _T("SOAPAction:\"http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject/GetCustomObject\""), 80, serializer, getStuff @@ -268,20 +268,20 @@ class GetDateTimeNowSerializer { public: - string serialize( const GetDateTimeNowRequest & sender ) + tstring serialize( const GetDateTimeNowRequest & sender ) { // We're using the SmartXML classes to serialize our request - XmlDocument doc( "Envelope", "", "soap" ); + XmlDocument doc( _T("Envelope"), _T(""), _T("soap") ); XmlNode & rootNode = * doc.getDocumentNode(); - rootNode.addNamespace( XmlNamespace( "http://www.w3.org/2001/XMLSchema-instance", "xsi" ) ); - rootNode.addNamespace( XmlNamespace( "http://www.w3.org/2001/XMLSchema", "xsd" ) ); - rootNode.addNamespace( XmlNamespace( "http://schemas.xmlsoap.org/soap/envelope/", "soap" ) ); + rootNode.addNamespace( XmlNamespace( _T("http://www.w3.org/2001/XMLSchema-instance"), _T("xsi") ) ); + rootNode.addNamespace( XmlNamespace( _T("http://www.w3.org/2001/XMLSchema"), _T("xsd") ) ); + rootNode.addNamespace( XmlNamespace( _T("http://schemas.xmlsoap.org/soap/envelope/"), _T("soap") ) ); - XmlNode & bodyNode = rootNode.addChild( "Body", "", "soap" ); + XmlNode & bodyNode = rootNode.addChild( _T("Body"), _T(""), _T("soap") ); - XmlNode & getDateTimeNow = bodyNode.addChild( "GetDateTimeNow", "", "" ); - getDateTimeNow.addNamespace( XmlNamespace( "http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject" ) ); - getDateTimeNow.addChild( "offset", boost::lexical_cast< string >( sender.offset ), "" ); + XmlNode & getDateTimeNow = bodyNode.addChild( _T("GetDateTimeNow"), _T(""), _T("") ); + getDateTimeNow.addNamespace( XmlNamespace( _T("http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject") ) ); + getDateTimeNow.addChild( _T("offset"), boost::lexical_cast< tstring >( sender.offset ), _T("") ); return doc.toString(); } @@ -290,7 +290,7 @@ GetDateTimeNowResponse retVal; // We're using the SmartXML to deserialize our response - retVal.dateTime = DateTime( ( * document->getDocumentNode() )[0][0][0].getContent(), "yyyy.MM.dd HH:mm:ss" ); + retVal.dateTime = DateTime( ( * document->getDocumentNode() )[0][0][0].getContent(), _T("yyyy.MM.dd HH:mm:ss") ); return retVal; } }; @@ -306,8 +306,8 @@ // Then we create our SoapRequest SoapRequest< GetDateTimeNowSerializer, GetDateTimeNowRequest, GetDateTimeNowResponse > soap( "localhost", - "/Tester1Endpoint/CustomObjects.asmx", - "SOAPAction:\"http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject/GetDateTimeNow\"", + _T("/Tester1Endpoint/CustomObjects.asmx"), + _T("SOAPAction:\"http://smartwin.org/SmartSOAP/WebServices/Test/CustomObject/GetDateTimeNow\""), 80, serializer, tmp @@ -327,11 +327,11 @@ { cout << "Calling our WebService with the value of: 2" << endl; cout << "WebService returns: " << endl; - cout << helloWorld( 2 ) << endl << endl; + cout << helloWorld( 2 ).c_str() << endl << endl; cout << "Calling our WebService with the value of: 5" << endl; cout << "WebService returns: " << endl; - cout << helloWorld( 5 ) << endl << endl; + cout << helloWorld( 5 ).c_str() << endl << endl; cout << "Now we're gonna call the WebService with the value 15, this will trigger an Exception which the SmartSOAP will parse for us and 'convert' into an xCeptionSoap..." << endl; try @@ -346,30 +346,30 @@ cout << endl << endl << "Then we're gonna call a bit more 'advanced' WebService function" << endl; cout << "Calling GetArrayOfStrings with 5, 'thomas'" << endl; cout << "Return value was" << endl; - vector< string > strings1 = getArrayOfStrings( "thomas", 5 ); - for ( vector< string >::const_iterator idxIter = strings1.begin(); + vector< tstring > strings1 = getArrayOfStrings( _T("thomas"), 5 ); + for ( vector< tstring >::const_iterator idxIter = strings1.begin(); idxIter != strings1.end(); ++idxIter ) { - cout << "\t\t" << * idxIter << endl; + cout << "\t\t" << (* idxIter).c_str() << endl; } cout << endl << endl << "Then we're call a function taking a custom object returning another custom object" << endl; TestGetStuff getStuff; - getStuff.getStuffString = "Tjobing"; + getStuff.getStuffString = _T("Tjobing"); TestReturnStuff returnStuff = getCustomObject( getStuff ); cout << "Return value was: " << endl; - cout << returnStuff.intValue << endl << returnStuff.stringValue << endl << returnStuff.decimalValue << endl; + cout << returnStuff.intValue << endl << returnStuff.stringValue.c_str() << endl << returnStuff.decimalValue << endl; for ( std::vector< TestReturnStuffContents >::const_iterator iter = returnStuff.arrayOfContents.begin(); iter != returnStuff.arrayOfContents.end(); ++iter ) { - cout << "\t\t" << iter->stringValue << endl; + cout << "\t\t" << iter->stringValue.c_str() << endl; } - cout << endl << endl << "Then we're call a function returnung a DateTime object" << endl; + cout << endl << endl << "Then we call a function returning a DateTime object" << endl; DateTime date = getDateTimeNowResponse( 1 ); - cout << "Return was: " << date.toDateString( "dd.MM.yyyy" ) << " " << date.toTimeString( "HH:mm:ss" ); + cout << "Return was: " << date.toDateString( _T("dd.MM.yyyy") ).c_str() << " " << date.toTimeString( _T("HH:mm:ss") ).c_str(); string g; cin >> g; |
|
From: andrew7 <bd...@us...> - 2006-11-30 00:44:00
|
Update of /cvsroot/smartwin/SmartWin/include/smartwin/widgets In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv21882/include/smartwin/widgets Modified Files: WidgetLoadFile.h WidgetTextBox.h Log Message: Index: WidgetLoadFile.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetLoadFile.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- WidgetLoadFile.h 9 Jul 2006 03:42:01 -0000 1.14 +++ WidgetLoadFile.h 30 Nov 2006 00:43:57 -0000 1.15 @@ -165,7 +165,7 @@ { while (fileName.length() > 0) { - filePath = directory + "\\" + fileName; + filePath = directory + _T("\\") + fileName; backslashToForwardSlashForUnix(filePath); retVal.push_back(filePath); array_p = array_p + fileName.length() + 1; // set pointer one position past null Index: WidgetTextBox.h =================================================================== RCS file: /cvsroot/smartwin/SmartWin/include/smartwin/widgets/WidgetTextBox.h,v retrieving revision 1.34 retrieving revision 1.35 diff -u -d -r1.34 -r1.35 --- WidgetTextBox.h 5 Nov 2006 17:55:39 -0000 1.34 +++ WidgetTextBox.h 30 Nov 2006 00:43:57 -0000 1.35 @@ -453,7 +453,7 @@ template< class EventHandlerClass, class WidgetMessageMapType, class TextBoxType > void WidgetTextBox< EventHandlerClass, WidgetMessageMapType, TextBoxType>::setTextLimit( DWORD maxChars ) { - ::SendMessage( this->Widget::itsHandle, EM_LIMITTEXT, static_cast< WPARAM >(maxChars), NULL ); + ::SendMessage( this->Widget::itsHandle, EM_LIMITTEXT, static_cast< WPARAM >(maxChars), 0 ); } template< class EventHandlerClass, class WidgetMessageMapType, class TextBoxType > |