• 0

[API] Sending messages to controls/forms


Question

1) What API functions do I need to modify how explorer shows desktop icons? The desktop class is SysListView32.. I'd like to know how to change the icon size of the desktop icons and the text alignment.. I'm gussing I have to use SendMessage and some messages but there are so many I'm at a loss of what to search for.

2) I want to add my own form (or panel, or something I could add controls to) to the taskbar to create my own start menu.. I was thinking SetParent and set my window as a child of the taskbar but when I do that, I don't see my window. If I could, I'd like to change the width of the start button to make it wider and just set my window as a child of the button (is that even possible?). What would be the best way to go about this?

Let's assume for each of these tasks I know how to get the handle of the desktop, taskbar, start button, etc.. Any help on either of these is appreciated :)

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

1) I think this is going to be harder than you think. Im assuming you are asking how to change the way windows explorer displays stuff. It would probably be a lot easier to write your own explorer program. If you do want to just customize windows explorer, what you have to do is create a Shell Namespace Extension.

2) Well your problem here is that your application doesn't run in the same process space as the taskbar. That is why you cant simply make your window a child of the taskbar. There is probably a complicated way to do what you are asking, but you might want to think of easier ways to do what you are trying to do (would creating a system tray icon be an option?).

Link to comment
Share on other sites

  • 0
1)  I think this is going to be harder than you think.  Im assuming you are asking how to change the way windows explorer displays stuff.  It would probably be a lot easier to write your own explorer program.  If you do want to just customize windows explorer, what you have to do is create a Shell Namespace Extension.

Not all explorer windows, just the desktop which I have the hwnd for.. the desktop is just SysListView32 which I thought you could send a message to it to make it change how things are drawn.

2)  Well your problem here is that your application doesn't run in the same process space as the taskbar.  That is why you cant simply make your window a child of the taskbar.  There is probably a complicated way to do what you are asking, but you might want to think of easier ways to do what you are trying to do (would creating a system tray icon be an option?).

But I can set my window as a child of the My Documents folder successfully and that's not the same process.. :huh:

You need SendMessage()

But IF you want to completly control the form/control you will have to use SubClassing or Hooks.

Ok, i was thinking sendmessage but do you know which constants I might use? Or do you have a link or anything?

Link to comment
Share on other sites

  • 0
1) What API functions do I need to modify how explorer shows desktop icons? The desktop class is SysListView32.. I'd like to know how to change the icon size of the desktop icons and the text alignment.. I'm gussing I have to use SendMessage and some messages but there are so many I'm at a loss of what to search for.

2) I want to add my own form (or panel, or something I could add controls to) to the taskbar to create my own start menu.. I was thinking SetParent and set my window as a child of the taskbar but when I do that, I don't see my window. If I could, I'd like to change the width of the start button to make it wider and just set my window as a child of the button (is that even possible?). What would be the best way to go about this?

Let's assume for each of these tasks I know how to get the handle of the desktop, taskbar, start button, etc.. Any help on either of these is appreciated :)

1. The only way I think you could do that is with setting the global system parameter info with "SystemParametersInfo", but that would apply to all shell views.

2. I am pretty sure you will have to crease a desktop band object (like QuickLaunch).

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.