View Full Version : bitmap and activex control in maxscript
namoi 03-05-2005, 12:27 PM I've posted a thread a few days ago about displaying a bitmap in a rollout without a border.
An answer was to use an activex control to do it and it seems to me that's the good way.
Problem is, i can't find any simple control to do this.
Do someone know which control is available to diaplay a simple bmp file in a rollout ?
Thanks
|
|
LoneRobot
03-05-2005, 01:21 PM
im not sure exactly what you're trying to accomplish, but you could look into "Imgtag" check the MXS help for what it does. If im not mistaken, you will get a border on whatever activeX control you use anyway? but i might have just mis-understood you.
namoi
03-05-2005, 02:06 PM
I've tried the imgtag and it works... but the quality of the dispalyed bitmap is degraded comparing with the use of the bitmap properties.
So I sum up :
1st way :
imgtag bmp1 bitmap: (bitmap 150 150)
on myrollout open do
(
bmp1.bitmap = (openBitmap "C:\Program Files\3dsmax 7\UI\MacroScripts\mybitmap.bmp")
)
---> works well (I got no border around the bitmap), but quality is ugly...
2nd way:
bitmap bmp1 bitmap: (bitmap 150 150)
on myrollout open do
(
bmp1.bitmap = (openBitmap "C:\Program Files\3dsmax 7\UI\MacroScripts\mybitmap.bmp")
)
---> quality is ok, but i got the border around the bitmap and i don't want it.
Someone can help ?
namoi
03-05-2005, 02:27 PM
Ok, find my solution. The problem of "quality" using imgtag was linked to the transparent property which is set by default to 0 0 0 (perfect black) and i was using this color.
Thanks again
LoneRobot
03-05-2005, 07:06 PM
glad you sorted it out. :)
galagast
03-06-2005, 09:20 AM
i tried the 3 methods being mentioned on this thread...
rollout mytest "mytest"
(
local bmppath = "D:\galagast.jpg" -- rename this to your bitmap path
local mybmp = openbitmap bmppath
imgtag test_tag "map" bitmap:mybmp transparent:blue enabled:false
button press_bot "PRESS" pos:[5,10]
activexcontrol test_acx "D:\galagast.jpg" width:120 height:120 pos:[0,100]
button test_bot width:100 height:100 images:#(bmppath,undefined,1,1,1,1,1)
)
createdialog mytest 120 340
i had a couple of questions tho...
- i wonder if there's a way to disable the transparency in the ImgTag.
(good thing about this is you could place a button on top of it if its disabled.)
- is thera a way to use a variable (containing the string) for an ActiveX control?
- (an advantage to this, i guess, is that you could drag the activeX image on to your scene or material editor)
- is there a way to offset the image inside activeX? (just as pudgerboy mention, we'd get a border around activeX)
- a double right click seems to open-up my browser :)
- (no problems with button images so far)
there myt be other ways or workarounds out there...
LoneRobot
03-07-2005, 01:17 PM
ugly fix but i tried just putting a groupbox over the bitmap to hide the bevel.
rollout test "test" width:100 height:188
(
bitmap thingy "" pos:[10,7] width:80 height:84 fileName:"test.jpg"
GroupBox grp1 "" pos:[10,1] width:80 height:90
)
createdialog test 100 100
ugly - yes
works - sort of :shrug:
CGTalk Moderation
03-07-2005, 01:17 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.