Jump to content

webvw.dll thumbnails


Will66
 Share

Recommended Posts

Seen some posts here about displaying thumbnails in a gui with no outcomes.

I've managed previously to display thumbnails in client side javascript using

<object id="Thumbnail" classid="clsid:1D2B4F40-1F10-11D1-9E88-00C04FDCAB92" style="width: 150px; height: 150px;"></object>

the script to display it is like: Thumbnail.displayFile("yourdir\\yourfile.jpg");

The ThumbCtl Control is called from webvw.dll, I've been using autoit for less than a week and hoping someone might now how to call the dll and display the thumb in an autoit gui?

Link to comment
Share on other sites

Here's a c++ project using thumbnails.

thanx, saw that one, got the general idea but c++ is ~~}}....tricky

Finding the olewiew.exe info in autoit help was a big help.

Here's where i'm upto, worx on my XP, and win 2000.

#include <GUIConstants.au3>

$Form1 = GUICreate("AForm1", 633, 454, 193, 115)
$Obj1 = ObjCreate("ThumbCtl.ThumbCtl.1")
$Obj1.displayFile("C:\WINDOWS\Web\Wallpaper\Azul.jpg")
$Obj1_ctrl = GUICtrlCreateObj($Obj1,120, 32, 120, 100)


$Obj2 = ObjCreate("ThumbCtl.ThumbCtl.1")
$Obj2.displayFile("C:\WINDOWS\Web\Wallpaper\Follow.jpg")
$Obj2_ctrl = GUICtrlCreateObj($Obj2,260,32, 100, 100)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Obj1_ctrl
            MsgBox(0,"Obj1","yes");was $Obj1 clicked?.....that won't work :)
    EndSwitch
WEnd

The plan from here is to file-open, select a folder, display all images as thumbnails with maybe include paging for larger directories, then when onclick a thumbnail full size image displays in an adjacent panel.

Seems i have to use a seperate $aNewVariable= ObjCreate("ThumbCtl.ThumbCtl.1") for each instance of a thumbnail?

A pointer on creating them dynamically would be good.

Cheers

Link to comment
Share on other sites

Bump,

Hoping someone might test the script above to see if it works for them because it works fine on my xp home pc but its not working on 2Kpro machines at work.

I suspect it might be a registration issue because I added/created the object using Kodak for the gui....possibly Kodak may have registered the webvw.dll or marked the activex control thumbCtl.thumbCtl safe for scripting on my xp machine....i'm only guessing here because i'm not game to play around with any registry settings with my level of experience on this type of issue......especially on the machines at work.

also i'm using the zip(uninstalled version of autoit) at work.

Please...

Link to comment
Share on other sites

Appologies if this is becomming like a diary.....I'm having a hard time "moving on"

Works as a .HTA file, but not for autoit...on some mahines WHY?:

thumb.hta - works on 1 xpPro, 1 xpHome and 3 win2000 Pro machines(no failures to date):

<body bgcolor=green>
<div id="thumb1">
<OBJECT CLASSID="clsid:1d2b4f40-1f10-11d1-9e88-00c04fdcab92" 
onmouseover="this.displayFile('C:\\WINDOWS\\Web\\Wallpaper\\Autumn.jpg');" 
onmouseout="this.displayFile('C:\\WINDOWS\\Web\\Wallpaper\\Bliss.bmp');" 
id=Thumbnail width=120 height=115/>

</OBJECT>

</div>
&lt;script language="vbscript">
Set mydiv=document.all.Thumbnail
'Set mythumb = CreateObject("thumbCtl.thumbCtl.2")
mydiv.displayFile( "C:\WINDOWS\Web\Wallpaper\Bliss.bmp" )
</script>
</body>

Works on 2 of my xp machines, fails on 3 x win2000Pro:

#include <GUIConstants.au3>

$Form1 = GUICreate("AForm1", 633, 454, 193, 115)
$Obj1 = ObjCreate("ThumbCtl.ThumbCtl.1")
$Obj1.displayFile("C:\WINDOWS\Web\Wallpaper\Autumn.jpg")
$Obj1_ctrl = GUICtrlCreateObj($Obj1,120, 32, 120, 100)


$Obj2 = ObjCreate("ThumbCtl.ThumbCtl")
$Obj2.displayFile("C:\WINDOWS\Web\Wallpaper\Bliss.bmp")
$Obj2_ctrl = GUICtrlCreateObj($Obj2,260,32, 120, 100)
GUISetState(@SW_SHOW)


While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
            EndSwitch
WEnd
Edited by Will66
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...