DesktopRightMenu! Replace your desktop icons with a menu!

Developed or developing a new product in PureBasic? Tell the world about it.
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

DesktopRightMenu! Replace your desktop icons with a menu!

Post by dracflamloc »

Just like the title says. Replace your desktop icons with a dynamic menu of your own design with shortcuts, submenus, etc.

(Currently I can't get it to reliably use the current windows background, let me know how your experience goes.)

Get it here:
http://www.dracsoft.com/viewdownload.php?id=42

I'm currently trying to get it so I don't need to disable the desktop icons for the menu to work, but let me know what you think!
Truth_Seeker
Enthusiast
Enthusiast
Posts: 145
Joined: Tue Mar 01, 2005 8:41 pm
Location: Near a Computer

Post by Truth_Seeker »

I have been wanting something like this, going to check it right away!

Edit:

Used it, it is a keeper, very nice. Three bugs: save file requester does not save the extension when you use it, you have to do it yourself.

This is what I use:

Code: Select all

  filename$ = SaveFileRequester("New File", "", "Menu Files|*.mnu", 0) ; gets the path and name for the new file
  If GetExtensionPart(filename$) = "" ; checks to see if there is a extension on the file
    filename$ + ".mnu" ; adds .mnu to the end of the filename
  EndIf
Second bug: wont use the correct desktop background, strange.

Third bug: resizing the window does not make the gadget update to it, you might just want to just remove resizing button

You might want to add some way of customizing the menu (like putting folder icons next to folders and letting the user do his own). Also another idea would be that you could make it so when they hold down (Shift + Right Mouse click) that it would bring up the normal system menu. Other than those things, I think you could release it to some freeware sites and start seeing lots of visiters to your site :).
Thanks
Truth Seeker
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

If anyone knows an API command or where in the registry to get the current background, please let me know.

Currently I'm getting the background from: hkey_current_user\control panel\desktop\wallpaper
Truth_Seeker
Enthusiast
Enthusiast
Posts: 145
Joined: Tue Mar 01, 2005 8:41 pm
Location: Near a Computer

Post by Truth_Seeker »

Got this from the code archive at www.purearea.net. I fixed it up so that it works now with the correct version of PB.

Code: Select all

; English forum: http://purebasic.myforums.net/viewtopic.php?t=8110&highlight=
; Author: sec
; Date: 30. October 2003

; get filename of current wallpaper 
unibuff=AllocateMemory(2*(#MAX_PATH+1)) 
ansibuff=AllocateMemory(#MAX_PATH) 
CoInitialize_(0) 
If CoCreateInstance_(?clsid_activedesktop,0,1,?iid_iactivedesktop,@iad.IActiveDesktop)=#S_OK 
    !PUSH dword 0      
    !PUSH dword 522; 2*(#max_path+1)          
    !MOV eax,dword [v_unibuff] 
    !PUSH eax 
    !MOV eax,dword [v_iad] 
    !PUSH eax 
    !MOV eax, [eax] 
    !CALL dword [eax+16]; iad\getwallpaper(unibuff,2*(#max_path+1),0) 
    WideCharToMultiByte_(#CP_ACP,#WC_COMPOSITECHECK,unibuff,-1,ansibuff,#MAX_PATH,0,0)  
    iad\release() 
EndIf 
CoUninitialize_() 
Debug PeekS(ansibuff) 
FreeMemory(0) 
FreeMemory(1) 

DataSection 
clsid_activedesktop: 
Data.b $00,$87,$04,$75,$1F,$EF,$D0,$11,$98,$88,$00,$60,$97,$DE,$AC,$F9 
iid_iactivedesktop: 
Data.b $00,$EB,$90,$F4,$40,$12,$D1,$11,$98,$88,$00,$60,$97,$DE,$AC,$F9 
EndDataSection
; ExecutableFormat=Windows
; EOF
It returns the filename and path of the desktop background.
Thanks
Truth Seeker
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Using the latest beta i get this error:
MOV eax,dword [v_unibuff]

undefined symbol
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Go download 1.2 and tell me if the background stuff works.
Truth_Seeker
Enthusiast
Enthusiast
Posts: 145
Joined: Tue Mar 01, 2005 8:41 pm
Location: Near a Computer

Post by Truth_Seeker »

Does your program do anything to the registry? Cause the problem is still not fixed...

Is there something in your program I have to set or does the program automaticaly find the desktop background? Cause all I have right now is a black screen.
Last edited by Truth_Seeker on Sat Aug 06, 2005 10:23 pm, edited 1 time in total.
Thanks
Truth Seeker
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

That stinks, what OS are you using?

1.3 is uploaded. Has a small bugfix with filetypes and i added the ability to put menubars in.
Truth_Seeker
Enthusiast
Enthusiast
Posts: 145
Joined: Tue Mar 01, 2005 8:41 pm
Location: Near a Computer

Post by Truth_Seeker »

I using Windows XP Home Edition Version 2002 Service Pack 2. By the way the version 1.3 of your program does not say it in the title bar.
Thanks
Truth Seeker
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Weird... it does for me.

Make sure you clear your temporary internet files so you get the new version?

Internet Explorer sucks...
Truth_Seeker
Enthusiast
Enthusiast
Posts: 145
Joined: Tue Mar 01, 2005 8:41 pm
Location: Near a Computer

Post by Truth_Seeker »

Clearing fixed the wrong version. But still having problems with the background.
Thanks
Truth Seeker
dracflamloc
Addict
Addict
Posts: 1648
Joined: Mon Sep 20, 2004 3:52 pm
Contact:

Post by dracflamloc »

Yea I'll have to look into it some more.
Post Reply