A kind of forms dynamic updating method
Technical field
The present invention relates to computer technology, more particularly to a kind of forms dynamic updating method.
Background technology
In existing computing device, either in PC machine or embedding assembly equipment, types of applications with window form to
Family shows various information, and including image, video, word etc., certain specific sector applications also need to show all kinds of uniquenesses to user
Information, such as the drawing of industrial design, layout etc..Forms include general forms and special forms, example in such applications
The form of such as Microsoft, the Chrome of Google.Generally, due in response to user instruction or system operation
In automatic trigger instruction be frequently necessary to be updated forms.However forms update method of the prior art often only for
Same model that is, only for same application, does not adapt to the needs of different application.In addition, in the prior art, in window each time
It is both needed to verify again in body renewal process, this delays the newer progress of forms significantly.The present invention provides a kind of forms thus
Dynamic updating method.
Invention content
To solve the problems of above-mentioned prior art, the dynamic base of the invention by setting multiple and different versions
(DLL), while the registration table for registering the forms pointer to object by verification is set, thus provide a kind of forms dynamic more
New method, including:Step 1 receives forms update instruction and in response to the forms more new command, and calling authentication instructs,
Confirm the current dynamic base for setting registration table;Step 2 calls registration table setting instruction, is noted by current dynamic lab setting
Volume table;Step 3 calls acquisition instruction, and forms pointer to object is directly acquired from registration table;Step 4 calls forms establishment to refer to
It enables, new forms example is created according to the forms pointer to object.
Preferably, the calling authentication instruction, confirms the current dynamic base of registration table is set to include:Call body
Part verification instruction, all dynamic bases in current application extent of competence are determined according to the authority information of return;Dynamic base is called to retouch
Instruction is stated, multiple dynamic bases for being used to set registration table are determined according to the dynamic base description information of return;Call version number's extraction
Instruction, determines the dynamic base mutually compatible with current application as current dynamic base according to the version number information of return.
Preferably, it is described to be included by current dynamic lab setting registration table:Setting registration table is asked to current dynamic base;When
Preceding dynamic base selects corresponding forms pointer to object according to the form types information that the more new command indicates, and by the window
Body pointer to object is put into registration table.
Preferably, the current dynamic base is the multiple for setting one in the dynamic base of registration table.
Preferably, the forms more new command refers at least to show updating type information, form types information, forms size letter
Breath etc..
Preferably, the updating type includes at least newly-increased, replacement etc..
Preferably, the forms example new according to forms pointer to object establishment includes:According to forms pointer to object
Determine acquiescence forms object;It instantiates the acquiescence forms object and obtains new forms example;The forms more new command is parsed,
Obtain forms dimension information;The new forms example is adjusted according to the forms dimension information.
Preferably, after step creates new forms example according to the forms pointer to object, further include step according to
The updating type of the forms more new command instruction shows the new forms example, specifically includes:Parse the forms update
Instruction obtains updating type information;If the updating type information is designated as increasing newly, it is real to directly display the new forms
Example;If the updating type information is designated as replacing, the forms example currently shown is replaced with the new forms example.
Preferably, it after the forms example currently shown with the new forms example replacement in step, further includes following
Step:If new forms example is shown in female forms example and the size of the new forms example is more than female window
Body example, the then size for adjusting the new forms example enable the new forms example to be contained in female forms reality
Example is internal.
Preferably, by 80% of the size adjusting of the new forms example for the size of female forms example.
Preferably, it is described to directly display the new forms example and include:If there is no the forms example currently shown,
Then shown the new forms example as female forms;It, then will be described new if there is the forms example currently shown
Forms example shown as child form.
Preferably, it is further comprising the steps of after step is shown the new forms example as child form:
If the size of the new forms example is more than the forms example currently shown, the new forms example is adjusted
Size enables the new forms example to be contained in inside the forms example currently shown.
Preferably, when receiving next forms more new command, next forms more new command is parsed first, obtains window
Body type information;Then judge that the corresponding forms object of form types information indicated with next forms more new command refers to
Whether needle is registered in registration table;If it is judged that be then using next forms more new command as currently
Forms more new command is simultaneously performed since the step 3, is otherwise performed since the step 2.
Preferably, the current dynamic base selects corresponding window according to the form types information that the more new command indicates
Body pointer to object includes:More new command described in parsing;Obtain form types information;Call forms pointer to object acquisition instruction, root
It is obtained and the corresponding forms object of the form types information from forms pointer to object chained list according to the form types information
Pointer.
Preferably, it is described to determine that acquiescence forms object includes according to forms pointer to object:The instruction of forms object acquisition is called,
The acquiescence forms object is obtained from forms library of object according to the forms pointer to object.
The present invention compared with prior art, has the following advantages:
By the dynamic base for setting multiple and different versions(DLL)So that it can be realized using the equipment of the method for the present invention suitable
The dynamic of different application is answered to update the needs of forms.
By setting the registration table for registering the forms pointer to object by verification so that greatly reduce forms update
Time cost.
Description of the drawings
Fig. 1 is the flow chart of forms dynamic updating method according to embodiments of the present invention.
Specific embodiment
Retouching in detail to one or more embodiment of the invention is hereafter provided together with the attached drawing for illustrating the principle of the invention
It states.The present invention is described with reference to such embodiment, but the present invention is not limited to any embodiments.The scope of the present invention is only by right
Claim limits, and the present invention covers many replacements, modification and equivalent.Illustrate in the following description many details with
Just it provides a thorough understanding of the present invention.These details are provided for exemplary purposes, and without in these details
Some or all details can also realize the present invention according to claims.
Fig. 1 shows the flow chart of forms dynamic updating method according to embodiments of the present invention.As shown in Figure 1, in step 1
In, it receives forms update instruction and in response to the forms more new command, calls authentication instruction, confirm to set registration
The current dynamic base of table.Wherein, forms more new command is to be sent to current application from system other application or process, by working as
Preceding application main program receives forms update instruction.Current application main program calls authentication to instruct by interface routine, so as to
The current dynamic base for setting registration table is confirmed in multiple dynamic bases.Wherein, the calling authentication instruction, confirms and uses
Include in the current dynamic base of setting registration table:Authentication instruction is called, current application is determined according to the authority information of return
All dynamic bases in extent of competence;Dynamic base description instruction is called, multiple use are determined according to the dynamic base description information of return
In the dynamic base of setting registration table;Version number's extraction instruction is called, is determined and current application phase according to the version number information of return
Compatible dynamic base is as current dynamic base.Wherein, institute is called respectively by interface routine by the main program of the current application
State authentication instruction, dynamic base description instruction and version number extraction instruction.Wherein, the current dynamic base is institute
It states multiple for setting one in the dynamic base of registration table.It is the multiple described for the dynamic base of registration table to be set to be all from
All dynamic bases.Wherein, if the dynamic stock mutually compatible with current application is in multiple versions, the dynamic of latest edition is selected
Library is as current dynamic base.
In step 2, registration table setting instruction is called, passes through current dynamic lab setting registration table.Wherein, by described current
The main program of application calls registration table setting instruction by interface routine.It is described to be included by current dynamic lab setting registration table:
Setting registration table is asked to current dynamic base;Current dynamic base selects phase according to the form types information that the more new command indicates
Corresponding forms pointer to object, and the forms pointer to object is put into registration table.Wherein, the forms more new command is at least
Indicate updating type information, form types information, forms dimension information etc.;The updating type includes at least newly-increased, replacement
Deng.After the forms pointer to object is put into registration table by current dynamic base, returned to the main program of the current application
Confirmation message, the confirmation message at least include indicating the information of key of the forms pointer to object in the registration table, institute
State the unique index information that key is each value in the registration table.
In step 3, acquisition instruction is called, forms pointer to object is directly acquired from registration table.Wherein, it is described currently
Main program calls the acquisition instruction, and direct from the registration table in response to the confirmation message by interface routine
Obtain forms pointer to object, the position of the one acquiescence forms object of forms pointer to object instruction.It is described acquiescence forms object be
Current dynamic base is selected according to the form types information that the more new command indicates.
In step 4, forms is called to create instruction, new forms example is created according to the forms pointer to object.Wherein
Forms is called to create instruction by interface routine, and according to the institute received from the registration table by the main program of the current application
It states forms pointer to object and creates new forms example.Wherein, it is described that new forms example is created according to the forms pointer to object
Including:Acquiescence forms object is determined according to forms pointer to object;It instantiates the acquiescence forms object and obtains new forms example;
The forms more new command is parsed, obtains forms dimension information;It is real according to the forms dimension information adjustment new forms
Example.Wherein, after step creates new forms example according to the forms pointer to object, step is further included according to the forms
The updating type of more new command instruction shows the new forms example, specifically includes:The forms more new command is parsed, is obtained
Updating type information;If the updating type information is designated as increasing newly, the new forms example is directly displayed;If institute
It states updating type information to be designated as replacing, then the forms example currently shown with the new forms example replacement.Wherein, in step
Suddenly it is further comprising the steps of after replacing the forms example currently shown with the new forms example:If new forms are real
Example is shown in female forms example and the size of the new forms example is more than female forms example, then is adjusted described new
The size of forms example the new forms example is contained in inside female forms example.For example, by described in
The size adjusting of new forms example is the 80% of the size of female forms example.
According to embodiments of the present invention, it is described to directly display the new forms example and include:If there is no current display
Forms example, then shown the new forms example as female forms;If there is the forms example currently shown,
Then the new forms example is shown as child form.Wherein, in step using the new forms example as sub- window
It is further comprising the steps of after body is shown:If the size of the new forms example is more than the window currently shown
Body example, the then size for adjusting the new forms example enable the new forms example to be contained in the current display
Forms example inside.For example, it is the ruler of forms example currently shown by the size adjusting of the new forms example
Very little 80%.
In embodiments of the present invention, when receiving next forms more new command, next forms update is parsed first
Instruction obtains form types information;Then judge corresponding with the form types information that next forms more new command indicates
Forms pointer to object whether registered in registration table;If it is judged that be then to be updated with next forms
Instruction is performed as current form more new command and since the step 3, is otherwise performed since the step 2.It is described to work as
Preceding dynamic base selects corresponding forms pointer to object to include according to the form types information that the more new command indicates:Parsing institute
State more new command;Obtain form types information;Forms pointer to object acquisition instruction is called, according to the form types information from window
It is obtained and the corresponding forms pointer to object of the form types information in body pointer to object chained list.It is described to be referred to according to forms object
Needle determines that acquiescence forms object includes:The instruction of forms object acquisitions is called, according to the forms pointer to object from forms library of object
It is middle to obtain the acquiescence forms object.
In conclusion forms dynamic updating method proposed by the present invention so that can be real using the equipment of the method for the present invention
Now adapt to the needs of the dynamic update forms of different application;Simultaneously so that greatly reducing the newer time cost of forms.
It should be understood that the above-mentioned specific embodiment of the present invention is used only for exemplary illustration or explains the present invention's
Principle, without being construed as limiting the invention.Therefore, that is done without departing from the spirit and scope of the present invention is any
Modification, equivalent replacement, improvement etc., should all be included in the protection scope of the present invention.In addition, appended claims purport of the present invention
Covering the whole variations fallen into scope and boundary or this range and the equivalent form on boundary and repairing
Change example.