Icon implementation method and arrangement standard protocol in the lower left corner of the taskbar

Source: Internet
Author: User
What is the icon in the lower left corner of the taskbar?

This is the icon next to the start button in the lower left corner of the taskbar.

Currently, common software using such icons include: "small Q desk", "360 software assistant", and "cloud software ".

Implementation Method

From "problc" article, http://blog.csdn.net/problc/article/details/7039450
First, use tools such as spy ++ to detect the icon.

Win7:
Red Area: The class name is the container of shell_traywnd.
Yellow area: Class Name is the second-level container of rebarwindow32
Green area: the class name is the mstaskswwclass window.

WINXP:
Red Area: Red Area -- the class name is the container of shell_traywnd.
Yellow area: Class Name is the second-level container of rebarwindow32
Green Zone: Quick Start Zone
Purple window: The Window whose class name is mstaskswwclass

Analysis result

From the perspective of spy ++, the window of the small Q desk has nothing to do with shell_traywnd, not a subwindow of shell_traywnd.
Therefore, the small Q desk may not be added to the taskbar using shell extension.
Because it does not belong to the rebar, the small Q cannot be dragged to sort the position. It is not a shortcut to drag to the taskbar.
It is an independent window.
If you use movewindow, the result is the first image. However, if the status is unstable, the refresh task bar will become the second figure, and chrome will be overwritten by its own window. Q desk is not refreshed.
Is it necessary to hook the wm_poschanging of the rebar?
Is there any simple implementation method.
Bytes -----------------------------------------------------------------------------------------
If timer is used, it is not stable.
I did not expect this problem to be very complicated, and it is very troublesome to cross-process setwindowlong or hookwm_poschanging. Disassemble qdesk, which contains createremotethread, which may be related to this. Ollydbgis not used properly. If it is not used, the thread created in assumer.exe can be broken down. However, in x64, createremotethreadfailed to find the 64-bit explorer.exe for inject. There is also a dr. dll in qdesk. I don't know if there is a driver in it, or if there is something done in ring0. I am not sure about the x64 problem.
In a 32-bit system, createremotethread,enter a thread to cmd.exe, and then the setwindowlong replacement window process in the thread should not be difficult to implement.

Finally, x64 is done ..
Same principle, createremotethread-> loadliibray-> dllmain, setwindowlong gwl_wndproc-> wm_windowposchanging.
Only in x64, the injection program and dllboth need to be compiled into 64-bit programs to create the createremotethread in explorer.exe.

It took a long time on x64
Running result:

Standard Arrangement Protocol

Article from "nddgwml": http://bbs.kafan.cn/thread-1141287-1-1.html

(1)

The Windows Start Menu is in the lower left corner of the desktop. For a long time, Windows does not directly provide APIs to dock in the lower left corner of the taskbar. Since window3.1, the general style of the Start menu is similar. Is there any other software that can be used for users who want to get a better experience?
Currently, tools in the lower left corner are available: cloud software platform, Q desk, and 360 software assistant.
Q desk made some special Compatibility logic to be compatible with cloud software. It can coexist with cloud software.
 

Later, 360 also had a software assistant, and there was no compatibility logic. When 360 of the software assistants meet the cloud software, the cloud software icons are directly covered and cannot be used.

When 360 of the software assistants meet the Q desk, the Q desk icon is directly overwritten and cannot be used.


At that time, the user complained, and the situation in the lower left corner of the desktop was fierce.

(2)

In order to make the icons arranged in an orderly manner, it will not cause user troubles. If the user's machines are not used as the battlefield, Xiao Q's desk, cloud, and more than 360 correspondence are exchanged for discussion and communication, the third-party product team finally reached a consensus on software compatibility issues in October 31.
The general principle of the agreement is to come first. Who installs the software on the user's machine first, whose icons are close to the Start menu, and the similar software installed in the future is sorted in sequence. This is a consensus between the small Q desk, the cloud, and the 360 companies. It is a Convention formed on the basis of self-discipline. Maintaining the healthy and orderly development of the industry is the shared responsibility of software vendors.
The establishment of this agreement is the first civilized cooperation between domestic software vendors in the face of software conflicts. It is also a demonstration convention that promotes fair, equitable, and harmonious coexistence in the industry.
The three companies promise to strengthen self-discipline, abide by the established tripartite agreement, and jointly maintain Industry Order. You are welcome to work with users to check whether the three companies comply with the rules.
We also hope that the agreement will give the software that needs icons in the lower left corner of the future a sense of the future. We welcome other vendors to join us and make the small world in the lower left corner of the desktop flourish, provide more and better services to users.

(3)

Technically, what about this ordered queue? Because Windows itself does not provide such an interface for stopping, and naturally does not provide an effective sorting basis, the three parties need to jointly develop a set of system registration rules to ensure. With the cooperation of the three technical teams, the following rules are set up with reference to the calling rules of many system APIs in Windows:
Create an entry startbuttondock under the Registry HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Explorer \, and register the subitem to record the installation sequence.
The sub-keys are created from the beginning to the end in the order of program installation. The sub-keys are sorted by Arabic numerals (such as, 3.
Create a key in the subkey and write the Form class name or current handle to be docked in the lower left corner to facilitate the subsequent form docking. Note: The Form class name or the current handle information must be accurate and valid.

The general technical idea is as follows:
1. Installation Process:
1) write your own sequence subkeys under startbuttondock
2) write your own form Class Name
2. running process (start automatic operation or click Start)
1) Number of users under startbuttondock
2) locate a valid form (findwindow or read the form handle directly from the Registry) and dock it. If none of them are found, they are docked behind the Start Menu. Of course, you can write your own handle value in the registry.
3) Perform a regular scan to check whether any form that is in front of itself is activated. If yes, move the cursor to it.
3. Uninstall:
1) Clear the key values created under startbuttondock.

There are several points to be aware of or explain:
① Why are there two methods in the Protocol: handle (handle) and Class Name?
Because processes with different permissions in win7 cannot communicate with each other and cannot be found through findwindow, you can use a handle to write data directly if you have.
② Is the form in front of itself scanned and sorted by a timer in the Protocol efficient?
We provide a message mechanism for sendmessage in Protocol extensions to solve possible efficiency problems in the future. However, it has little impact on software efficiency.

Cloud, xiaoq desk, and 360 software assistant have released the compatible protocol versions respectively. We hope everyone can coexist in harmony under the compatible protocol specifications, and the more they do, the better.
If you do not understand the details of the rules, refer to the document in the Appendix: icon arrangement standard agreement in the lower left corner of the taskbar.

Attachment: http: // dl_dir2.qq.com/invc/qqpcmgr/other/deal.pdf

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.