Thanks for all the suggestions!

Before I try to generate a cl on the fly with icons. I have another
question. I found that after .showmenu is executed. The menu is there and
waiting for key stroke input. The up, down key can navigate through the
menu. However, I would like to keep using alt-tab keep moving around the
menu, just like the old alt-tab of windows do.

When the first alt-tab is pressed, the menu shows up, if I keep pressing tab
without release alt, I get the menu's handle (with the help of windowinfo, I
find out the menu's class. which is #32768. Then
 handlmenu = win.handle("c=#32768")).

I can confirm the handle is corrent because I successfully executed
win.trans(handlemenu, 60).
I tried to send key stroke to the menu,
at first by *Keys {to handlemenu} {ad}, which complained "cannot find window
to chang or to send keys to handlex"

later by win.keys{"{ad}"} , which gimme no error but also no effects, the
keys seems to sent to other window. I am sure the menu is already on top.
But it is not focused and I cannot make it so by setfocus().

The modified codes are as following.   I use a  global var AlttabRunning to
ensure only one menu is created.
---------------
if (AlttabRunning ==0) do
    AlttabRunning=1
    handlev=vec.createFromWords(win.handleList("*"))
        for (j=0;j<handlev.length;j=j+1)
             if (win.hascaption(handlev[j])!=1) do
             ;if
((win.hascaption(handlev[j])!=1)||!win.visible(handlev[j])&&!win.trayminned(handlev[j]))
do
                handlev.delete(j)
                j=j-1
             endif
        endfor
        menuv=vec.create(handlev.length)

        for (j=0;j<handlev.length;j=j+1)
        ;index from 0-9
        if (j<=9) do
            mycap=j ++" "++ win.caption(handlev[j])
            elseif (j<=35)
            ;index from a-z
            str =55+j
            mycap=case("fromnum", str)++" "++ win.caption(handlev[j])
            else
            mycap="@"++" "++ win.caption(handlev[j])
            endif
            menuv[j] = mycap
        endfor

        selectedwin = menuv.showmenu("",1,"")
        if (selectedwin != -1) do
            win.show(handlev[selectedwin])
        elseif (handlev.length ==1) do
                win.show(handlev[0])
            else
                win.show(handlev[1])
        endif
     ;win.debug("dd=",win.caption(currentwin), win.caption(lastwin))
        menuv.destroy
        handlev.destroy
    AlttabRunning=0
else
    handlex = win.handle("c=#32768")
   ;win.debug("top=",win.topmost(handlex), "vis=",win.visible(handlex),
handlex, "focus on", win.getfocus())
    if ((handlex !="")&& win.ontop(handlex)) do
        *Keys {to handlex} {ad}
        ;win.keys("{ad}")
    endif
endif
-------------------------
Any tips?

I wanna get everything I want for alt-tab, maybe I am asking too much??

Sean
3/29/2009

On Fri, Mar 27, 2009 at 3:58 AM, brucexs <[email protected]> wrote:

>   --- In [email protected] <power-pro%40yahoogroups.com>, "Sheri"
> <sheri...@...> wrote:
> >
> > Where are class icons?
> >
> > Regards,
> > Sheri
> >
> http://msdn.microsoft.com/en-us/library/ms633577(VS.85).aspx
>
>  
>


[Non-text portions of this message have been removed]

Reply via email to