Tasks Docklet Development

Great job on this docklet so far, it's looking really great!

I like the second style better - smaller and more compact. Will there be an option to adjust the icon size?

Also, it might be useful to put in some additional minimize functionality. Maybe a minimize all windows on middle click of the docklet and minimize a window on middle click of a taskdock icon? Just a thought.

#38365

Hi Albeik, i see your taskdocklet are developed!!! ;) You have all my respect!!!

#38405

Hi everyone,

Thank you everyone for your kind comments! We all know that the prototypes I have posted was done using photoshop so that I can easily visualize what I want.

Just to update you with my development, below are screen shots taken from the actual task docklet. It is not photoshoped! I am very surprised to see myself reach this stage so fast, actually.

Currently the popup window is not clipped, so a white color background will be there instead. Here are two pictures for you to see:

tasks-real0.png

tasks-real1.png

Detailed Development Status

Current Restrictions:
--------------------------
- Thumbnail Preview of the active Window is DISABLED
- Only works when Y'z Dock is set at the bottom position of the screen
- Docklet doesn't stay magnified when moused moved away after
  showing the popup window

Completed:
-------------
- All windows are now properly enumarated (to reflect windows taskbar)
- Users can configure to use the windows icons or replacing them with
 there own PNG depending on the WindowClass
- Users can exclude any window by adding it to the INI file
- A "tasklist.txt" file is created everytime there is a change of windows
  in the environment. It lists the current active windows with there
  respective WindowClass
- Created the popup window using PNG graphics extracted from a
 template folder. Template images now include:
   selection.png -- the background image behind the active window icon
   arrow.png -- the arrow pointing to the docklet
   bg.png -- the background image used for the window

TODO:
--------
- Replace the white background with transparency
- Automatic resize of icons depending on quantity & monitor size
- Handle popup window from going off the screen (handle arrow as well)
- Add mouse hooks: onMouseOver, LeftClick, RightClick and MiddleClick
- Add keyboard hooks: Control & Shift
- Add controls/functions to the mouse & keyboard hooks

Thanks everyone,

#38877

Cool! It looks soo awesome.

Yet an other great release when i'm at work :) You're (developers) killing me with this waiting ;)

#38879

Looks GORGEOUS!!! [[drools]] I hope it'll work w/the dock at the top of the screen someday, but for now it's gorgeous enough that I'd switch the location of my dock just to use it ;)

#38880

Why don't you make your own Dock? :-)

And please make it open source hahaha

#39277

hehe...

I think I'll stick with docklets/plugins or whatever they called now... :)

#39282

Originally posted by albeik@Jul 8 2003, 07:44 AM

Hi everyone,

Thank you everyone for your kind comments! We all know that the prototypes I have posted was done using photoshop so that I can easily visualize what I want.

Just to update you with my development, below are screen shots taken from the actual task docklet. It is not photoshoped! I am very surprised to see myself reach this stage so fast, actually.

Currently the popup window is not clipped, so a white color background will be there instead. Here are two pictures for you to see:

tasks-real0.png

tasks-real1.png

Albeik, I am really impressed by what I see, really.

Great job, I look forward to use it :)

#39309

@siwu: Thank you. It's an honor to hear this from another developer! :)

#39311

Albeik

this is incredible!

---------------------

just so you know on the mac the task replacer (alt-tab) is BIG SIZE so i prefer the bigger size one. Just more realistic and appealing.

but then again i guess you can make it as a choice :D

amazing work albeik :own:

#39314

hey Goku: can you post some screen shots of how it looks on the Mac.. I don't have one.. but planning to get one (maybe when the update the 15")...?

Thanks a bunch and thanks for your kind comments! :)

#39316

Albeik, can you tell me what method you use to make this dialog ?

100% GDI (or GDI+) ?

#39331

siwu, This is actually my first attempt to do something like this.

I am using GDI+ to create the relevant images. The images are on top of the window which is of type: WS_POPUP.

I am still trying to figure out how to do the clipping.. :P

#39332

I'd suggest you build an independent task switcher looking like OSX and for your docklet use a normal pop-up menu (or a menu with 32x32 icons, or even an Aqua menu with arrow and stripes etc)

#39336

Originally posted by albeik@Jul 9 2003, 11:41 PM

siwu, This is actually my first attempt to do something like this.

I am using GDI+ to create the relevant images. The images are on top of the window which is of type: WS_POPUP.

I am still trying to figure out how to do the clipping.. :P

2 choices:

You set your window to WS_EX_LAYERED and you do a

SetLayeredWindowAttribute(hWnd, RGB(255, 255, 255), 0, LWA_COLORKEY);

Then all the white pixel drawn to the window will be transparent.

Or you have to use the SetWindowRgn() function. But I'm sorry I don't know much about regions :/

#39360

Siwu, thats exactly what I use at the moment for removing the white. But ofcourse, it'll end up removing all the whites from the icons as well... so I may have to select special color for that.. not sure...

I can do regions with bitmaps, but not sure with PNGs.. so I may have to do some conversions and such.. i'll update you if I get any progress with this..

thanks siwu, really appreciate it!

#39375

Hi albeik,

layered windows is the way to do it. but don't use a colorkey, use alpha-blending. have a look at UpdateLayeredWindow and the BLENDFUNCTION. that's probably the way to go. no conversions needed, especially when you use GDI+.

moby

p.s. shots look nice !

#39395

@dev: Did you have any problem installing .NET ? Coz mine refuses to start.... :/ (once it's installed)

#39424

What an honor to get hear from Moby! :)

Thanks moby for your tip, I did some research before your post and found information about the UpdateLayeredWindow function to post here to ask siwu about, but you came ahead of time! I'll go back and read more about it as what from you are telling me it seems it'll fit my needs perfectly.

Thanks, really appreciate it! :)

#39431

A Question for Moby/Siwu + other developers:

I am working on the hooks (mouse & keyboard) at the moment. And I can only seem to get it to work/detect mouse clicks etc.. from my thread. I have changed the hook function's thread parameter to 0, indicating a global (everything in the system) detection as described in MSDN. However, it is STILL only detecting from my thread.

With some additional search on the internet, other programmers seem to recommend that for the hooking functions to work to detect global information you need the functions to reside on a seperate DLL file which is then called by the main MFC application. We know that the docklet is a DLL file in itself. Do I need to make a seperate dll for this functionality? Or is there a better method?

Goal: I am basically, trying to detect when a user has clicked outside the tasks window area so I can hide/close it. hmm.. While writing this, I am thinking maybe if I can detect when I am inactive maybe that will do the trick.. but I am always on top POP_UP window.... so it may not work.

At any rate, I hope any of you guys get to read this and can help me out here.. ofcourse same goes to everyother programmer out there! :)

Thanks everyone for your time,

#39610

hi again,

you are right. for a global hook, you have to use a separate dll with a shared memory section.

maybe a global hook is a little bit oversized for your problem. just check the state of your window for inactivity or loosing focus, that should make it !

moby

#39636

Originally posted by albeik@Jul 11 2003, 09:02 PM

A Question for Moby/Siwu + other developers:

I am working on the hooks (mouse & keyboard) at the moment. And I can only seem to get it to work/detect mouse clicks etc.. from my thread. I have changed the hook function's thread parameter to 0, indicating a global (everything in the system) detection as described in MSDN. However, it is STILL only detecting from my thread.

With some additional search on the internet, other programmers seem to recommend that for the hooking functions to work to detect global information you need the functions to reside on a seperate DLL file which is then called by the main MFC application. We know that the docklet is a DLL file in itself. Do I need to make a seperate dll for this functionality? Or is there a better method?

Goal: I am basically, trying to detect when a user has clicked outside the tasks window area so I can hide/close it. hmm.. While writing this, I am thinking maybe if I can detect when I am inactive maybe that will do the trick.. but I am always on top POP_UP window.... so it may not work.

At any rate, I hope any of you guys get to read this and can help me out here.. ofcourse same goes to everyother programmer out there! :)

Thanks everyone for your time,

Just check about SetCapture() for the mouse hook

and

TrackMouseEvent() which sends a WM_MOUSELEAVE message

hope it will help you

#39678

Originally posted by albeik@Jul 11 2003, 09:02 PM

I am working on the hooks (mouse & keyboard) at the moment. And I can only seem to get it to work/detect mouse clicks etc.. from my thread. I have changed the hook function's thread parameter to 0, indicating a global (everything in the system) detection as described in MSDN. However, it is STILL only detecting from my thread.

Okay, the problem is the same when you try to hook a windowproc using SetWindowLong() (it's called subclassing) in another thread. You pass the address of the new WindowProc to the other proc. But remember the WindowProc address is RELATIVE to you current proc, not to the other.

Remember we are in protected mode, processes cannot write or read to the memory of others. (Yes, writeprocessmemory(), readprocessmemory(), i know i know :))

So, if you want that your hook to be working, you have to inject your code into the other process. This way, the address of the new WindowProc is usable by the process, and the hook will be functionning.

This is done via a dll. When it's loaded, Windows call the DllMain() function of your dll with some parameters (like DLL_PROCESS_ATTACH when the dll attaches to the process). In this function you set your hook :)

You can also add your dll to a registry entry (don't remember which one) with automatically load you dll in the process when it's executed (like MFC, kernel32.dll etc...). This way the hook will be global.

Actually that's the way Y'z Dock, OD or ObjectBar use to catch the mouse position :) or hide the file menu etc :)

But I think in you case SetCapture() is the way to achieve it, when the user clicks on Tasks, you do a SetCapture() to capture the mouse position on the whole screen :) And when the mouse mooves in the window area, you do a TrackMouseEvent() to catch when it goes out. Yes, TrackMouseEvent() will send only one message :)

Hope this will help you :)

#39759

Thanks everybody for your support and help!! Really, thank you!

I just came here to update everyone:

Detailed Development Status

Current Restrictions:
--------------------------
- Thumbnail Preview of the active Window is DISABLED
- Only works when Y'z Dock is set at the bottom position of the screen
- Docklet doesn't stay magnified when moused moved away after
  showing the popup window

Completed:
-------------
- All windows are now properly enumarated (to reflect windows taskbar)
- Users can configure to use the windows icons or replacing them with
 there own PNG depending on the WindowClass
- Users can exclude any window by adding it to the INI file
- A "taskslist.txt" file is created everytime there is a change of windows
  in the environment. It lists the current active windows with there
  respective WindowClass
- Created the popup window using PNG graphics extracted from a
 "skin" folder. Skinning images now include:
   selection.png -- the background image behind the active window icon
   arrow.png -- the arrow pointing to the docklet
   right.png -- the right image portion of the window
   middle.png -- the background image used for the window
   left.png -- the left image portion of the window
- The window is now transparent which can be of [b]any[/b] shape
- Automatic resize of icons depending on quantity & monitor size
- Handle popup window from going off the screen (handle arrow as well)
- Added mouse hooks: onMouseOver, LeftClick, RightClick and MiddleClick
- Added keyboard hooks: Control & Shift
- Added controls/functions to the mouse & keyboard hooks

TODO:
--------
- Add the popup menus when right clicking the docklet or the icons on the window
- Add icon selection for window class via popup menu instead of changing INI file manually
  (avoids a restart of the docklet) ---- may be moved to v0.21)
- Add window to exclusion list via popup menu instead of changing INI file manually
  (avoids a restart of the docklet) ---- may be moved to v0.21

I think that'll be it for v0.2. I am going to work on the TODO list and release it for the public either later tonight or tomorrow morning.

I added the latest screenshot of the latest build with the tasks docklet in action.

tasks-ss-latest-build-0.19.png (967kb)

Thanks everyone,

#40936

Looking really good

#40939