如何更改XP上的快速启动按钮的顺序? [英] how to change the order of the quick launch button on XP?

查看:94
本文介绍了如何更改XP上的快速启动按钮的顺序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用C ++更改XP上快速启动按钮的顺序,我的代码如下所示:

I was trying to change the order of quick launch button on XP using C++, and my code looks like this:

    HWND hDesktop = GetDesktopWindow();
HWND hTray    = FindWindowEx( hDesktop , 0, _T("Shell_TrayWnd")   , NULL );
HWND hReBar   = FindWindowEx( hTray    , 0, _T("ReBarWindow32")   , NULL );
HWND hToolbar = FindWindowEx( hReBar    , 0, _T("ToolbarWindow32") , NULL );
int Count = SendMessage(hToolbar, TB_BUTTONCOUNT, 0, 0);
TBBUTTON tButton;
SendMessage(hToolbar, TB_MOVEBUTTON, Count-1, 0);
SendMessage(hTray, TBN_TOOLBARCHANGE, NULL, NULL);


如果快速启动工具栏中的按钮少于3个,则代码工作正常,但是如果按钮超过3个,则顺序将更改一段时间,并在单击右侧的小箭头按钮后保持不变显示快速启动按钮的3个中的一个.
谁能告诉我为什么会这样吗?


IF there are less than 3 buttons in the quick launch toolbar, the code works just fine, but when there are more than 3 buttons, the order will change for a while, and remains the same after you clicking the little arrow button at the right of the 3 showing quick launch buttons.
Can anyone please tell me why this happen? and how I can fix it to make work for more than 3 buttons?

推荐答案

我忍不住想知道这是否是3个按钮的限制,或者如果此限制是快速启动栏中可见的按钮数量?

也就是说,我想知道单击箭头按钮时创建的窗口是否未被破坏,然后自上次使用以来经过一段时间后,根据请求重新创建.如果是这种情况,我假设Windows将以用户已经指定的相同顺序加载图标(通过将图标拖动到其首选位置)
I can''t help but wonder if this is a limit of 3 buttons, or if this limit is the number of buttons that are visible in the quick-launch bar?

That is to say, I''m wondering if the window created when you click the arrow-button isn''t destroyed then recreated on request after some period of time has elapsed since last use. If this was the case, I''d presume Windows would load the icons up in the same order that has been specified already by the user (by dragging them into their preferred position)


I ''做了进一步的研究,发现只要按下^按钮以查看隐藏的快速启动选项,图标就会恢复为原始顺序.
也就是说,此代码与在任务栏上都可见的3、5、10个快速启动快捷方式都可以正常工作.

似乎像我所怀疑的那样,按^按钮会使Windows重新加载所有快捷方式及其顺序.这包括可见和隐藏图标.如果不研究任何其他先前尝试获得此功能的尝试,我倾向于认为该命令将存储在注册表中或其他某个文件中.这似乎是一个值得探讨的话题.

---

啊哈哈! - 找到了.任务栏的外观(包括QL工具栏)由注册表项控制.它们不太友好,无法立即查看,因为它们似乎是键中每个字符的十六进制值的ascii表示,尽管我认为它们应该不太难处理.


此处 [
I''ve done further research, finding that the icons are re-instated to the original order whenever the ^ button is pressed to see hidden quick-launch options.
That is to say, this code works just fine with 3, 5, 10 quick-launch short-cuts, provided that they are all visible on the taskbar.

It seems that as I suspected, pressing the ^ button causes windows to reload all of the short-cuts and their order. This includes both visible and hidden icons. Without researching any other previous attempts to obtain this functionality, I''d be inclined to think that the order will be stored in the registry or some other file somewhere. It seems a worthy topic to look into.

---

AH-HAH!!! - Found it. The task-bar''s look and feel (including the QL toolbar) are controlled by registry keys. They''re not so friendly to look at immediately, as they appear to be an ascii representation of the hex-value of each char in the key, though I imagine that they shouldn''t be too hard to deal with.


Have a look here [^]to see a discussion about how to set up the QL bar in a pre-determined way for first-time installs. Ignore the registry-hive stuff and just concentrate on the idea of making a change, exporting the correct key and repeating the process. A quick comparison of the two versions of the same key should shed some light on which parts of the key you need to concentrate on.

Best regards & good luck!


这篇关于如何更改XP上的快速启动按钮的顺序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆