How do i force size of a dialog to match bmp dimensions? 
Author Message
 How do i force size of a dialog to match bmp dimensions?

I am using CW 2.001.01 on Windows 3.1.  I have a dialog box that I am
using as a splash screen.  The dialog box contains an ok button and a BMP.
 How can I force the dialog box's dimensions to match the BMP,
alternatively, how can I force the BMP to be centered in the dialog box?
Is there a better way to do this?
Thanks, Brad Vernon
BEVERNON



Fri, 25 Jun 1999 03:00:00 GMT  
 How do i force size of a dialog to match bmp dimensions?

Set the ?Image positions to x = 0, y = 0 width = full height = full in
the scren designer. This will cause the BMP to "Stretch" to the full
size of the window it is in.

Quote:

> I am using CW 2.001.01 on Windows 3.1.  I have a dialog box that I am
> using as a splash screen.  The dialog box contains an ok button and a BMP.
>  How can I force the dialog box's dimensions to match the BMP,
> alternatively, how can I force the BMP to be centered in the dialog box?
> Is there a better way to do this?
> Thanks, Brad Vernon
> BEVERNON

--
 ------------------------------------------------------------
 Software By Ragazzi, Sausalito, CA
 ------------------------------------------------------------
 Business  : Specializing in Clarion For Windows Add-On Products!

 "Begin a new era of productivity; leave the mundane aspects of
programming to us!"
 ------------------------------------------------------------
 Kevin B. Erskine, Sausalito, CA
 ------------------------------------------------------------
 Personal  : Having fun, enjoying life; while I'm young enough to! <g>

 Just "Sitting on the dock of the bay!" and relaxing! =:-{)
 ------------------------------------------------------------



Fri, 25 Jun 1999 03:00:00 GMT  
 How do i force size of a dialog to match bmp dimensions?



Quote:
> I am using CW 2.001.01 on Windows 3.1.  I have a dialog box that I am
> using as a splash screen.  The dialog box contains an ok button and a
BMP.
>  How can I force the dialog box's dimensions to match the BMP,
> alternatively, how can I force the BMP to be centered in the dialog box?
> Is there a better way to do this?
> Thanks, Brad Vernon
> BEVERNON

Pretty easy to center the bitmap.  You did put it by populating a control,
didn't you?  All you need to do is:

?Image1{PROP:XPos} = ( 0{PROP:Width}-?Image1{PROP:Width} )/2
?Image2{PROP:YPos} = (0{PROP:Height}-?Image1{PROP:Height} )/2

Put this in "after opening the window."

You might not want to center it vertically, it's a matter of how you like
it to look.

You can set the size of the window to match the image if you want.  It's
pretty easy in the window formatter, or at run time.  Just put position of
the image at 0,0.  At run time, after opening the window:

0{PROP:Width} = ?Image1{PROP:Width}
0{PROP:Height}= ?Image1{PROP:Height}

--
Tom Ruby
--------------------------------------------------------------------

http://www.netins.net/showcase/tomruby/
I don't know anything.  I just have to make this stuff work.



Mon, 28 Jun 1999 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Dialog boxes forcing global variables...

2. How to auto fit bmp size

3. tcl 8.2 regexp not doing non-greedy matching correctly

4. IMAQ pattern matching template size limit

5. quick newbie question, please help, .bmp of code attached - code.bmp [0/4]

6. Rank matching on assumed size array argument

7. Arrghh - bmp != bmp

8. how can i make 2 grids match up in sizes

9. Dialog box size in ME vs. XP

10. Type 1 Font Dialog Size

11. tk_getOpenFile - dialog box size configurable somehow?

12. How setting minimal size of a Dialog ?

 

 
Powered by phpBB® Forum Software