Advanced ExplorerComboGadget

Just starting out? Need help? Post your questions and find answers here.
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

Awesome.

One strange result on vista:

If I click a column header, eg, Total Size for drives or Date Modified, etc, it sorts. Good.

If I click the associated arrow for the column but then don't select an option (either click the arrow again or click outside the area) it closes down the app.

Not sure if this is the desired behaviour.

Edit : Not tried on XP so don't know if the same thing happens there.
Dare2 cut down to size
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

Sparkie, you're using the web gadget to display the folder view aren't you?

The problem I found using the web gadget is that it does not conform to the global view settings for folders and it is not possible to specify a new one.

For example: the folder view defaults to "Tiles". Even if you change it to "Icons" (which you have to do manually) it does not preserve this setting in subsequent folders.

Because it is not a true folder environment there is also no support for back, forward, up, search, etc.

This was the kind of environment I was looking to create when I made this post: http://www.purebasic.fr/english/viewtopic.php?t=31626

I know nothing about COM and very little about how to work with objects. I hope to explore it more after I finish PureGDK but as of right now I can't see a simple solution.

There is a great ShellBrowser library from Jam Software that does everything but it would need an OO wrapper. If someone can figure out how to wrap this to work with PureBasic I'd buy it straight away!

http://www.jam-software.com/activex/shellbrowser.shtml
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

Thank you all for the feedback. :)

The main idea behind this code is the ExplorerComboPlus control. The WebGadget is just my (quick and easy) way for handling the returned result from the ExplorerComboPlus. I figured the sample app should do something other that just sit there while you make your selections. 8)

In the end, this control will work in similar fashion as the PB ExplorerComboGadget

...user makes a selection from the combo
...YOU decide what to do with the returned result

I will however look into the possibility of expanding this control and address the bugs/problems that have arisen to this point. ;)
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Mistrel wrote: Because it is not a true folder environment there is also no support for back, forward, up, search, etc.

This was the kind of environment I was looking to create when I made this post: http://www.purebasic.fr/english/viewtopic.php?t=31626

I know nothing about COM and very little about how to work with objects. I hope to explore it more after I finish PureGDK but as of right now I can't see a simple solution.

There is a great ShellBrowser library from Jam Software that does everything but it would need an OO wrapper. If someone can figure out how to wrap this to work with PureBasic I'd buy it straight away!

http://www.jam-software.com/activex/shellbrowser.shtml
Duh! They boast about its native look and feel ("All components look and behave like their counterpart in the Windows Explorer."), and they couldn't even get the screenshot native-looking... The "feel" has big obvious errors as well.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

Trond wrote:Duh! They boast about its native look and feel ("All components look and behave like their counterpart in the Windows Explorer."), and they couldn't even get the screenshot native-looking... The "feel" has big obvious errors as well.
That screenshot is meant to shows off a variety of different features at once. You can customize the folder to look however you want.

There are more screenshots here:
http://www.jam-software.com/activex/sb_components.shtml
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Mistrel wrote:
Trond wrote:Duh! They boast about its native look and feel ("All components look and behave like their counterpart in the Windows Explorer."), and they couldn't even get the screenshot native-looking... The "feel" has big obvious errors as well.
That screenshot is meant to shows off a variety of different features at once. You can customize the folder to look however you want.

There are more screenshots here:
http://www.jam-software.com/activex/sb_components.shtml
The compiled example program also had the problem: it uses screen door transparency instead of alpha blending in thumbnail mode.
JamSystemShellView displays the contents of a folder in a ListView like control. It is a true instance of the right pane of the Windows Explorer and therefore looks and behaves exactly like the Windows Explorer on the system it is running on. You can switch between the view styles Details, Small Icons, Large Icons, List and Thumbnails. As you see in the screenshot, it also supports the background context menu.
The background context menu didn't work either.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

I don't see any problem with the alpha in thumnail mode. Would you post a screenshot?

The context menu doesn't work in the JamExplorer.exe example because that context menu has to be custom made. You capture the event and display your own context menu.

How can you be so quick to judge it when you haven't even tried using it in a program?
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

Mistrel wrote:I don't see any problem with the alpha in thumnail mode. Would you post a screenshot?
http://www.jam-software.com/delphi/imag ... b_4_gr.gif
The context menu doesn't work in the JamExplorer.exe example because that context menu has to be custom made. You capture the event and display your own context menu.
It clearly states that it works like a normal explorer window and if you have to make it yourself then it doesn't.
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Post by Mistrel »

Trond wrote:
Mistrel wrote:I don't see any problem with the alpha in thumnail mode. Would you post a screenshot?
http://www.jam-software.com/delphi/imag ... b_4_gr.gif
The context menu doesn't work in the JamExplorer.exe example because that context menu has to be custom made. You capture the event and display your own context menu.
It clearly states that it works like a normal explorer window and if you have to make it yourself then it doesn't.
The problem with the alpha transparency is with explorer which is what Jam Software is wrapping. This issue is only limited to displaying thumbnails of icons which explorer isn't designed to handle in the first place.

You can still call an API context menu but you have to customize its contents. I don't think you could call the native context menu for folders even if you wanted to.

I see nothing wrong with their software.
Trond
Always Here
Always Here
Posts: 7446
Joined: Mon Sep 22, 2003 6:45 pm
Location: Norway

Post by Trond »

The problem with the alpha transparency is with explorer which is what Jam Software is wrapping. This issue is only limited to displaying thumbnails of icons which explorer isn't designed to handle in the first place.
:shock: My explorer handles thumbnails just fine. This doesn't. There is nothing wrong with that as long as they don't claim it works exactly like explorer. Sadly, they do.
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

@Micko: I haven't forgotten about you. I am having some code issues with Vista. As soon as I get things working properly, I'll let you know.

@Dare: The problem you mentioned...
If I click the associated arrow for the column but then don't select an option (either click the arrow again or click outside the area) it closes down the app.
It seems this may be a WebGadget issue as opposed to a Vista issue, as this doesn't happen when creating a AtlAxWin class window with CreateWindowEx. I will dig deeper to see if I can find a solution. ;)

Test this on Vista and see if the crash still occurs.

Code: Select all

If OpenWindow(0, 0, 0, 600, 300, "WebGadget", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0))
    WebGadget(0, 10, 10, 580, 280, "c:\")
    ; Note: if you want to use a local file, change last parameter to "file://" + path + filename
    Repeat 
    Until WaitWindowEvent() = #PB_Event_CloseWindow
  EndIf
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
Dare
Addict
Addict
Posts: 1965
Joined: Mon May 29, 2006 1:01 am
Location: Outback

Post by Dare »

Hi Sparkie,

Yes, gives the same result. It also shuts down even if I select something from the dropdown. Which I now realise happens with the original exe as well.

Success to you!
Dare2 cut down to size
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

Thanks Dare :)
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
Micko
Enthusiast
Enthusiast
Posts: 244
Joined: Thu May 24, 2007 7:36 pm
Location: Senegal
Contact:

Post by Micko »

hi Sparkie
keep on the good work :D
Sparkie
PureBatMan Forever
PureBatMan Forever
Posts: 2307
Joined: Tue Feb 10, 2004 3:07 am
Location: Ohio, USA

Post by Sparkie »

I've been staring at this code for waaaaayyyyy too long. One bug found and fixed but this other one has me stumped, so I could use some feedback on this bugger.

Run this code on Vista. Move the mouse to the Listview header and click on an arrow. Notice that for some reason the first item will have a focus rect around it. Now click off of the header and watch as the app crashes.

Code: Select all

If OpenWindow(0, 0, 0, 800, 500, "Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0))
  WebGadget(0, 5, 35, 790, 410, "c:\")
  Repeat
    event = WaitWindowEvent()
  Until event = #PB_Event_CloseWindow
EndIf
while this code on Vista does not crash the app.

Code: Select all

Procedure WinProc(hwnd, msg, wParam, lParam) 
  Select msg 
    Case #WM_CLOSE 
      DestroyWindow_(hwnd) 
    Case #WM_DESTROY 
      PostQuitMessage_(0) 
      result  = 0 
    Default 
      result  = DefWindowProc_(hwnd, msg, wParam, lParam) 
  EndSelect 
  ProcedureReturn result 
EndProcedure 

If OpenWindow(0, 0, 0, 800, 500, "Test", #PB_Window_SystemMenu | #PB_Window_ScreenCentered) And CreateGadgetList(WindowID(0))
  SetWindowCallback(@WinProc())
  WebGadget(0, 5, 35, 790, 410, "c:\")
  msgs.MSG 
  While GetMessage_(@msgs, 0, 0, 0) 
    TranslateMessage_(@msgs) 
    DispatchMessage_(@msgs) 
  Wend 
EndIf
:?
What goes around comes around.

PB 5.21 LTS (x86) - Windows 8.1
Post Reply