Thanks, but it didn't work. I have the same code in WM_INITDIALOG.

And yes, I am using MFC and Win32. I'm using both because the original code comes from an older Win32 program, and I haven't fully converted it to MFC yet.