HELP: ST/V PM Startup Dialog and Bitmaps 
Author Message
 HELP: ST/V PM Startup Dialog and Bitmaps

Hello,

The programming reference of ST/V PM 2.0 states on pg. 228 how to make a customized
startup dialog. I've modified the example in the EXAMPLES\VPMLOGO subdir
and have included the files vpmlogo.rc vpmlogo.dlg and vpmlogo.h:

--------------------------Beginn of vpmlogo.h-------
#define FAWULM                     2
#define LOGO                        5000
--------------------------End of vpmlogo.h----------

--------------------------Beginn of vpmlogo.rc------
#include <os2.h>
#include "vpmlogo.h"

BITMAP LOGO "FAWLOG15.BMP"

rcinclude vpmlogo.dlg
--------------------------End of vpmlogo.rc---------

--------------------------Beginn of vpmlogo.dlg-----
DLGINCLUDE 1 "VPMLOGO.H"

DLGTEMPLATE DID_OK LOADONCALL MOVEABLE DISCARDABLE
BEGIN
    DIALOG  "", DID_OK, 97, 85, 203, 111, FS_NOBYTEALIGN | FS_SCREENALIGN |
            WS_VISIBLE | WS_SYNCPAINT
    BEGIN
        CTEXT           "Smalltalk/V for OS/2, Release 2.0", 258, 8, 34, 188,
                        8, DT_VCENTER
        CTEXT           "NSB-Editor", 259, 8, 93, 188, 8
        CTEXT           "entwickelt mit", 3, 8, 51, 188, 8, DT_VCENTER
        CTEXT           "(C) 1993 FAW, Ulm", 4, 8, 75, 188, 8, DT_VCENTER
        CONTROL         LOGO, LOGO, 92, 10, 20, 16, WC_STATIC, SS_BITMAP |
                        WS_GROUP | WS_VISIBLE
    END
END
--------------------------End of vpmlogo.dlg--------

The dialog is properly displayed if I omit the "CONTROL" statement in
vpmlogo.dlg but when included the dialog does not get displayed.
Since the open() routine in vpmlogo.c only uses DosQueryModuleHandle()
and WinLoadDlg() to display the dialog I am wondering whether I need
to call GpiLoadBitmap() explicitly and if so at what point.

I anybody has some insights into the matter please help me!

Thanks,

Bernhard Kohlhaas

--
Bernhard Kohlhaas
-------------------------------------


-------------------------------------
#include <StandardDisclaimer>



Sun, 04 Aug 1996 21:49:14 GMT  
 HELP: ST/V PM Startup Dialog and Bitmaps

   The dialog is properly displayed if I omit the "CONTROL" statement in
   vpmlogo.dlg but when included the dialog does not get displayed.

   I anybody has some insights into the matter please help me!

You hit a well known bug in OS/2. Congratulations!  The point is: OS/2 does not
search for your bitmap on its own (it only looks in the program V.exe), so you
have to load the bitmap manually during the creation of the dialog.  Piece of
cake? Yes but there is a minor problem: if a dialog contains a bitmap and the
bitmap is not in the same place as your program then the dialog is not created
at all! So you never get a chance to load the bitmap ...

I have written a short text on this subject and some example code.
You can ftp this at mpi-sb.mpg.de in directory pub/incoming.
The filenames are logo.readme and logo.zip.

        Andreas Toenne
--

        Andreas Toenne                  Voice:  x49 681 5846272
        Max-Planck-Institut             Office: x49 681 302 5363

        Im Stadtwald
        66123 Saarbruecken, Germany



Fri, 09 Aug 1996 17:50:05 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. ST vs Java vs ST vs ....

2. dialog bitmaps

3. Clock Problem (VA ST vs. Dolphin ST)

4. Comparison: ST-80 vs. ST-V

5. ST-80/OS/2 vs. ST-80/Windows

6. Visual Fortran startup dialog

7. startup dialog

8. Changing VA startup dialog

9. Bitmaps to PCX in ST/V for OS/2

10. Bitmaps to PCX in ST/V on OS\2

11. Displaying Bitmaps in ST/V panes???

12. !st PM prog

 

 
Powered by phpBB® Forum Software