Determining what style bit is set from inside your program

Article ID: 895
Last updated: 05 Feb, 2008
Article ID: 895
Last updated: 05 Feb, 2008
Revision: 1
Views: 2597
Posted: 17 Dec, 1997
by Dean J.
Updated: 05 Feb, 2008
by Dean J.
Problem


I need to find out what style bits are set for a particular control, dialog, window, etc. How can I access that from inside my program? For example, can I determine whether a zStringEdit is currently read-only?


Action


The styleValue() function from zWindow returns a long containing the style for the window, control, etc.

The values, i.e. ES_READONLY for the read-only example, can be found in the SDK documentation for your platform. In this case, the command:

D:MSDEVinclude>egrep ES_READONLY *.*
returns:
WINRES.H:#define ES_READONLY     0x00000800L
WINUSER.H:#define ES_READONLY 0x0800L

The egrep utility enables searching and pattern matching in a text file. This utility is readily available on the internet.

The style bits that can be set can be found in the platform guides for zApp.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 895
Last updated: 05 Feb, 2008
Revision: 1
Views: 2597
Posted: 17 Dec, 1997 by Dean J.
Updated: 05 Feb, 2008 by Dean J.

Others in this category