Posted: . At: 11:42 AM. This was 4 months ago. Post ID: 18974
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.


Complete Windows XP themes source code.


I have uploaded the complete source code of the Windows XP themes, this should be very useful if you wish to make a nice theme for a Linux desktop.

Here is the themeon.reg file. This will set the current theme.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemeManager]
"DllName"="%windir%\\resources\\0409\\themes\\business\\business.mstheme"
"ThemeActive"="1"
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~

And the themeoff.reg to turn off the theme.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\ThemeManager]
"ThemeActive"="0"

~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~                                                                                                                                                                                                                                        
~

And another very useful code sample. The themeui/settings.h file.

//
// New message IDs
//

#define MSG_DSP_SETUP_MESSAGE    WM_USER + 0x200



#define SZ_REBOOT_NECESSARY     TEXT("System\\CurrentControlSet\\Control\\GraphicsDrivers\\RebootNecessary")
#define SZ_INVALID_DISPLAY      TEXT("System\\CurrentControlSet\\Control\\GraphicsDrivers\\InvalidDisplay")
#define SZ_DETECT_DISPLAY       TEXT("System\\CurrentControlSet\\Control\\GraphicsDrivers\\DetectDisplay")
#define SZ_NEW_DISPLAY          TEXT("System\\CurrentControlSet\\Control\\GraphicsDrivers\\NewDisplay")
#define SZ_DISPLAY_4BPP_MODES   TEXT("System\\CurrentControlSet\\Control\\GraphicsDrivers\\Display4BppModes")

#define SZ_VIDEO                TEXT("Video")
#define SZ_FONTDPI              TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\FontDPI")
#define SZ_FONTDPI_PROF         TEXT("SYSTEM\\CurrentControlSet\\Hardware Profiles\\Current\\Software\\Fonts")
#define SZ_LOGPIXELS            TEXT("LogPixels")
#define SZ_DEVICEDESCRIPTION    TEXT("Device Description")
#define SZ_INSTALLEDDRIVERS     TEXT("InstalledDisplayDrivers")
#define SZ_SERVICES             TEXT("\\REGISTRY\\MACHINE\\SYSTEM\\CurrentControlSet\\Services\\")
#define SZ_BACKBACKDOT          TEXT("\\\\.\\")
#define SZ_DOTSYS               TEXT(".sys")
#define SZ_DOTDLL               TEXT(".dll")

#define SZ_FILE_SEPARATOR       TEXT(", ")

#define SZ_WINDOWMETRICS        TEXT("Control Panel\\Desktop\\WindowMetrics")
#define SZ_APPLIEDDPI           TEXT("AppliedDPI")

#define SZ_CONTROLPANEL         TEXT("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Control Panel")
#define SZ_ORIGINALDPI          TEXT("OriginalDPI")



//==========================================================================
//                          Typedefs
//==========================================================================


extern HWND ghwndPropSheet;
extern const TCHAR g_szNULL[];

#define CDPI_NORMAL     96      // Arbitrarily, 96dpi is "Normal"

// information about the monitor bitmap
// x, y, dx, dy define the size of the "screen" part of the bitmap
// the RGB is the color of the screen's desktop
// these numbers are VERY hard-coded to a monitor bitmap
#define MON_X   16
#define MON_Y   17
#define MON_DX  152
#define MON_DY  112
#define MON_W   184
#define MON_H   170
#define MON_RGB RGB(0, 128, 128)
#define MON_TRAY 8

INT_PTR CALLBACK GeneralPageProc    (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
BOOL CALLBACK _AddDisplayPropSheetPage(HPROPSHEETPAGE hpage, LPARAM lParam);
void AddFakeSettingsPage(IThemeUIPages *pThemeUI, PROPSHEETHEADER * ppsh);
INT_PTR CALLBACK MultiMonitorDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam);
int ComputeNumberOfDisplayDevices();
int FmtMessageBox(HWND hwnd, UINT fuStyle, DWORD dwTitleID, DWORD dwTextID);
HBITMAP FAR LoadMonitorBitmap( BOOL bFillDesktop );
int DisplaySaveSettings(PVOID pContext, HWND hwnd);

~

The Windows 11 codebase, released by Microsoft in 2021, bears little direct resemblance to the aging Windows XP source code, initially introduced in 2001. Over more than two decades, the evolution of Microsoft’s operating systems has witnessed substantial architectural shifts, security enhancements, and the incorporation of modern technologies. Consequently, the overlap between Windows XP and Windows 11 code is minimal, if not entirely nonexistent.

Windows XP, characterized by its now archaic codebase, lacked several fundamental features and security mechanisms inherent in contemporary operating systems. Windows 11, on the other hand, is built on the Windows 10 foundation, which underwent substantial refinements in terms of security, performance, and user experience. The architectural discrepancies between Windows XP and Windows 11 are profound, rendering a direct code lineage nearly inconceivable.

One of the prominent factors differentiating the two operating systems is the transition from the traditional Win32 application model to the Universal Windows Platform (UWP) in Windows 11. This paradigm shift brings about a divergence in code structures and APIs, making it implausible for substantial portions of Windows XP code to persist in Windows 11. The advent of UWP underscores the modernization efforts and the departure from legacy components, further distancing Windows 11 from the aging XP codebase.

Moreover, the security landscape has evolved significantly since the release of Windows XP. With the prevalence of cyber threats and the imperative for robust defense mechanisms, Windows 11 incorporates sophisticated security features such as hardware-based security through technologies like TPM 2.0 and Windows Hello. These advancements necessitate a fundamental reengineering of the codebase, rendering it incompatible with the antiquated security infrastructure of Windows XP.

The graphical user interface (GUI) is another arena where the disparity between Windows XP and Windows 11 is stark. Windows 11 introduces a redesigned, modern interface with features like Snap layouts, Widgets, and a centered Start menu. The underlying code for these features is inherently different from the code governing the classic Start menu and the Aero Glass design of Windows XP. Consequently, the absence of visual and interaction paradigms from Windows XP in Windows 11 reinforces the notion that minimal, if any, code from the former is present in the latter.

While it is plausible that certain principles or design philosophies established in Windows XP may have influenced the broader design principles of subsequent Windows versions, this influence is conceptual rather than code-centric. Microsoft’s commitment to continuous improvement and innovation has driven the development of Windows operating systems, resulting in a codebase that is a cumulative product of successive iterations and technological advancements.

Download the archive here: https://securitronlinux.com/doomstuff/xpthemes.tar.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.