Fog Creek Software
Discussion Board




Problem with CWindowImpl::Create

Somebody out there probably knows the answer to this.

I have a server written in Visual C++ 6 with ATL, that sends out requests to a third party component and waits to receive windows messages sent back by it.

Everything works fine when I'm running in Debug build, but in Release build the call to CWindowImpl::Create fails. Digging deeper I discover that the call to GetClassInfoExA() inside AtlModuleRegisterWndClassInfoA() is failing - GetLastError() returns ERROR_CLASS_DOES_NOT_EXIST.

In both cases, the class string being passed in is the ANSI string "AtlAxWin". Is this an ANSI / Unicode issue with the class string? I'm pretty sure both builds are running as ANSI.

I've tried a google search which lists a few possibilities, but have tried them to no avail.

Better Than Being Unemployed...
Monday, August 18, 2003

Are you using DECLARE_WND_SUPERCLASS?  If so, then make sure the OrigWndClassName parameter is an existing window class name.

If you aren't using this macro, something is wacky, as GetClassInfoEx should only be called when you are.

Ken
Monday, August 18, 2003

*  Recent Topics

*  Fog Creek Home