The toolbar structure that the purpose of this invention is to provide a kind of application program to the Windows operating system is carried out the method that function expands, and in order in a computer system, when realizing that the user operates toolbar, immediately expands the purpose of the function of toolbar.
Another object of the present invention provides a kind of hook procedure that utilizes, and obtains the method for the operating information on current tool hurdle immediately, so that retrieval in a dynamic data storehouse obtains required data according to the operating information that is obtained, is used to expand the function of toolbar.
A further object of the present invention provides a kind of extending method of function of toolbar, is used for increasing the not available function of toolbar of former application program.
The invention provides a kind of toolbar structure and carry out the method that function expands the application program in the Windows series operating system, in order in a computer system, when realizing that the user operates toolbar, the function that immediately expands toolbar.For example: when the extended function button sign (icon) of a certain application program is clicked, carry out the expansion of function, perhaps to functions such as the button text of current demonstration Chinesize immediately.
The disclosed method of the present invention is mainly finished by the running of following functional module, and it includes: a blocking module, an extended function processing module and a dynamic data storehouse.Utilize blocking module to obtain the operating information of relevant toolbar structure in the message formation (Massage queue) of operating system, the extended function processing module then is that retrieval in dynamic data bank obtains required data according to the operating information that obtains, and finishes the toolbar structure is carried out the purpose that function expands.
The invention provides a kind of when a certain application program (particularly the sort of application program) operation by other people institute's development and Design (runtime) it is carried out the method that instant function expands.Utilize method of the present invention can detect the real time operation data of the toolbar of a certain application program, and can the function of this toolbar be expanded, and do not have influence on the original function of application program itself, this function expands can comprise two aspects, the one, under the situation that guarantees the toolbar original function, the employed tool bar function of application programs increases, deletion, modification etc.; The 2nd, in toolbar, increase not available function in original toolbar.
The extending method of a kind of tool bar function provided by the invention, be applied in windows workspace (Windows) environment of a computer system, be used to provide a kind of method that can expand the function of toolbar in the operation tool hurdle, wherein the extending method of this tool bar function includes: with the related data of program; Start and initialization one hook procedure and monitor mode, in order to the message in the message round-robin queue that monitors and tackle this windows workspace system; Obtain the operating information of relevant toolbar in this message; And retrieve this dynamic data storehouse according to this operating information, obtain in order to expand the required function of this tool bar function and expand data, and handle this function expansion data and finish the function of this toolbar and expand.
Relevant detailed technology content of the present invention and embodiment, will illustrate with reference to the accompanying drawings as after.
Seeing also Fig. 1, is for realizing the computer system block scheme of method of the present invention.It is made of following hardware components and software section, includes:
The operating system 10 of one Windows series (as Windows 3.1, Windows 95, Winows98), and in order to the environment of a kind of windows workspace of application program to be provided;
One input block 20 (as keyboard, Genius mouse or other functions fellow) is available for users to input command or carries out the operation of instrument;
One output unit 30 (as display, touching-type monitor, loudspeaker or other functionally similar multimedia output apparatus) is in order to the operation message or the audio mail of display of visuallyization;
One message round-robin queue 40 (Massage loop);
One application program 50 (Application);
One blocking module 60 (Hook);
One function expands processing module 70; And
One dynamic data storehouse 80 (Dynamic Link Library, DLL).
(Windows 3.1 about the operating system of general windows series, Wineows 95 or Windows 98 etc.) running, wherein all event handlings all drive by message, message round-robin queue 40 is exactly a kind of systemic circulation of transporting all messages of operating system 10, in other words, all messages all need enter message round-robin queue 40, and each application program 50 (shown in Fig. 2 A) is given in distribution (Dispatch) again.The message of relevant toolbar then judges through message round-robin queue 40, again the message of relevant toolbar is distributed to application program 50 (being exactly the host program of toolbar) under the toolbar.The present invention utilizes interception (Hook) module 60 to add a filtration (shown in Fig. 2 B) in the process that message transmits.In the disclosed method of the present invention, the effect of blocking module 60 is each the bar message among the intercept message round-robin queue 40, and is sent to function expansion processing module 70.It is that the message that obtains is filtered and corresponding the processing that function expands 70 of processing modules, the message of handling for needs, retrieval in dynamic data storehouse 80 again, be used to obtain required data (being exactly the required data of function that is used to expand toolbar), Data Processing to obtaining again, the result that will handle exports output unit 30 or application program 50 to then, finishes the expansion of tool bar function; On the contrary, do not deal with for unwanted message.
Among Windwos operating system 10, any application program 50 that includes toolbar is independently processes (procedure), if want it is expanded, must have ability with its shared data, with regard to general dynamic data storehouse (DLL), though different application programs can be shared the code segment (Code Segment) in dynamic data storehouse, but for data section (Data Segment), each application program is obtained all is duplicate (copy) to whole data sections.For example, in same dynamic data storehouse, a certain application program has changed a variable (Variable) XX in the dynamic data storehouse, this change is used the application program in this dynamic data storehouse for another, be not visible, because it only is another part duplicate (copy) of having preserved whole variablees in the dynamic data storehouse.And when realizing the disclosed method of the present invention, we need when being the content of application program 50 change data sections in this dynamic data storehouse of any use, all application programs 50 of using this dynamic data storehouse all as seen, that is to say, need to safeguard a unique data section (Data Segment), reaching the purpose that data is shared, and enforcement means of the present invention see through exactly among dynamic data storehouse 80 data section definition (define) are realized for the mode of sharing data section 81 (Sharing Data Segment).And the structure in this dynamic data storehouse 80 is as shown in Figure 3, in Fig. 3, can see, and different application program 50a, 50b outside the C2, also uses shared data section 81 wherein except having the duplicate C1 of a data section separately jointly.
Among recording application program 50 among the dynamic data storehouse 80, what menus are arranged, what toolbars, what subitems each menu has, what graphic buttons each toolbar has, the title of the title of each menu and sign (ID) and each toolbar and sign (ID), and the related data item etc. that is used for extended function, carry out the function of toolbar and expand data required when handling so that provide function to expand processing module 70.
Key step flow process of the present invention as shown in Figure 4, includes:
1. at first be written into predefined dynamic data storehouse, comprising the related data that the application program of desiring extended function is arranged, the alleged application program that includes the toolbar of desire supervision in the subsequent step just, and the related data of the toolbar that is comprised;
2. start and initialization hook procedure 60 (be a kind of clasp joint function, Hook) and monitor mode, in order to the message in the message round-robin queue 40 of monitoring and interception operating system 10;
3. obtain the operating information of relevant toolbar in the aforementioned message, this operating information includes: the handle of the toolbar of current ejection (handel), and the title of the toolbar of current ejection is with the position of vernier; And
4. retrieval dynamic data storehouse is obtained in order to expand the required function of tool bar function and is expanded data, and processing capacity expansion data is finished the function expansion of toolbar.
Step 3 wherein also includes:
A. judge whether the message that hook procedure 60 is sent is that the window class that needs to monitor (is a kind of window object classification (Class), wherein include the toolbar window that desire monitors), if not the message of waiting for that then next bar is sent from hook procedure 60, otherwise carry out next step;
B. judge whether aforesaid window class message is the host window of toolbar, if not then waiting for next bar message of sending from hook procedure 60, otherwise carry out next step; And
C. obtain the operating information of toolbar.
Aforesaid step 4 item more includes:
A. judge whether the toolbar that obtains is the toolbar that needs extended function, if not, then be back to the step 1 that is written into predefined dynamic data storehouse and restart, otherwise the announcement (as graphic button or dialog box) of an extended function of demonstration in output unit;
B. corresponding dynamic data storehouse is read in retrieval, obtains the identification code (ID) of toolbar;
C. according to the toolbar identification code (ID) that obtains, retrieval obtains the data identification code (ID) of corresponding data section from dynamic data bank; And
D. according to the data identification code (ID) that obtains, obtain in order to expand the required function of tool bar function from dynamic data bank retrieval and to expand data, and see through function and expand processing module 70 processing capacity expansion data and finish the function of toolbar and expand.
Last with process flow diagram shown in Figure 5, the specific embodiment that utilizes method of the present invention the toolbar of Internet Explorer5.0 application program to be provided the extended function that helps on the instant line is described.The purpose of present embodiment is that the tool bar function to standard is expanded, realization can utilize a certain function in the mode show toolbar of multimedia, so that the user can be more directly perceived, learn and use this application program more easily, it takes the form of at the other help window that increases of the toolbar that can carry out helping on the instant line of multimedia, when the user clicks a certain help options button, will in this help window, play or show multimedia document about this push button function.
Reach the purpose of above expansion tool bar function, can realize (as Fig. 5 A, shown in the 5B) by following step, it includes:
1. at first be written into predefined dynamic data storehouse;
2. start and initialization interception (Hook) program 60 and monitor mode, in order to the message in the message round-robin queue 40 of monitoring and interception operating system 10;
3. judge whether the message that hook procedure 60 is tackled is that (this is a kind of window object classification (Class) to Rebare Window 32, wherein include the toolbar window that desire monitors) notification message (Notify that sends of class, this notifies the message of its parent window for subwindow), if not then wait for the message that next bar is sent from hook procedure 60;
4. whether the host application of judging this Rebare Window 32 is the Internet Explorer5.0 application program of desiring extended function, carries out next step if yes, otherwise waits for the message that next bar is sent from hook procedure 60;
5. judge that whether Notify is the operation message (as clicking this toolbar) of toolbar, if then obtain the handle and the title of this toolbar, otherwise waits for the message that next bar is sent from hook procedure 60;
6. according to the handle and the title retrieval dynamic data storehouse of the toolbar that obtains, obtain the identification code (ID) of toolbar;
7. retrieve in the dynamic data storehouse according to the identification code of this toolbar, comprise wired Instant Help option of going up, then carry out next step, otherwise be back to the step 1 that is written into predefined dynamic data storehouse if having;
8. obtain the position of toolbar according to the position of vernier;
9. at other help (ToolTip) window of setting up of this toolbar, help an identification code (ID) corresponding to one in this each help project in the window that helps;
10. a certain help project in helping (ToolTip) window (as playing the button of figure) when being selected, obtains the identification code (ID) of this help project;
11. retrieve this dynamic data storehouse, find out corresponding multimedia control item;
Handle this multimedia control item 12. call a multimedia processing module.
The invention provides a kind of method that toolbar in the application program of Windows series operating system is carried out the function expansion, can be in a computer system, when the user operates toolbar, expand the function of toolbar, for example add, revise, replace, delete some OptionButton or the like.For example, utilize the present invention can realize instant Chinesizing (daily use chemicals, Korea Sproization or the like) to toolbar, and the original function in tool for destroying hurdle not; Utilize the present invention can also realize Instant Help function on the multimedia line, when the user moves on to vernier a certain OptionButton on the toolbar, utilize multimedia broadcast modes such as video-audio to explain function of a certain OptionButton on this toolbar or the like to the user.