2024-12-22

Release vs. Debug Mode Strangeness in WTL

I was working on writing a Windows based application for work that was using WTL and DockingWindows and I was getting the strangest bug. When I used Visual Studio 2005 Express and compiled in Debug Mode, everything worked fine, but in Release Mode, one of the docking windows which was an “Owner Drawn” ListViewCtrl would never draw. The docking window container would appear, but the background would never fill and the list would certainly never show. Strangely, it ran just fine if it was compiled in VS 2005 Professional.