Problem:
This application demonstrates a method of using the Visual Style (XP-Style) controls in a Dialog System Application.
Resolution:
BUILD W/RELEASE: Net Express v4.0 and up
INTRODUCTION
==========
The demo should run on all Win 32 systems but will show the visual style only on Windows XP and later systems, where the visual style layout is activated.
The Visual Style requires an EXE build of the start program, because the resource file must be linked in. I.e. it will not show the visual style in an INT or GNT build.
OPERATION:
========
This application uses Dialog System and must be linked with the shared COBOL run-time. You can execute libman.exe from a NetExpress command prompt.
The Visual Style:
===========
The same base name has to be used for the .RC resource file and for the EXE. The resource file can be edited using a text editor like notepad. Refer to the manifest file within the resource file.
The NoBorder program:
===============
Dialog System Entry-Files are generated with a Windows border property, which is not the same as the border property in Dialog System.
This Windows border leads the a nice looking shadow effect in Dialog System within the classical style, but leads to an ugly line in the XP Visual Style.
This demo shows, how to get rid off this line using the NoBorder program by a CALLOUT from Dialog System.
Place the following lines in the global dialog and call the procedure in any Window-Created.
SET-BORDER-OFF
MOVE-OBJECT-HANDLE $WINDOW WINDOW-ID
CLEAR-CALLOUT-PARAMETERS $NULL
CALLOUT "NoBorder" 3 WINDOW-ID
Run the demo and click on the "Show Dialog Box" button to view the ugly line. There, press the "NoBorders on XP Style" button to run the NoBorder CALLOUT. See the different effects of "Unshow the DialogBox" and "Delete DialogBox".
FILES:
======
Visual-Style.RC
- resource file, must have the same name as the EXE
Visual-Style.EXE.MANIFEST - manifest file, referenced in the resource file
Visual-Style.APP - project file
Visual-Style.cbl - COBOL main program
Visual-Style.gs - screenset
visual-style.cpb - copy book
NoBorder.cbl - callout program, called from the Screen Set
BordersOff.cbl - recursive program to improve the visual style
NOTE:
=====
To use the demo without the APP from a Net Express Command Prompt:
rc visual-style.rc
cbllink Visual-Style.CBL NoBorder.CBL Visual-Style.res
References:
==========
Micro Focus SupportLine Newsletters:
http://www.microfocus.com/mfnewsletter/technicalarticles/20050701-002.asp
http://www.microfocus.com/000/XP-style-21_tcm21-5782.pdf
Microsoft:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwxp/html/xptheming.asp
Themed functions:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceinternet5/html/wce50grfthemesupportfunctions.asp
==========================================================
Keywords: demonstration, sample, example, demo, Dialog System, itmunsel.zip
demo.ex
demo.ne