Suddenly found that WTL updated to 9.0.4140, then contrasted the 8.1.12085.
Let's see what the big changes are in Atlapp.h.
Line 61st:
#if defined (_sysinfoapi_h_) && defined (not_build_windows_deprecate) && (_win32_winnt >= 0x0501) #include <VersionHelpers.h> #endif
XP and the system above can be used in VersionHelpers.h some of the more convenient tool functions to determine the Windows version, such as: Iswindowsxporgreater (), Iswindowsxpsp3orgreater (), Iswindows8orgreater (), while the VC2013 compile also warns that APIs such as GetVersionEx are obsolete, WTL 9 introduces these new APIs and overwrites the previous WTL version, such as:
inline bool Isvista () {#ifdef _versionhelpers_h_included_return:: Iswindowsvistaorgreater (); #else//!_versionhelpers _h_included_osversioninfo ovi = {sizeof (OSVERSIONINFO)}; BOOL BRet =:: GetVersionEx (&ovi); return ((BRet! = FALSE) && (ovi.dwmajorversion >= 6)); #endif//_versionhe Lpers_h_included_}
inline bool IsWin7 () {#ifdef _versionhelpers_h_included_return:: Iswindows7orgreater (); #else//!_versionhelpers_h_ Included_osversioninfo ovi = {sizeof (OSVERSIONINFO)}; BOOL BRet =:: GetVersionEx (&ovi); return (BRet! = FALSE) && (ovi.dwmajorversion = 6) && (OVI.DWMINORV Ersion >= 1)); #endif//_versionhelpers_h_included_}
Line 1165th:
Genericwndclass-generic window class usable for subclassing//with dialog templates to specify a placeholder to be subclassed//specify as a custom control with class name wtl_genericwindow//call Rregister () before creating dialog (for example, in WinMain) namespace Genericwndclass{inline lpctstr GetName () {return _t ("Wtl_genericwindow");} Inline ATOM Register () {wndclassex WC = {sizeof (wndclassex)};wc.lpfnwndproc =::D efwindowproc;wc.hinstance = Modulehelpe R::getmoduleinstance (); wc.hcursor =:: LoadCursor (NULL, idc_arrow); wc.hbrbackground = (Hbrush) (Color_window + 1); Wc.lpszclassname = GetName (); Atom Atom =:: RegisterClassEx (&WC); Atlassert (Atom! = 0); return atom;} Inline BOOL Unregister () //needed for DLLs or tmp Use{return:: Unregisterclass (GetName (), Modulehelper::getmodu Leinstance ());}; Namespace Genericwndclass
This is three new functions, see note know, is used for subclass and so on, have not seen how to use the specific. Comments in WTL author actually wrote a typo, hey.