Consultor Eletrônico



Kbase P97473: SYSTEM-DIALOG FONT iFontNumber UPDATE lOK crashes session when application uses CreateWindowExA API
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   07/10/2008
Status: Verified

SYMPTOM(s):

Application using Windows CreateWindowExA API to implement custom controls

The SYSTEM-DIALOG FONT is being invoked after the CreateWindowExA API has been called to instantiate Windows classes

Progress session crashes upon changing the font (pressing OK in the system dialog)

Crash stack trace from Windows 2000 contains:
wwEachWidget
GetDesktopWindow
EnumChildWindows
wwGoThroughAllWidgets
wwStoreNewFont

FACT(s) (Environment):

Progress 9.1x
OpenEdge 10.x
Windows NT 32 Intel/Windows 2000

CAUSE:

Progress resets the font on all Progress windows and widgets when a font is being changed with SYSTEM-DIALOG FONT statement. The code which does this assumes that all children of a Progress window have been created by Progress.

Objects created via the CreateWindowExA API (or variants) are the base Windows classes, not the subclasses Progress expects. They do not have the logic Progress requires to change the fonts, and trying to invoke the non-existing logic is what triggers the crash.

FIX:

Use an alternative technique to implement the desired functionality.
In most cases this can be achieved by using appropriate ActiveX controls.