AutoHotkey Community

It is currently May 27th, 2012, 5:04 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 94 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
 Post subject:
PostPosted: March 2nd, 2010, 5:59 pm 
Offline

Joined: October 15th, 2006, 2:39 am
Posts: 93
Location: Croatia
Details pane is at the bottom, preview pane is placed at the right; see Organize->Layout->Details/Preview/Navigation pane.

Just had a quick look at MSDN and Visual Studio samples. Adding preview pane handler means making a viewer plugin for Explorer, eg. just like Adobe Reader enables reading of pdf files directly inside web browsers.
I was thinking about a viewer as an ActiveX dll or something like that anyway (yea I know, hardcore stuff), so I would probably want to do 2 (or more) birds with one stone. And I can't release a half-product, plus gazillion of other development issues/stuff, all in all... "When it's done".

PS. While I was writing this, a crash error appeared "Preview Handler Surrogate Host has stopped working" (process that actually runs preview). It crashed trying to open preview for saved HTML file. LOL


Report this post
Top
 Profile  
Reply with quote  
 Post subject: question
PostPosted: March 7th, 2010, 3:26 am 
Everything looks great after all this time I'm using it, no bugs on my DualCore 2Gig PC too (even on large file contents).

Just a question, now that it thumbnails my zips & rars, do I have a way snag the thumbnail for my personal use - like it cache the thumbnails using windows cache, can it be modified to save it in some folder as jpg?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 7th, 2010, 11:37 pm 
great!
Works perfect on XP here...
Thanks for sharing it!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2010, 12:22 am 
Offline

Joined: March 9th, 2009, 12:15 am
Posts: 28
How can i use it from autohotkey?

I would like to show the thumbnails on a GUI...
Thanks!

_________________
http://monschein.org


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2010, 10:34 am 
I installed latest version on windows 7 64x with cdisplay 1.8, but i cant see any thumbnail preview. Is there something I am missing?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 8th, 2010, 7:12 pm 
Offline

Joined: October 15th, 2006, 2:39 am
Posts: 93
Location: Croatia
How to extract thumbnail in c/c++:
Code:
//don't forget to check for hr==S_OK

   HRESULT hr;
   HBITMAP m_bmp;

   //pointers to COM interfaces
   CComPtr<IUnknown> m_pthumb;//you can use simple IUnknown* or ATL's smart pointer wrapper
   IExtractImage2* m_pIExtractImage2;
   IPersistFile* m_pIPersistFile;

   SIZE s={    ...... , ......   };   //desired thumbnail width/height
   DWORD flags=0;
   IID CLSID_cbxformatExtractor={0x9E6ECB90,0x5A61,0x42BD,0xB8,0x51,0xD3,0x29,0x7D,0x9C,0x7F,0x39};

   //try to instantiate COM object
   hr=m_pthumb.CoCreateInstance(CLSID_cbxformatExtractor, NULL, CLSCTX_INPROC_SERVER);
   hr=m_pthumb->QueryInterface(IID_IPersistFile,(void**) &m_pIPersistFile);
   hr=m_pthumb->QueryInterface(IID_IExtractImage2,(void**) &m_pIExtractImage2);

   //get thumbnail
   hr=m_pIPersistFile->Load(szFile,NULL);             //szFile is a full path to the file (WCHAR)
   hr=m_pIExtractImage2->GetLocation(NULL,NULL,NULL, &s,NULL, &flags);
   hr=m_pIExtractImage2->Extract(&m_bmp);

//m_bmp now contains thumbnail as HBITMAP
//but don't forget to call DeleteObject in the end

   //finish and cleanup
   m_pIPersistFile->Release();
   m_pIExtractImage2->Release();
   m_pThumb->Release();



I suppose this can be translated to autohotkey, but I haven't used it with COM, try here (+forum posts):
http://www.autohotkey.com/docs/commands/DllCall.htm#COM
http://www.autohotkey.com/wiki/index.ph ... rd_Library

@ alicialgg
Read help file first (see also previous posts), try clearing thumbnail cache to regenerate all thumbnails (see help or google)
while listening to In Flames - As The Future Repeats Today :wink:


Last edited by T800 on April 8th, 2010, 3:35 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 15th, 2010, 11:03 pm 
it worked! I restarted the computer after installing and bum! all my thumbnail appeared!

This is great, Thank you!


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 8th, 2010, 10:33 am 
Thank you so much for doing this. Can't say thanks enough.
Thank you thank you thank you


Report this post
Top
  
Reply with quote  
 Post subject: Epub support
PostPosted: April 21st, 2010, 10:50 pm 
.EPub files are e-books which are basically zip files with xhtml and (cover) images. Can CBXShell create thumbnails for those aswell? I could get it to work with cdisplayex but the bugs drove me crazy. and i can't get it to work with CBXShell.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: April 22nd, 2010, 6:21 pm 
Offline

Joined: October 15th, 2006, 2:39 am
Posts: 93
Location: Croatia
By design, I didn't go for binary file recognition because that can be complicated given that archives can be self-extracting exes, etc.
When I get some spare time maybe I'll add something like user-defined file extensions support.
For the moment, I just added if (StrEqual(szExt, _T(".epub"))) return CBXTYPE_CBZ; at line 542 in cbxArchive.h.
32 & 64-bit dll:
http://www.autohotkey.net/~T800/CBX/cbx4203.zip

If you already used installer (if not, use it first to make this simple), you can replace dll files like this:
1. Extract 32 or 64-bit dll from zip (must match your Windows edition).
2. open command prompt (elevated if Vista/7 under UAC)
3. close all windows and applications, then wait a minute or two so that system releases files in use.
4. type in the command prompt: copy "<path of the new (unzipped) dll>" "<path to the old (installed) dll>" (use quotes if needed)
If all OK it will say that it copied 1 file.

Also, the question is if e-books (*.epub....) fall under this topic, because it seems to me that it should be a project for itself, from my experience cb* files are more similar to archives then are e-books which only use compressed file as a container (wikipedia topic on ebooks talks about html, xml, svg, etc.).

After all, the source code ist fur alle da.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 2nd, 2010, 12:17 am 
Could you please compile a binary package without SSE2 optimizations?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 2nd, 2010, 2:37 am 
Offline

Joined: October 15th, 2006, 2:39 am
Posts: 93
Location: Croatia
Ok, here are dlls without SSE
http://www.autohotkey.net/~T800/CBX/cbx4203noSSE.zip

I could use some feedback on this. Do you run some older hardware?
AFAIK, SSE was introduced in Pentium III in 1999, and SSE2 in P4 processors in 2001.
Here are 3 versions of my test app in release compile: no SSE, SSE, SSE2, optimizations set for speed.
http://www.autohotkey.net/~T800/CBX/SSEtest.zip
Drag and drop files onto dialog to test.
You can tell me how they behave, post messages/screenshots of errors.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 2nd, 2010, 7:53 pm 
Well, Athlon XP processors don't support SSE2. The last batch of them came out about 5 years ago, they were really popular, many people still use them. Then netbooks became popular, most didn't support SSE2, the bottom line is hardly anyone optimizes 32-bit desktop applications for SSE2 even today. And, in general, you get better performance from non-SSE2 32-bit binaries than optimized 64-bit ones (although the difference is negligible of course).

I did try the tests but couldn't notice any difference, mainly because results varied wildly with each use. Can you make the test run multiple (50-100) times automatically?

Thanks for the build :)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: May 2nd, 2010, 8:15 pm 
And here's the crash report for CBXTest_SSE2.exe on an Athlon XP


Code:
Problem signature:
  Problem Event Name:   APPCRASH
  Application Name:   CBXTest_SSE2.exe
  Application Version:   0.0.0.0
  Application Timestamp:   4bdcd95d
  Fault Module Name:   CBXTest_SSE2.exe
  Fault Module Version:   0.0.0.0
  Fault Module Timestamp:   4bdcd95d
  Exception Code:   c000001d
  Exception Offset:   00002c66
  OS Version:   6.1.7600.2.0.0.256.1
  Locale ID:   1033
  Additional Information 1:   0a9e
  Additional Information 2:   0a9e372d3b4ad19135b953a78882e789
  Additional Information 3:   0a9e
  Additional Information 4:   0a9e372d3b4ad19135b953a78882e789


Report this post
Top
  
Reply with quote  
 Post subject: Update available
PostPosted: May 3rd, 2010, 8:28 pm 
Offline

Joined: October 15th, 2006, 2:39 am
Posts: 93
Location: Croatia
I tried test app with 100 iterations, and there was no real difference (the only reason I enabled SSE in compiler settings was simply because 'it's there, so crank it up').
I recompiled all without SSE, version 4.4, you can download updated package. This should run on any CPU.


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 94 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group