PRB: Unicode ChooseColor() Help Button Crashes Common Dialog
PSS ID Number: 102026
Article Last Modified on 10/27/2000
The information in this article applies to:
- Microsoft Win32 Software Development Kit (SDK), when used with:
- the operating system: Microsoft Windows NT 3.1
- the operating system: Microsoft Windows NT 3.5
- the operating system: Microsoft Windows NT 3.51
This article was previously published under Q102026
SYMPTOMS
A Unicode compiled program, or a program that explicitly calls the
ChooseColorW() function, may suffer an access violation in the common
dialog boxes if the Help button in the ChooseColor() dialog box is chosen.
CAUSE
This problem may not be 100-percent reproducible. Because of the way that
the program loader loads code into memory, a certain address referenced by
the common dialog box Help button logic may or may not be valid depending
on what other applications have been run, what application is calling
ChooseColorW(), and the order in which these programs are run.
WORKAROUND
The following are suggested workarounds:
- Try running an ANSI-compiled application that uses the common
dialog boxes, and open one of the common dialog boxes before you run
the application having this problem.
- A workaround for new applications developers is to call
ChooseColorW() with a hook function (see the Windows Software
Development Kit documentation for more information on common dialog
box hook functions), handle the Help button logic, and return TRUE
from the hook function to bypass the standard common dialog box
push-button code.
Keywords: kbCmnDlg KB102026
Technology: kbAudDeveloper kbOSWinNT310 kbOSWinNT350 kbOSWinNT351 kbOSWinNTSearch kbOSWinSearch kbSDKSearch kbWin32SDKSearch kbWin32sSearch