This isin't are the gem, but all suggestions are welcome. WinTool: Litle system tray based utility that allow toggle windows topmost state.
Posted on 2002-05-27 17:18:53 by Torak
Works fine for me :alright: : NaN did a similar utility there's few days, but the "system tray menu way" to select the window is much more user friendly imho...

Just a suggestion : you should insert a seperator before the menu entry "Exit" : we might think it is a window...
Posted on 2002-05-28 00:58:07 by JCP
Doesn't work in XP or I don't understand correctly what it should do ;)

If I right click the icon in the system tray and select some window title from the opened menu, nothing happens.

Sami
Posted on 2002-05-28 07:03:44 by SamiP
Very interesting util :)
Posted on 2002-05-28 12:57:52 by slop
Originally posted by SamiP
Doesn't work in XP or I don't understand correctly what it should do ;)


1. Open notepad and calculator.
2. Use wintool to the calculator.
3. Maximize the notepad.

Now if all is ok, you should see the calculator and notepad same time and there sould be litle mark in wintool before calculator name. The idea top most windows is it visible all the time over other windows.
Posted on 2002-05-28 14:19:32 by Torak
works on XP, nice tool:alright:
Posted on 2002-05-28 19:15:38 by NEMO
Now I can see what the WinTool does, nice!

My problem was that the windows that I used WinTool was minimized to Startbar and then it seem like nothing happens until the window is restored/maximized.

Sami
Posted on 2002-05-29 00:43:41 by SamiP
Great work.. I will definitely be using this over my own ;)

My version was just a quick hack, but your shows you've put some thought into it... Thanx again!

:alright:
NaN
Posted on 2002-05-29 10:40:06 by NaN
I try to improvice (and fix) this tool but becose i am noob in asm i got problem. I tryed (couple hours, grr) to make little peace that strip of too longs windows names and put tree dots end of the name like menus usually. Can some show how to do this.

If i remember right Win XP style servicate not effect menus, only common controls; can some one verify this ?
Posted on 2002-05-29 11:58:40 by Torak
Heres a simple modification to do something like this. It doesnt use an API tho, just a little ASM ;)

It limits to 20 ASCII chars, and then places a '...', and NULL.

The upside is its easy to implement, the downside is its not 'symetrical' as the popup menu uses variable width characters. But its ok like this for me ;)

I've made comments where i added source code....
Enjoy.
:alright:
NaN
Posted on 2002-05-29 13:24:14 by NaN
Ooops here is the attachment ;)
Posted on 2002-05-29 13:27:58 by NaN
NaN,

sorry but it crashes on my win2k sp2 box when I right click on the icon :

---------------------------
WinTool: WinTool.exe - Erreur d'application
---------------------------
L'instruction ? "0x77e07fae" emploie l'adresse m?moire "0xfffffff0". La m?moire ne peut pas ?tre "read".


Cliquez sur OK pour terminer le programme.
Cliquez sur Annuler pour d?boguer le programme
---------------------------
OK Annuler
---------------------------

Sorry, it is in french, but you understand what it means, and the important part is the address... (register preservation problem ?)
Posted on 2002-05-29 14:16:39 by JCP
My bad.. i didnt test it under all conditions... all my windows i tested it with had names LONGER than 20 chars...

Less then 20 chars and you will crash.. Sorry :rolleyes:

Here is the source Fragment i added:
         invoke StrLen, addr buffer

cmp eax, 20
jb @F
lea eax, buffer
add eax, 20
mov DWORD PTR [eax], 002E2E2Eh ; '...\0' is little endian: 002E2E2E hex
@@:
sub eax, 20 ; Back to addr of buffer (begining)


Here is the corrected fragment:


cmp eax, 20
jb @F
lea eax, buffer
add eax, 20
mov DWORD PTR [eax], 002E2E2Eh ; '...\0' is little endian: 002E2E2E hex
@@:
[b] lea eax, buffer[/b]


Change this one line, and recompile it will work fine for both cases... sorry again! (my bad)

NaN
:stupid:
Posted on 2002-05-29 16:34:01 by NaN
I think that crashes problem was litle NAN trick to me becose i am so noob ;)

Here is 0.3 version: some fixes, separator, and minizided windows will be restored when wanted topmost. I don't like icon (even these msg baord icon are better), and i dont have invited what to do in left mouse click.
Posted on 2002-05-29 16:35:18 by Torak
Now, all is perfect... ;)
Posted on 2002-05-29 17:02:02 by JCP
Naaa, we all make mistakes ;)

Your code looks pretty good to me, i would stop knocking your self on this front... The fact you even re-organized my suggestion into tighter code even show that... good work!

:alright:
NaN
Posted on 2002-05-29 20:17:03 by NaN
Yah, the day was really bad. Getting two denied responed to jobs that you don't need experiense.
Posted on 2002-05-30 09:24:57 by Torak
Can you add to your small tool 2 other functions ?

1) Minimize window (some programs cannot be minimized during the run).

2) Iconize window (put the icon in the tray bar).

Thanks !

JC
Posted on 2002-05-30 14:01:21 by MCoder
Hi Torak: I thought your WinTool was going to be the answer for a problem I have with a dialog box. When I set it to top most window I lose the tool tip function.
I get the same result - no tool tips- when I invoke SetWindowPos in my code.
If I don't use WinTool or Invoke SetWindowPos everything works fine. Could this be because I'm using a dialog box rather than a regular window. I'm using Win98.
Any Information would be appreciated.
Regards Fumio
Posted on 2002-06-06 19:36:21 by Fumio

Heres a simple modification to do something like this. It doesnt use an API tho, just a little ASM ;)


There is an API for something like that. But I think it's only used for path's, to convert



Z:\mylongfoldername\myveeeerrrrrryyyyylongsubfoldername\my****tylongasmsourcefilename.asm


to



Z:\mylongfoldern...asmsourcefilename.asm


It's some message constant.... gotta look it up in my source archive...
Posted on 2002-06-07 01:06:51 by bazik