Windows Template Library - WTL Version 7.5 (Build 4291) 10/17 / 04Development Release
Copyright © 2004 Microsoft Corporation. All Rights Reserved. This article is part of the Windows Template Library. This software uses the distribution terms to follow CommON Public License 1.0 (http://opensource.org/license/cpl.php) or found in the cpl.txt file in the root directory of this release. Use this software in any way that you have agreed to limit this license terms. You can't remove this precaution or anything else from this software.
Welcome to the Windows Template Library, version 7.5. This document contains the following:
Introduction Characteristics and Installation List Class Overview ATL / WTL AppWizard Windows CE Support Precautions WTL 7.1 to 7.5 Changes WTL 7.0 to 71 Changes WTL 3.0 to 7.0 Changes WTL 3.0 to 3.1
1 Introduction
Windows Template Library, or WTL is a collection of ATLs to support more complex applications or user interfaces of a variety of different UI components, and maintain a big advantage of ATL - compact and fast code. WTL Class Design Classes Were Designed to Be The Best and the Easiest Way To Implement Rich Win32 Based UI for ATL BASED Applications, Servers, Components, and Controls.
WTL provides support for implementing many user interface elements, from frame and popup windows, to MDI, standard and common controls, common dialogs, property sheets and pages, GDI objects, UI updating, scrollable windows, splitter windows, command bars, etc. The WTL classes are mostly templated and use minimal instance data and inline functions. They were not designed as a framework, so they do not force a particular application model, and can accommodate any. The classes do not use hooks or thread local storage, so they have no restrictions that those techniques impose. They also have no inter-dependencies and can be freely mixed with straight SDK code. in summary, WTL delivers very small and efficient code, very close in size and speed to SDK programs, while presenting a more Logical, Object Oriented Model To a Programmer.
2. Features and Installation
This is the fifth public release of WTL, after WTL 3.0, 3.1, 7.0, and 7.1. It is also the first release of WTL under the Common Public License, enabling developers from the WTL community to contribute to the library.WTL classes can be Used with Either VC 6.0 and ATL 3.0, VC .NET 2002 And ATL 7.0, VC .NET 2003 And ATL 7.1, OR EVC 4.0 or 3.0 with atl for Windows CE. AppWizard for VC .NET 2002 and 2003 is Included.
The WTL classes are provided in header files located in the include directory. The only header files that must be included is atlapp.h, while others can be used when needed. The name of the file does not mean that you have to create an Application, Just That Atlapp.h Contains Base Definitions Required for WTL Projects.
To install WTL, just copy the whole directory structure, or unpack the archive file, to the location of your choice. Please be sure to add the WTL / include directory to the list of include directories in VC , so that the compiler can find them When You Include the in your projects ..
Setup programs for the AppWizard are provided. After executing the setup scripts, ATL / WTL AppWizard will appear in the list of AppWizards when you select File.New.Project in VC IDE. The file AppWiz70 / setup70.js is the setup script for VC .NET 2002, While AppWiz70 / setup71.js is for vc .net 2003.
To manually install AppWizard for VC .NET 2002, copy all WTLApp70. * Files from AppWiz70 / Files to VC .NET projects directory,% VC7DIR% / Vc7 / vcprojects, where% VC7DIR% is the directory where VC .NET 2002 is installed. After that, open WTLApp70.vsz and modify the like that contains aBSOLUTE_PATH to contain% WTLDIR% / AppWiz70 / Files, where% WTLDIR% is the directory where WTL files are.For VC .NET 2003 use the WTLApp71. * files with the same STEPS.
Platform Support and Requirements:
Compiler / IDE / ATL:
Visual C 6.0 (ATL 3.0)
Visual C . Net 2002 (ATL 7.0)
Visual C . Net 2003 (ATL 7.1)
SDK (Optional):
Any Platform SDK from January 2000 Release Up to the Latest (February 2003)
Windows CE Developments:
Embedded Visual C 3.0 - Pocket PC, Pocket PC 2002
Embedded Visual C 4.0 - StandardsDK_410, Pocket PC 2003, Smartphone 2003
This Release Also Brings The Preliminary Support for The Visual Studio 2005 (CODENAME WHIDBEY) Beta1. App Wizards for Both Windows Applications and SmartDevice Projects Are Provided.
3. Packing List
File Name: Description:
readme.htmthis fileCPL.TXTCommon Public License include / atlapp.hmessage loop, interfaces, general app stuff atlcrack.hmessage cracker macros atlctrls.hstandard and common control classes atlctrlw.hcommand bar class atlctrlx.hbitmap button, check list view, and other controls atlddx .hdata exchange for dialogs and windows atldlgs.hcommon dialog classes, property sheet and page classes atlframe.hframe window classes, MDI, update UI classes atlgdi.hDC classes, GDI object classes atlmisc.hWTL ports of CPoint, CRect, CSize, CString, etc. atlprint.hprinting and print preview atlres.hstandard resource IDs atlresce.hstandard resource IDs for Windows CE atlscrl.hscrollable windows atlsplit.hsplitter windows atltheme.hWindows XP theme classes atluser.hmenu class atlwinx.hextensions of ATL windowing support samples / Alpha / ... Windows XP 32-Bit (Alpha) Toolbar images Bmpview / ... Bitmap File View Sample Mtpad / ... Multithreaded Notepad Samp le MDIDocVw / ... WTL version of the MDI sample GuidGen / ... WTL version of the GuidGen sample WTLExplorer / ... Explorer-like application sample appwiz / setup70.jsAppWizard setup program for VC .NET 2002 setup71.jsAppWizard setup program for VC .NET 2003 setup80.jsAppWizard setup program for VC 2005 Beta1 Files / ... WTL AppWizard for VC .NET 2002 and 2003 files appwizCE / setup80.jsAppWizard setup program for VC 2005 Beta1 Files / ... WTL AppWizard for VC 2005 Beta1 Files4. Class overview
usage: mi base - a base class (multiple inheritance) client - wrapper class for a handle as-is - to be used directly impl - implements a window (has WindowProc) or other support helper - a helper class base - implementation base class
class name: usage: description: app / module supportCAppModule app support, CComModule derivedCServerAppModule module for COM serversCMessageLoopas-ismessage loopCMessageFiltermi basemessage filter interfaceCIdleHandlermi baseidle time handler interfaceframe windowsCFrameWindowImplBase <> base CFrameWindowImpl <> implframe window supportCOwnerDraw <> impl mi baseowner-draw msg map and handlersCDialogResize <> impl mi basesupport for resizing dialogsMDI windowsCMDIWindowclientMDI methodsCMDIFrameWindowImpl <> implMDI frame windowCMDIChildWindowImpl <> implMDI child windowupdate UICUpdateUIBasebase CUpdateUI <> mi base class provides support for UI updatestandard controlsCStaticclientstatic ctrlCButtonclientbutton ctrlCListBoxclientlist box ctrlCComboBoxclientcombo box ctrlCEditclientedit ctrlCEditCommandsmistandard edit command supportCScrollBarclientscroll bar ctrlcommon controlsCImageListclient / implimage listCListViewCtrlclientlist View CtrlctreeViewCtrlclientTree View CtrlctreeItem Helper CTreeViewCtrl Exclientuses CTreeItemCHeaderCtrlclientheader bar ctrlCToolBarCtrlclienttoolbar ctrlCStatusBarCtrlclientstatus bar ctrlCTabCtrlclienttab ctrlCToolTipCtrlclienttool tip ctrlCToolInfohelper CTrackBarCtrlclienttrackbar ctrlCUpDownCtrlclientup-down ctrlCProgressBarCtrlclientprogress bar ctrlCHotKeyCtrlclienthot key ctrlCAnimateCtrlclientanimation ctrlCRichEditCtrlclientrich edit ctrlCRichEditCommandsmistd rich edit commands supportCDragListBoxclientdrag list boxCDragListNotifyImpl <>
impl mi classsupport for notificationsCReBarCtrlclientrebar ctrlCComboBoxExclientextended combo boxCDateTimePickerCtrlclientdate-time ctrlCFlatScrollBarImplmi implflat scroll bars supportCFlatScrollBaras-isflat scroll bars supportCIPAddressCtrlclientIP address ctrlCMonthCalendarCtrlclientmonth calendar ctrlCCustomDraw <> impl mi classcustom draw handling supportWindows CE controlsCCECommandBarCtrlclientcommand bar ctrlCCECommandBandsCtrlclientcommand bands ctrlproperty sheet & pageCPropertySheetWindowclient CPropertySheetImpl <> implproperty sheet CPropertySheetas-is CPropertyPageWindowclient CPropertyPageImpl <> implproperty pageCPropertyPageas-is CAxPropertyPageImpl <> implproperty page with ActiveXCAxPropertyPageas-is common dialogsCFileDialogImpl <> implGetOpenFileName / GetSaveFileNameCFileDialog as-is CFolderDialogImplimpldirectory pickerCFolderDialogas-is CFontDialogImpl <> implChooseFont common dialogCFontDialogas-is CRichEditFontDialogImpl <> implChooseFont for rich editCRichEditFontDialogas -is CColorDialogImpl <> implChooseColor common dialogCColorDialogas-is CPrintDialogImpl <> implPrintDlg common dialogCPrintDialogas-is CPrintDialogExImplimplnew Win2000 print dialogCPrintDialogExas-is CPageSetupDialogImpl <> implPageSetupDlg common dialogCPageSetupDialogas-is CFindReplaceDialogImpl <>
implFindText / ReplaceTextCFindReplaceDialogas-is USER supportCMenuclientmenu supportGDI supportCDCclientDC supportCPaintDCclientfor handling WM_PAINTCClientDCclientfor GetDCCWindowDCclientfor GetWindowDCCPenclientGDI pen objectCBrushclientGDI brush objectCFontclientGDI font objectCBitmapclientGDI bitmap objectCPaletteclientGDI palette objectCRgnclientGDI rgn objectenhanced controlsCCommandBarCtrlImplimplcommand barCCommandBarCtrlas-is CBitmapButtonImplimplbitmap buttonCBitmapButtonas-is CCheckListViewCtrlImplimplcheck list boxCCheckListViewCtrlas-is CHyperLinkImplimplhyper link controlCHyperLinkas-is CWaitCursoras-iswait cursorCCustomWaitCursoras-iscustom and animated wait cursorCMultiPaneStatusBarCtrlImplimplstatus bar with multiple panesCMultiPaneStatusBarCtrlas-is CPaneContainerImpl <> implpane window containerCPaneContaineras-is additional UI componentsCScrollImplimplscrolling supportCScrollWindowImplimplscrollable windowCMapScrollImplimplscrolling support with map modesCMapScrollWind owImplimplscrollable window with map modesCSplitterImplimplsplitter supportCSplitterWindowImplimplsplitter windowCSplitterWindowas-is theming supportCThemeclientWindows XP themeCThemeImpl <> impltheming support for a windowprinting supportCPrinterInfo <> as-isprint info supportCPrinterclientprinter handle wrapperCDevModeclientDEVMODE wrapperCPrinterDCclientprinting DC supportCPrintJobInfoclientprint job infoCPrintJobclientprint job supportCPrintPreviewmiprint preview supportCPrintPreviewWindowas-isprint preview windowmiscellaneousCSizeas-isWTL port of MFC's CSizeCPointas- Iswtl Port of MFC's CpointCRECTAS-ISWTL Port of MFC's CRECSTRINGAS-ISWTL Port Of MFC '
S CStringcWindataExchangemidata Exchange for ControlscRecentDocumentListmi or As-Issupport for MRU LIST5. ATL / WTL AppWizard
ATL / WTL AppWizard Generates Starting Code for a WTL Application. It has options to create code for Different Application Types and Features.
You can choose the folowing options:
Application type (SDI, multi thread SDI, MDI, dialog based) Support for hosting ActiveX controls COM server support Class implementation in .CPP files Common Control manifest Toolbar, rebar, command bar, status bar View window, and it's type (generic, dialog BASED FORM, OR A List Box, Edit, List View, Tree View, Rich Edit Based, HTML Page For Dialog Based Apps OR A FORM BASED VIEW WINDOW - Support for Hosting ActiveX Controls in The Dialog
ATL / WTL AppWizard Supports VC .NET 2002 and 2003.
6. Support for Windows CE
WTL now fully supports building projects for the Windows CE platforms. This initial support for Windows CE was implemented primarily for eMbedded Visual C 4.0 with Pocket PC 2003 and SmartPhone 2003 SDKs. However, it can be used with other versions and configurations. For instance, Standard SDK 4.1 is supported as well. Considerable effort was made to provide the best Windows CE support, however, there might be some limitations because different platforms provide different programming support.
The support for Windows CE was not designed to port projects for the desktop version of Windows as-is to the Windows CE platforms, but to allow use of the same library, WTL, for both desktop Windows and Windows CE. Applications for Windows CE are often designed in a different way, and they use different platform services. WTL depends on the version of ATL provided with each Windows CE platform, and supports controls and services that are appropriate and supported for each Windows CE platform.7. Notes
~ WTL provides several classes that are also present in ATL 7.0 and 7.1 The classes are:.. CSize, CPoint, CRect, and CString in atlmisc.h While their existence will not cause any problems, their usage might You should qualify the class. you want to use with a namespace to resolve ambiguity, either ATL or WTL namespace, depending on which implementation you want to use Alternatively, you can conditionally exclude WTL implementations, by defining preprocessor symbol _WTL_NO_WTYPES for CSize, CPoint, and CRect;. and _WTL_NO_CSTRING For cstring.
~ If you use WTL 7.5 with VC 6.0 / ATL 3.0 and define _ATL_STATIC_REGISTRY, you'll get errors referring to the ambiguous symbol ATL This is caused by a bug in ATL 3.0 -. In atlbase.h, the file statreg.h is included inside of the ATL namespace, and it contains another namespace ATL declaration. Because of that, the compiler can not decide between ATL :: and ATL :: ATL :: namespaces. The solution is either to fix the atlbase.h, or to surround atlbase .h include declaration with folload statements:
#define ATL Atlfix
#include
#undef ATL
Namespace ATL = :: atlfix;
~ Windows XP allows applications to use Common Controls version 6, which supports only Unicode applications. While WTL allows creation of Ansi applications that use Common Controls 6, that should be used only for test programs and is not recommended or supported for released projects. If you want to use Common Controls 6, build your application as Unicode. ~ Several of the sample programs included with WTL were extended to support building for Windows CE. These samples are not specially redesigned for Windows CE, but just modified to allow you to compile And Run Them on The Windows CE Platforms. The Samples Are: BmpView, Guidgen, and Mtpad.
~ WTL Supports Building Projects with EVC 3.0 Only for Pocket PC AND PCKET PC 2002 Platforms, As Other Platforms Don't Provide Minimum Support for atl or Other Required Libraries.
~ The old AppWizards for VC 6.0 and eVC 4.0 / 3.0 are not included in this version of WTL because they can not be a part of an Open Source project. They are still available in the previous release, WTL 7.1.
8. Changes Between WTL 7.5 and 7.1
NEW AND IMPROVED:
<< Todo: Add items >>
FIXES AND ENHANCEMENTS:
<< Todo: Add items >>
9. Changes Between WTL 7.1 and 7.0
NEW AND IMPROVED:
VC7 Compatibility: Support for Atl7 Module Classes And Critical Sections And Appwizard Setup for VC 7.1
Windows CE Support: Full Compatibility With Windows CE Platforms And Appwizard for Embedded Visual C
Namespace Support: Automatic "Using ATL" or "Using WTL" Can Now Be Turned Off
ChyperLink New Features: Not underlined, Underlined When Hover, Command Button, Link Tags
Ccustomwaitcursor Class Supports Custom and Animated Wait CursorsatlcreateBoldFont () for Creating Bold Version of An Existing Font
FIXES AND ENHANCEMENTS:
CfraMewindowImpl:
CreateSimpleToolBarCtrl () - remove dead code, improve error checking, add a global function that uses it Fix - PrepareChevronMenu () fails to get toolbar strings for Unicode CFrameWindowImplBase :: Create () - improve ASSERT not to use m_hWnd if creation fails Fix - CFrameWndClassInfo :: Register - should use% p formatting only for _WIN32_WINNT> = 0x0500 or for _WIN64 Fix - Chevron menus not positioned correctly with RTL Fix - CMDIChildWindowImpl: Problems creating maximized child windows and handling focus Fix - CMDIChildWindowImpl: Should activate on WM_MOUSEACTIVATE
Updateui:
Fix - IncorRectly Clears Default Item From The System Menu In MDI Apps Added Uisetcheck with Bool Instead of Int for the Check State
DDX:
Fix - Doesn't Provide a Way to Change Floating Point Precision Added Ddx_Control_Handle for Non-CWindowImpl Objects Added Ddx_check Variant with Bool Instead of int for the check state
Command Bar:
Fix - OnDrawItem () and OnMeasureItem () do not do a good check for owner-draw menu items Fix - Disabled 32-bit images not painted correctly in 3D menu mode Fix - Popup menus not positioned correctly with RTL Fix - Uses GCL_HICONSM instead Of gclp_hiconsm with getclasslongptr ()
MDI Command Bar:
Fix - Does not refresh icon if MDI children are different OnAllHookMessages () - improve code to handle MDI child window class icon Fix - OnNcLButtonDown () uses TPM_VERPOSANIMATION without checking Windows version Fix - Maximized MDI buttons in wrong place for RTL Should adjust cxIdeal for Rebar Bands for IE4 Add Support for Different Top-Level Menu Widths by Handling Ideal Size for Rebar Bandsappwizard:
Fix - Does not support MSDI application as a COM Server Fix - MDI with Form View - stack overflow closing maximized MDI child windows Fix - Generates VERSION resource name 'test1' regardless of the project name Fix - Dialog project with control hosting does not Derive A Dialog from CaxDialogIMPL FIX - COM Server Doesn't Register Type Library Fix - COM Server Doesn't Register AppId ProPerly
CTreeViewCtrl:
Fix - GetItemData () needs better return value Fix - GetItemState () should use TVM_GETITEMSTATE instead of TVM_GETITEM for IE5 GetItem () and SetItem () - added new variants that use TVITEMEX Fix - SortChildren () should add recurse flag argument Fix - CTreeItem doesn 'T Support CtreeViewCtrlext That Has DiffERENT TBASE THAN CWINDOW
CThemeImpl:
FIX - Uses Scalar Delete Instead of The Vector One Fix - EnabletHemedialogtexture () Argument IS BOOL INSTEAD OF DWORD
CfolderDialog:
FIX - Enableok () Passs Wrong Arguments to Bffm_enableok fix - Always Clears M_HWND, Which Causes Problem for Nested Messages
CDIALOGRESIZE:
Fix - DlgResize_Init () forces dialog to be visible by using SetRedraw () Forcing WS_THICKFRAME is not enough to make dialog resizable Min track size should be used for child dialogs as well Fix - DlgResize_PositionControl () incorrectly checks return value from MapWindowPoints () CAppModule:
FIX - CAPPMODULE METHODS NOT Thread-Safe Fix - AddSettingChangeNotify () unusable in Multithreaded Apps Because of Delayed Initialization
CSTRING:
Fix - Delete () does not allow deleting more than the length of the string Fix - Append () can cause buffer overrun Fix - MakeReverse () can cause an infinite loop Fix - _cstrstr () unnecessarily inefficient Fix - FindOneOf () is not DBCS-Aware Fix - Format () Does Not Recognize% E Fix - Trimleft () And Trimright () Arefined Behavior With SBCS or Undefined Behavior with SBCS
CRECENTDOCUMENTLIST:
Fix - setMaxentries () HAS An IncorRect Assert Add Cstring Variant of The GetFromList () Method Add A Way To Replace Command IDs Used for the MRU List Add A Way To Replace Registry Key Name
Misc:
CMessageLoop :: Run () - improve the loop by checking bDoIdle before calling PeekMessage () CServerAppModule: Clean-up unused code Fix - CServerAppModule :: MonitorProc () - no need to call _endthreadex () Fix - CListBox :: GetText () and CComboBox :: GetLBText () (CString variants) do not check for LBERR / CB_ERR Fix - CAxPropertyPageImpl does not create ActiveX controls with ATL7 Fix - CDC :: GetTextExtentExPoint () missing CDC :: SetWindowExt () should have default value NULL for the lpSizeRet argument Fix - CPropertySheetWindow missing methods for PSM_INSERTPAGE, PSM_SETHEADERTITLE, and PSM_SETHEADERSUBTITLE; AddPage should return BOOL Fix - CMapScrollImpl :: SetScrollSize () uses wrong variable Fix - CHyperLink: WM_UPDATEUISTATE causes repaint without WM_PAINT Fix - CUpDownCtrl :: getPos () returns incorrect Value fix - cupdownctrl :: getpos32 () Doesn't Have Default Arg Value Fix - CMULTIPANESTATUSBARCTRL: ALWAYS USES SIZE GRIP for Positioning Pains fix - ctabctrl :: InsertItem () Should Return Int, NO t BOOL CReBarCtrl: Added LockBands () method Fix - CFont: uninitialized variable passed to DPtoLP Fix - CPrintDialogImpl: Crash when displaying Print Setup dialog Fix - CPageSetupDialogImpl :: PaintHookProc () - should use T * and return UINT_PTR instead of UINT Fix - CPrintJob does not support printing to a file Fix - CSplitterImpl: does not handle WM_CAPTURECHANGED - can get in an invalid state CRichEditCtrl: Add method for EM_SETTABSTOPS Fix - CFindFile :: GetFilePath () checks for a trailing slash, but does not use that Infogeneral:
Fix - Problems compiling with / Zc: forScope ( 'for' loop scope conformance) Use named constants instead of values for pixel sizes, buffer lengths, etc. Support building with Managed C (/ CLR) CMenuItemInfo - add run-time support for different versions of Windows CommCtrl.h change - additional fields in IMAGELISTDRAWPARAMS now depend on _WIN32_IE instead of _WIN32_WINNT Fix - Incorrect usage of CRegKey :: QueryStringValue () Fix - Operator = for GDI and USER wrappers leaks handle if it's managed variant Fix - GDI and USER wrappers break under self-assignments Fix -. Chaining messages with cracked handlers broken with ATL7 Initialize all variables and structures prior to use use new common control struct names10 Changes Between WTL 7.0 and 3.1
New classes and features:
Support for New Common Controls V6 Messages
Support for Visual Studio .NET and ATL 7.0
WTLAPP70 - New Appwizard for Visual Studio .NET
CThemeImpl - Implements Support for Windows XP Themes
Cmdicommandbarctrl - Implements Command Bar for MDI Applications
FIXES AND ENHANCEMENTS:
Command Bar:
Bogus assert in OnDestroy Check marks can be truncated in large font settings Use pT to access GetSystemSettings, DrawMenuText, DrawBitmapDisabled, Draw3DCheckmark, DoPopupMenu, DoTrackPopupMenu, TakeFocus, GiveFocusBack, so they can be overridden No hot-tracking if main window is not active Top level items not painted inactive if app looses activation while drop down menu is displayed Added Windows XP flat menus support drop-down menu does not close if clicked again (Windows XP only) Menu item text and accelerator text too close with some settings Keyboard can still access clipped menu items Added support for hiding keyboard navigation indicators until Alt key is pressed (system setting) Added AddIcon and ReplaceIcon variants for icon resources Image size calculated differently in different places Add support for 32-bit (alpha channel) bitmaps for Windows XP Fixed Width Calculation For Default Menu ItemscframeWindowImpl:
AddSimpleReBarBandCtrl sets toolbar extended styles without preserving old ones PrepareChevronMenu should not create menu items for buttons with TBSTATE_HIDDEN TPM_VERPOSANIMATION will not be defined in atlframe.h if atlctrlw.h is included first CreateSimpleToolBarCtrl - height might be too small if large font is used PrepareChevronMenu uses TB_GETBUTTONTEXT , Better Use TB_GetButtonInfo Chevron Menu Doesn't Close if Clicked Again (Windows XP Only) SHOULD CHECK LOCAL CLASSS for Superclassing Add Support for 32-Bit (Alpha Channel) Bitmaps for Windows XP
Update UI:
UiSettext CaN Clear Other Menu Item Flags Cupdateui :: UIUpdateState Assigns Value with | = instead of = added uisetdefault () and fix default state to work with menus
CSTRING:
GetBuffer () and GetBufferSetLength () should return NULL in out-of-memory condition Added missing methods: separate c-tors for LPCSTR and LPCWSTR, CollateNoCase, TrimRight and TrimLeft variants, Find variants, moved FormatV to public Fix _IsValidString usage FormatV incorrectly calculates Buffer size USAGE OF _TTOI Causes Problems with _tl_min_crt in vc7cdc:
GetTabbedTextExtent () should return DWORD instead of BOOL Add FillRect () that accept color index instead of a brush handle DrawDragRect () leaks regions and a brush Improved DitherBlt () - added brushes as arguments for used colors Added DrawShadowText () (uses LoadLibrary / GetProcaddress to Run On Older Windows
ClistViewCtrl:
SetItemState Should Use LVM_SETITETITETITATATETITEMCOUNT SHOULD RETURN A BOOL
CRICHEDITCTRL:
Added SetCharFormat () variant that accepts flags (for SCF_ALL) CharFromPos () should pass a pointer to POINTL in lParam GetTextRange () - should add Unicode variant for rich edit version> = 2 Added another FormatRange () that can accept a pointer to FORMATRANGE (Needed for Passing Null To Clear Cache)
ChyperLink:
Allow Overriding of Navigate and CalclabelRect Doesn't Handle Right or Center Alignment
CcolorDialog:
HAS Static Variables That Were Not Initialized with _TL_MIN_CRT Fixed Hookproc for Colorok Message - The Message Is Not Sent, But The Hook Proc IS Called Directly
Atlcrack.h:
MSG_WM_TIMER CRACK MACRO SHOULD CAST to TIMERPROC INSTEAD OF TIMERPROC * Add Cracked Handlers for All New Messages in Common Controls 6
Atlapp.h:
Fixed Problems with Atltraceui with atl7 #ifdefs for atl7 were in the Wrong Place
Atlctrls.h:
Add Support in Control Classes for All New Messages in Common Controls 6
CRECENTDOCUMENTLIST:
AtlcompactPath Corrupts Memory IF FileName Is Longer Than Requested Compact Size ReadfromRegistry IncorRectly Checks for Error When Reading from RegistryCsplitterWindow:
INCORRECT CALCULATION OF Middle Position 3D Border Now Drawn Only IF WS_EX_CLIENTEDGE IS SET
Printing:
Uses dword instead of an int for a job id cprintjob :: CancelPrintJob Shouldn't Have a return value
Misc:
CRegKey :: QueryValue and SetValue are deprecated in ATL7 Added direct support for ATL7 Replace ScreenToClient and ClientToScreen with MapWindowPoints to support RTL layout CFindFile :: GetFilePath (LPTSTR ...) returns path without the file name MDI: Updating client edge in WM_WINDOWPOSCHANGING causes minimize / maximize / restore animation problems, use WM_WINDOWPOSCHANGED Custom Draw: Added CCustomDraw :: OnSubItemPrePaint () overrideable method CFolderDialogImpl uses 'this' for BROWSEINFO.lParam instead of T * CImageList :: Destroy should not use Detach () ATL7 has its own AtlLoadString CPropertySheet does not close when you press X button Fixed problems for _U_STRINGorID and others that moved from atlbase.h to atlwin.h in ATL7 Add AtlMessageBox () that accepts either in-memory or resource strings CScrollImpl: fixed bug with scrolling child windows CPropertyPageImpl : Add new notification handlers to enable Direct Return Values (use #ifdef _wtl_new_page_notify_handlers to use the the us) Add atlinitcommoncont rols () to simplify use DDX: Fixed usage of the size of char arrays for DDX CPageSetupDialog: changed usage of CWndProcThunk because of changes in ATL7 Fix confusing precedence in expressions Removed forward declarations because default values for template arguments should not be specified in two places (we do not need them anyway) Win64: Fix / Wp64 warnings from 32-bit VC7 compiler caused by SDK headers Fix direct usage of English strings (they can be #defined to something else now) AtlGetCommCtrlVersion not defined if _ATL_DLL is in ATL 3.0 (and cmdbar is using it) appwizard:
Added manifest for Common Controls 6 Loading Rich Edit DLL should use HMODULE Should not use atlimpl.cpp for ATL7 Added message handler prototypes to generated files VERSION resource always has VALUE "OLESelfRegister" (now only for COM servers) Added option for putting implementation in CPP files d-tor for the thread manager class in MSDI project executed after the heap is destroyed Wrong settings when changing to a dialog project and back (AppWizard 6.0 only) Remove cut / copy / paste accelerators for form view and dialogs projects Fix toolbar bitmaps so they are not transparent (problem with Windows XP flat menus only) Used CMDICommandBarCtrl for MDI apps Add symbols required for VC7 Class Wizard to recognize an ATL project Changed default styles for the rebar, so it does look OK without cmdBar and with manifest Added setup programs For Both Appwizards Remove Ignored Resource Attributes: Moveable, Pure, Etc. (AppWizard 7.0 ONLY) Add call to defWindowproc to Winmain to Resolve Possible Pr Oblems if mslu is buysamples:
Updated toolbar bitmaps, added #ifdefs for ATL7, added manifest file for CommCtrl6, qualified _U_RECT with WTL namespace, updated use of deprecated CRegKey functions, added VC7 projects Added Alpha sample
11. Changes Between WTL 3.1 and 3.0
NEW CLASSES:
CPANECONTAINER - IMPLEMENTS A WINDOW THAT PROVIDES A TITLE BAR AND A Close Button (LIKE Explorer)
CDialogResize - An Mi Class That Allows Resizing of Dialogs (or any windows with child windows / controls)
CAXPROPERTYPAGEIMPL - IMPLEMENTS a Property Page That Can Host ActiveX Controls
FIXES AND ENHANCEMENTS:
CserverappModule Now Clears M_ HEVENTSHUTDOWN TO AVOID CALLING CLOSEHANDLE TWICE
CSTRING:
operator = now leaves original string intact if it's out of memory Fixed bad DWORD_PTR usage in TrimRight, TrimLeft, Replace, Remove Removed dependencies on CRT for projects that do not use it Insert - fixed string corruption in release builds Added optional floating point formatting (for projects That Uses CED) CEDIT AND CRICHEDITCTRL: SETSELALL AND SESELNE HAD REVERSED IMPLEMENTATION
ATLRES.H: Changed IDS So That They Are Compatible with MFC's AFXRES.H
Command Bar:
Added LoadMappedImages () Changed handling of left and right arrow keys so that they do not close context menus Add code to handle left / right arrow keys correctly on mirrored (RTL) systems Removed handler that eats parent window's WM_SETTINGCHANGE Fixed bitmap resource leak in Draw3DCheckmark Fixed incorrect usage of CharLower in OnMenuChar Fixed wrong color for the disabled items in hi-contrast mode Added code to gray menu items if main window is inactive Fixed keyboard mnemonic handling for IE 4 Fixed hook problems with multiple cmdbars in the same thread Added support for radio menu items added support for disabled top-level menu items (also added in CFrameWindowImpl :: PrepareChevronMenu) added keyboard shortcut (Alt /) to invoke chevron menu added support to override menu item length in a derived class
CBitmapButton:
BYPASSED Button DefWindowProc for Hover So That The Button Doesn't take Focus Added Bmpbtn_Autofire Extended Style
CDC:
Added_WTL_FORWARD_DECLARE_CSTRING DEFINE TO Allow Usage of Methods That Accept CString Fixed ErroItemstring Added GetCharWidth32 Added Drawiconex Method
CMenu:
Implement following missing methods: GetMenuDefaultItem GetMenuInfo GetMenuItemRect HiliteMenuItem IsMenu MenuItemFromPoint SetMenuDefaultItem SetMenuInfo GetMenuString - fixed to include space for terminating NULL character in returning stringGDI and USER classes should destroy the GDI / USER objects in Attach if GDI / USER resource is managed
CfraMewindowImpl:
OnToolTipText should not save tool tip text if it's not for a menu AddSimpleReBarBandCtrl now adds chevron style only for toolbars with buttons AddSimpleReBarBand (Ctrl) - calc band ID if not specified
CRECENTDOCUMENTLIST:
Fix - UpdateMenu Deletes Wrong Menu Item When THE List Is Empty Add Code To Allow Restrick The Number of Characters Displayed by MRU Menu Items
Update UI:
Added Support for Blocking Accelerators for Disabled Items Improved Search Code Assuming There no duplicate entries (and added checks for duplicates)
CSplitterWindow:
CSplitterWindowImpl should derive from CSplitterImpl
ATLCRACK.H: Added Handlers for Following New Messages: WM_APPCommand WM_NCXBUTTONDOWN WM_NCXBUTTONUP WM_NCXBUTTONDBLCLK WM_XBUTTONDOWN WM_XBUTTONUP WM_XBUTTONDBLCLK
Win64:
Dialog return value should use DWLP_MSGRESULT and SetWindowLongPtr CMenu :: InsertMenu, AppendMenu, ModifyMenu should have UINT_PTR for the menu ID Added appropriate type casts CFrameWindowImpl :: m_szAutoName - changed the size to fit the pointer value size CListViewCtrl :: SortItems should use LPARAM for user Data INSTEAD OF DWORD
Misc: Added optional mask argument to all methods for setting extended styles CMDIWindow :: MDIRestore - fixed to send WM_MDIRESTORE instead of WM_MDIICONARRANGE CListViewCtrl: Added SortItemsEx method CToolBarCtrl :: GetButtonInfo - fixed to return int instead of BOOL Added CToolBarCtrl :: SetButtonSize and SetBitmapSize that accept cx and cy instead of SIZE Printing: Changed how GetNewDevModeForPage works (comments in code) CFileDialogImpl :: _ OnTypeChange incorrectly calls pT-> OnSelChange instead of pT-> OnTypeChange CMultiPaneStatusBarCtrl :: GetPaneTipText - fixed to use index instead of and ID internally CWinDataExchange: Added references to arguments of DoDataExchange, so there are no level 4 warning even if the map is empty CPropertySheetWindow: Added new, IE 5.0 specific methods CPropertyPageImpl: Added new, IE 5.0 specific methods
AppWizard:
added calls to RemoveMessageFilter and RemoveIdleHandler in CMainFrame :: OnDestroy for COM server projects added scroll bars for HTML view CAppServerModule now handles -embedding as well as -automation corrected code in CMainFrame :: OnShowToolBar to correctly identify the toolbar in a rebar dialog based app code Now Derives from CupdateUI as Public