Dec 312017
 
C source on creating OS/2 PM dialog box dynamically (from Microsoft Onli.
File DYNDLG.ZIP from The Programmer’s Corner in
Category OS/2 Files
C source on creating OS/2 PM dialog box dynamically (from Microsoft Onli.
File Name File Size Zip Size Zip Type
APP 352 181 deflated
APP.C 2438 950 deflated
APP.DEF 595 280 deflated
APP.H 903 308 deflated
APP.ICO 284 69 deflated
APP.LNK 80 71 deflated
APP.RC 2096 771 deflated
APPCMD.C 1760 546 deflated
APPPAINT.C 474 283 deflated
README 2223 891 deflated
WNDPROC.C 6622 2092 deflated

Download File DYNDLG.ZIP Here

Contents of the README file


This program demonstrates how to use WinCreateDlg() display a dialog box from
a template in memory rather than from a resource file.See the wndproc.c
file in the WM_COMMAND processing for the section of code that creates the
dialog box.

The format of the memory template is as follows.

DLGTEMPLATE structure Header
-------------------------------------------
USHORT cbTemplate; overall length of template block
USHORT type;
USHORT codepage; codepage to be used to display text in the dialog
box
USHORT offadlgti; offset to array of DLGTITEMs
USHORT fsTemplateStatus;
USHORT iItemFocus; item to get focus initially. if 0, then focus goes
to first item who can have focus
USHORT coffPresParams; reserved. Should be 0 for PM 1.1
DLGTITEM adlgti[1]; array of DLGTITEMs


DLGTITEMS structure
-------------------------------------------
USHORT fsItemStatus; Reservedshould be 0 for PM 1.1

USHORT cChildren; number of dialog item child windows owned by this
item. Child items should follow their parent in
the DLGTITEM array.

USHORT cchClassName; Class name length, if 0, then offClassName field
contains a WC_ constant or a value refering to a
class name.

USHORT offClassName; Class name text or constant.
USHORT cchText; length of text for this item.
USHORT offText; offset to text string in DLGTEMPLATE

ULONG flStyle; Window style of the control. 16 bits are standard
style bits. The remaining 16 bits depend on the
class of the control.

SHORT x; coordinates of the control in dialog box units
SHORT y;
SHORT cx;
SHORT cy;
USHORT id; ID for this control.
USHORT offPresParams; Reserved. Should be 0.
USHORT offCtlData; Offset to control specific data for the dialog
item. A value of 0 indicates no control data for
this item.



More DLGTITEMs structures for each control in the dialog box.
.
.
.

------------------
Followed by extra data that is refered to in the control structures.
Such as:

Text for the controls.
Class names for the controls.
CtlData



-------------------


 December 31, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)