Microsoft KB Archive/102026

From BetaArchive Wiki

PRB: Unicode ChooseColor() Help Button Crashes Common Dialog

Q102026



The information in this article applies to:


  • Microsoft Win32 Software Development Kit (SDK), on platform(s):
    • the operating system: Microsoft Windows NT, versions 3.1, 3.5, 3.51





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.

Additional query words:

Keywords : kbCmnDlg kbCmnDlgColor kbOSWinNT kbGrpDSUser
Issue type :
Technology : kbWin32SDKSearch kbAudDeveloper kbSDKSearch kbWin32sSearch


Last Reviewed: October 27, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.