CN110032372A - A kind of method, apparatus and computer equipment creating window border - Google Patents

A kind of method, apparatus and computer equipment creating window border Download PDF

Info

Publication number
CN110032372A
CN110032372A CN201810027602.4A CN201810027602A CN110032372A CN 110032372 A CN110032372 A CN 110032372A CN 201810027602 A CN201810027602 A CN 201810027602A CN 110032372 A CN110032372 A CN 110032372A
Authority
CN
China
Prior art keywords
window
frame display
frame
current
parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201810027602.4A
Other languages
Chinese (zh)
Inventor
徐超
陈少杰
张文明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Douyu Network Technology Co Ltd
Original Assignee
Wuhan Douyu Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Wuhan Douyu Network Technology Co Ltd filed Critical Wuhan Douyu Network Technology Co Ltd
Priority to CN201810027602.4A priority Critical patent/CN110032372A/en
Publication of CN110032372A publication Critical patent/CN110032372A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • H04N21/4312Generation of visual interfaces for content selection or interaction; Content or additional data rendering involving specific graphical features, e.g. screen layout, special fonts or colors, blinking icons, highlights or animations

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

The embodiment of the invention provides a kind of method, apparatus and computer equipment for creating window border, apply in live streaming platform, which comprises Rimless window is set for current window according to the window attribute received;The window handle for obtaining the current window sets the current window to based on the window handle parent window of pre-registered frame display window;According to the second window parameter of frame display window described in the first window parameter setting of the current window;The frame display window is shown based on second window parameter;The frame display window is once drawn using preset rendering objects;Calling layer window drafting function carries out secondary drafting to the frame display window after primary draw, the frame display window after updating secondary drafting.

Description

Method and device for creating window frame and computer equipment
Technical Field
The invention belongs to the technical field of webpage window manufacturing, and particularly relates to a method and a device for creating a window frame, a calculation method and a calculation device.
Background
The web page is composed of a plurality of windows, generally speaking, each window is in a rectangular shape, the intersection of each window is overlapped, and the display is abrupt, so that the display effect of the window is poor.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiments of the present invention provide a method, an apparatus, a computer, and a device for creating a window frame, which are used to solve the technical problem in the prior art that the display of a window is not attractive due to the overlapping of the intersection of each window and the abrupt display in the window display process.
The invention provides a method for creating a window frame, which is applied to a live broadcast platform and comprises the following steps:
setting a current window as a frameless window according to the received window attribute;
acquiring a window handle of the current window, and setting the current window as a parent window of a pre-registered frame display window based on the window handle;
setting a second window parameter of the frame display window according to the first window parameter of the current window;
displaying the border display window based on the second window parameter;
drawing the frame display window for one time by using a preset rendering object;
and calling a layer window drawing function to perform secondary drawing on the frame display window after the primary drawing, and updating the frame display window after the secondary drawing.
In the foregoing solution, the setting a second window parameter of the border display window according to the first window parameter of the current window includes:
acquiring a left pixel left, a right pixel right, an upper pixel top, a lower pixel bottom and a SHADOW display width SHADOW _ MARGIN of the current window;
determining the width of the frame display window according to a formula int width, right, rect, left + SHADOW _ region 2;
determining the height of the frame display window according to a formula int height, bottom-bottom, top + SHADOW _ region, 2; wherein the first window parameter comprises: left pixel left, right pixel right, upper pixel top, lower pixel bottom and SHADOW display width SHADOW _ MARGIN of the current window; the second window parameter includes: the frame displays the width and height of the window.
In the foregoing solution, the drawing the frame display window by using a preset rendering object includes:
creating a DIB independent bitmap structure;
creating a device-related bitmap file by using the DIB-independent bitmap structure, and storing a bitmap handle of the bitmap file;
adding the bitmap handle to a pre-established Device object (DC);
creating a graphics device interface rendering object, adding the DC to the rendering object;
drawing a preset background picture by using the rendering object;
rendering the drawn background picture to the frame window;
and placing the frame window below the current window.
In the foregoing solution, the rendering the drawn background picture to the border window includes:
dividing the background picture into nine-square lattices in an equal ratio;
rendering the pictures corresponding to the four corners of the Sudoku to the four vertex angles of the frame window respectively;
rendering the four borders of the Sudoku to corresponding borders of the border window respectively;
and filling the middle part of the nine-square grid into the frame window.
In the above scheme, the calling layer window drawing function performs secondary drawing on the frame display window after the primary drawing, and includes:
and calling the layer window drawing function to draw the equipment object DC into the layer window, wherein the DC stores the secondary drawing data of the frame display window.
In the foregoing solution, after updating the frame display window after the secondary drawing, the method further includes:
monitoring message parameters in a message queue by using a message circulation function, and judging whether the message parameters are changed;
and under the condition that the message parameters are changed, calling a window callback function to process the message parameters.
The invention also provides a device for creating the window frame, which comprises:
the first setting unit is used for setting the current window as a frameless window according to the received window attribute;
the second setting unit is used for acquiring the window handle of the current window and setting the current window as a parent window of a pre-registered frame display window based on the window handle;
the third setting unit is used for setting a second window parameter of the frame display window according to the first window parameter of the current window;
the display unit is used for displaying the frame display window based on the second window parameter;
the drawing unit is used for drawing the frame display window once by using a preset rendering object;
and calling a layer window drawing function to perform secondary drawing on the frame display window after the primary drawing, and updating the frame display window after the secondary drawing.
In the foregoing solution, the third setting unit is specifically configured to:
acquiring a left pixel left, a right pixel right, an upper pixel top, a lower pixel bottom and a SHADOW display width SHADOW _ MARGIN of the current window;
determining the width of the frame display window according to a formula int width, right, rect, left + SHADOW _ region 2;
determining the height of the frame display window according to a formula int height, bottom-bottom, top + SHADOW _ region, 2; wherein the first window parameter comprises: left pixel left, right pixel right, upper pixel top, lower pixel bottom and SHADOW display width SHADOW _ MARGIN of the current window; the second window parameter includes: the frame displays the width and height of the window.
The present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
setting a current window as a frameless window according to the received window attribute;
acquiring a window handle of the current window, and setting the current window as a parent window of a pre-registered frame display window based on the window handle;
setting a second window parameter of the frame display window according to the first window parameter of the current window;
displaying the border display window based on the second window parameter;
drawing the frame display window for one time by using a preset rendering object;
and calling a layer window drawing function to perform secondary drawing on the frame display window after the primary drawing, and updating the frame display window after the secondary drawing.
The present invention also provides a computer device for creating a window border, comprising:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein,
the memory stores program instructions executable by the processor, the processor being capable of performing the method as described in any one of the above.
The embodiment of the invention provides a method and a device for creating a window frame and computer equipment, which are applied to a live broadcast platform, wherein the method comprises the following steps: setting a current window as a frameless window according to the received window attribute; acquiring a window handle of the current window, and setting the current window as a parent window of a pre-registered frame display window based on the window handle; setting a second window parameter of the frame display window according to the first window parameter of the current window; displaying the border display window based on the second window parameter; drawing the frame display window for one time by using a preset rendering object; calling a layer window drawing function to perform secondary drawing on the frame display window after the primary drawing, and updating the frame display window after the secondary drawing; therefore, by registering a frame display window in advance and setting the current window as a parent window of the frame display window, when the current window is arranged on the frame display window, the frame display window can become a frame of the current window; and then calling a layer window drawing function to perform secondary drawing on the frame display window after the primary drawing, so that the frame display window presents a gradual change effect, the situation that the windows are intersected and too steep is avoided, and the attractiveness of the window is improved.
Drawings
Fig. 1 is a schematic flowchart of a method for creating a window frame according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of an apparatus for creating a window frame according to a second embodiment of the present invention;
fig. 3 is a schematic overall structural diagram of a computer device for creating a window frame according to a second embodiment of the present invention.
Detailed Description
In order to solve the technical problem that in the prior art, the windows are displayed unattractive due to the fact that the intersection of the windows are overlapped and the display is abrupt in the window display process, the embodiment of the invention provides a method, a device and computer equipment for creating a window frame, which are applied to a live broadcast platform, wherein the method comprises the following steps: setting a current window as a frameless window according to the received window attribute; acquiring a window handle of the current window, and setting the current window as a parent window of a pre-registered frame display window based on the window handle; setting a second window parameter of the frame display window according to the first window parameter of the current window; displaying the border display window based on the second window parameter; drawing the frame display window for one time by using a preset rendering object; and calling a layer window drawing function to perform secondary drawing on the frame display window after the primary drawing, and updating the frame display window after the secondary drawing.
The technical solution of the present invention is further described in detail by the accompanying drawings and the specific embodiments.
Example one
An embodiment provides a method for creating a window frame, which is applied to a live platform, and as shown in fig. 1, the method includes:
s101, setting a current window as a frameless window according to the received window attribute;
in this step, in order to avoid using the frame of the current window, the current window needs to be set to be frameless.
In general, when the window attribute is borderless, then the current window is set to a borderless window according to the received window attribute. Here, this embodiment is explained taking a QT window as an example.
S102, acquiring a window handle of the current window, and setting the current window as a parent window of a pre-registered frame display window based on the window handle;
then acquiring a window handle of the current window, registering a frame display window, and setting the current window as a parent window of the frame display window based on the window handle; specifically, the window handle of the current window is transferred to the border display window, so that the current window can be set as the parent window of the border display window.
S103, setting a second window parameter of the frame display window according to the first window parameter of the current window;
in this step, before setting the second window parameter of the frame display window according to the first window parameter of the current window, a window callback function of the current window needs to be obtained, so that each message parameter can be monitored in the window operation process.
After a window callback function of a current window is acquired, setting a second window parameter of the frame display window according to a first window parameter of the current window;
specifically, a left pixel left, a right pixel right, an upper pixel top, a lower pixel bottom and a SHADOW display width SHADOW _ MARGIN of the current window are obtained;
determining the width int width of the frame display window according to a formula (1);
int width=rect.right-rect.left+SHADOW_MARGIN*2(1)
determining the height int height of the frame display window according to a formula (2);
int height=rect.bottom-rect.top+SHADOW_MARGIN*2(2)
wherein the first window parameter comprises: left pixel left, right pixel right, upper pixel top, lower pixel bottom and SHADOW display width SHADOW _ MARGIN of the current window; the second window parameter includes: the frame displays the width and height of the window. Of course, the second window parameter further includes: the method comprises the following steps of expanding a window, pointing to a pointer of a registered class name, pointing to a pointer of a window name, the style of the window, the horizontal position of the window and the vertical position of the window; these parameters may be used by default.
S104, displaying the frame display window based on the second window parameter; drawing the frame display window for one time by using a preset rendering object;
and after the second window parameter is determined, based on the second window parameter, calling a window display function of the system to display the frame display window.
And then, drawing the frame display window once by using a preset rendering object. The method comprises the following specific steps:
creating a DIB independent bitmap structure; creating a device-related bitmap file by using the DIB-independent bitmap structure, and storing a bitmap handle of the bitmap file; the bitmap handle is added to the pre-established device object DC to enable filling of the drawn pixel data into the DIB independent bitmap structure at the time of drawing.
Creating a graphic Device Interface rendering object (GDI +, Graphics Device Interface plus), and adding the DC to the rendering object; drawing a preset background picture by using the rendering object; rendering the drawn background picture to the frame window; and placing the frame window below the current window.
Here, the rendering the drawn background picture to the border window includes:
dividing the background picture into nine-square lattices in an equal ratio; rendering the pictures corresponding to the four corners of the Sudoku to the four vertex angles of the frame window respectively; rendering the four frames of the Sudoku to corresponding frames of the frame window respectively, and horizontally stretching the upper frame and the lower frame and vertically stretching the left frame and the right frame. And finally, filling the middle part of the nine-square grid into the frame window. This completes one rendering process.
S105, calling a layer window drawing function to perform secondary drawing on the frame display window after the primary drawing, and updating the frame display window after the secondary drawing;
however, the primary drawing process is only a common drawing process, and in order to enable the border display window to have a gradual change effect, a layer window drawing function needs to be called to perform secondary drawing on the once drawn border display window, which specifically includes:
calling the layer window drawing function to draw the equipment object DC into the layer window, wherein the DC stores secondary drawing data of the frame display window; the secondary rendering data is pixel data.
Therefore, after the frame display window is updated, the frame display window is a transparent window, and a gradual change effect can be presented at the intersection of the window frames.
Here, after updating the frame display window after the secondary drawing, the method further includes:
monitoring message parameters in a message queue by using a message circulation function, and judging whether the message parameters are changed; and under the condition that the message parameters are changed, calling a window callback function to process the message parameters.
Specifically, a window movement message parameter WM _ MOVE is monitored, and when the current window movement changes the position of the border window, the callback function processes the message parameter, so that the border window is always centered with respect to the current window. And;
monitoring a window SIZE message parameter WM _ WM _ SIZE; when the window size of the current window is changed, the callback function processes the message parameter so as to correspondingly change the size of the frame window; and;
monitoring window hiding message parameter WM _ WM _ SIZE; when the current window is hidden, the callback function processes the message parameter to exception the current window; and
monitoring an updated picture message parameter WM _ PAINT of a window; and when the current window is updated, calling the primary drawing, secondary drawing and updating methods to update the picture of the current window.
Therefore, the dynamic state of the current window can be detected in real time, and the frame window is adjusted in real time.
Example two
Corresponding to the first embodiment, this embodiment further provides an apparatus for creating a window frame, as shown in fig. 2, the apparatus includes: a first setting unit 21, a second setting unit 22, a third setting unit 23, a display unit 24, and a drawing unit 25; wherein,
in order to avoid using the border of the current window, the current window needs to be set to be borderless. In general, when the window attribute is borderless, the first setting unit 21 sets the current window to a borderless window according to the received window attribute.
The second setting unit 22 is configured to obtain a window handle of the current window, register a frame display window, and set the current window as a parent window of the frame display window based on the window handle; specifically, the window handle of the current window is transferred to the border display window, so that the current window can be set as the parent window of the border display window.
Here, before setting the second window parameter of the frame display window according to the first window parameter of the current window, the obtaining unit 26 needs to obtain the window callback function of the current window, so as to monitor each message parameter during the window operation process.
After acquiring the window callback function of the current window, the third setting unit 23 sets the second window parameter of the frame display window according to the first window parameter of the current window;
specifically, the third setting unit 23 obtains the left pixel left, the right pixel right, the upper pixel top, the lower pixel bottom, and the width SHADOW _ MARGIN of the SHADOW display of the current window;
determining the width int width of the frame display window according to a formula (1);
int width=rect.right-rect.left+SHADOW_MARGIN*2(1)
determining the height int height of the frame display window according to a formula (2);
int height=rect.bottom-rect.top+SHADOW_MARGIN*2(2)
wherein the first window parameter comprises: left pixel left, right pixel right, upper pixel top, lower pixel bottom and SHADOW display width SHADOW _ MARGIN of the current window; the second window parameter includes: the frame displays the width and height of the window. Of course, the second window parameter further includes: the method comprises the following steps of expanding a window, pointing to a pointer of a registered class name, pointing to a pointer of a window name, the style of the window, the horizontal position of the window and the vertical position of the window; these parameters may be used by default.
After the second window parameter is determined, the display unit 24 is configured to call a window display function of the system to display the frame display window based on the second window parameter.
The drawing unit 25 is configured to draw the frame display window once by using a preset rendering object; the method comprises the following specific steps:
creating a DIB independent bitmap structure; creating a device-related bitmap file by using the DIB-independent bitmap structure, and storing a bitmap handle of the bitmap file; the bitmap handle is added to the pre-established device object DC to enable filling of the drawn pixel data into the DIB independent bitmap structure at the time of drawing.
Creating a graphics device interface rendering object (GDI +) and adding the DC to the rendering object; drawing a preset background picture by using the rendering object; rendering the drawn background picture to the frame window; and placing the frame window below the current window.
Here, the rendering the drawn background picture to the border window includes:
dividing the background picture into nine-square lattices in an equal ratio; rendering the pictures corresponding to the four corners of the Sudoku to the four vertex angles of the frame window respectively; rendering the four frames of the Sudoku to corresponding frames of the frame window respectively, and horizontally stretching the upper frame and the lower frame and vertically stretching the left frame and the right frame. And finally, filling the middle part of the nine-square grid into the frame window. This completes one rendering process.
However, the primary drawing process is only a common drawing process, and in order to enable the border display window to present a gradual change effect, the drawing unit 25 further needs to call a layer window drawing function to perform secondary drawing on the once drawn border display window, which specifically includes:
calling the layer window drawing function to draw the equipment object DC into the layer window, wherein the DC stores secondary drawing data of the frame display window; the secondary rendering data is pixel data.
Therefore, after the frame display window is updated, the frame display window is a transparent window, and a gradual change effect can be presented at the intersection of the window frames.
Here, after updating the frame display window after the second rendering, the monitoring unit 27 is configured to:
monitoring message parameters in a message queue by using a message circulation function, and judging whether the message parameters are changed; and under the condition that the message parameters are changed, calling a window callback function to process the message parameters.
Specifically, a window movement message parameter WM _ MOVE is monitored, and when the current window movement changes the position of the border window, the callback function processes the message parameter, so that the border window is always centered with respect to the current window. And;
monitoring a window SIZE message parameter WM _ WM _ SIZE; when the window size of the current window is changed, the callback function processes the message parameter so as to correspondingly change the size of the frame window; and;
monitoring window hiding message parameter WM _ WM _ SIZE; when the current window is hidden, the callback function processes the message parameter to exception the current window; and
monitoring an updated picture message parameter WM _ PAINT of a window; and when the current window is updated, calling the primary drawing, secondary drawing and updating methods to update the picture of the current window.
Therefore, the dynamic state of the current window can be detected in real time, and the frame window is adjusted in real time.
EXAMPLE III
The present embodiment further provides a computer device for creating a window frame, as shown in fig. 3, the computer device includes: radio Frequency (RF) circuitry 310, memory 320, input unit 330, display unit 340, audio circuitry 350, WiFi module 360, processor 370, and power supply 380. Those skilled in the art will appreciate that the computer device configuration illustrated in FIG. 3 does not constitute a limitation of computer devices, and may include more or fewer components than those illustrated, or some components may be combined, or a different arrangement of components.
The following describes the components of the computer device in detail with reference to fig. 3:
RF circuitry 310 may be used for receiving and transmitting signals, and in particular, for receiving downlink information from base stations and processing the received downlink information to processor 370. In general, the RF circuit 310 includes, but is not limited to, at least one Amplifier, transceiver, coupler, Low Noise Amplifier (LNA), duplexer, and the like.
The memory 320 may be used to store software programs and modules, and the processor 370 may execute various functional applications of the computer device and data processing by operating the software programs and modules stored in the memory 320. The memory 320 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function, and the like; the storage data area may store data created according to use of the computer device, and the like. Further, the memory 320 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 330 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the computer apparatus. Specifically, the input unit 330 may include a keyboard 331 and other input devices 332. The keyboard 331 can collect the input operation of the user thereon and drive the corresponding connection device according to a preset program. The keyboard 331 collects the output information and sends it to the processor 370. The input unit 330 may include other input devices 332 in addition to the keyboard 331. In particular, other input devices 332 may include, but are not limited to, one or more of a touch panel, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 340 may be used to display information input by a user or information provided to the user and various menus of the computer device. The Display unit 340 may include a Display panel 341, and optionally, the Display panel 341 may be configured in the form of a Liquid Crystal Display (LCD), an organic light-Emitting Diode (OLED), or the like. Further, the keyboard 331 may cover the display panel 341, and when the keyboard 331 detects a touch operation on or near the keyboard 331, the keyboard 331 transmits the touch event to the processor 370 to determine the type of the touch event, and then the processor 370 provides a corresponding visual output on the display panel 341 according to the type of the input event. Although the keyboard 331 and the display panel 341 are shown in fig. 3 as two separate components to implement input and output functions of the computer device, in some embodiments, the keyboard 331 and the display panel 341 may be integrated to implement input and output functions of the computer device.
Audio circuitry 350, speaker 351, microphone 352 may provide an audio interface between a user and a computer device. The audio circuit 350 may transmit the electrical signal converted from the received audio data to the speaker 351, and the electrical signal is converted into a sound signal by the speaker 351 and output;
WiFi belongs to short-distance wireless transmission technology, and computer equipment can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 360, and provides wireless broadband internet access for the user. Although fig. 3 shows the WiFi module 360, it is understood that it does not belong to the essential constitution of the computer device, and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 370 is a control center of the computer device, connects various parts of the entire computer device using various interfaces and lines, performs various functions of the computer device and processes data by operating or executing software programs and/or modules stored in the memory 320 and calling data stored in the memory 320, thereby monitoring the computer device as a whole. Alternatively, processor 370 may include one or more processing units; preferably, the processor 370 may be integrated with an application processor, wherein the application processor primarily handles operating systems, user interfaces, application programs, and the like.
The computer device also includes a power supply 380 (such as a power adapter) for powering the various components, which may preferably be logically connected to the processor 370 through a power management system.
The method, the device and the computer equipment for creating the window frame provided by the embodiment of the invention have the beneficial effects that at least:
the embodiment of the invention provides a method and a device for creating a window frame and computer equipment, which are applied to a live broadcast platform, wherein the method comprises the following steps: setting a current window as a frameless window according to the received window attribute; acquiring a window handle of the current window, and setting the current window as a parent window of a pre-registered frame display window based on the window handle; setting a second window parameter of the frame display window according to the first window parameter of the current window; displaying the border display window based on the second window parameter; drawing the frame display window for one time by using a preset rendering object; calling a layer window drawing function to perform secondary drawing on the frame display window after the primary drawing, and updating the frame display window after the secondary drawing; therefore, by registering a frame display window in advance and setting the current window as a parent window of the frame display window, when the current window is arranged on the frame display window, the frame display window can become a frame of the current window; and then calling a layer window drawing function to perform secondary drawing on the frame display window after the primary drawing, so that the frame display window presents a gradual change effect, the situation that the windows are intersected and too steep is avoided, and the attractiveness of the window is improved.
The algorithms and displays presented herein are not inherently related to any particular computer, virtual machine, or other apparatus. Various general purpose systems may also be used with the teachings herein. The required structure for constructing such a system will be apparent from the description above. Moreover, the present invention is not directed to any particular programming language. It is appreciated that a variety of programming languages may be used to implement the teachings of the present invention as described herein, and any descriptions of specific languages are provided above to disclose the best mode of the invention.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functionality of some or all of the components of a gateway, proxy server, system according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on a computer-readable storage medium or may be in the form of one or more signals. Such a signal may be downloaded from an internet website, or provided on a carrier signal, or provided in any other form; the program when executed by a processor implements the steps of: setting a current window as a frameless window according to the received window attribute; acquiring a window handle of the current window, and setting the current window as a parent window of a pre-registered frame display window based on the window handle; setting a second window parameter of the frame display window according to the first window parameter of the current window; displaying the border display window based on the second window parameter; drawing the frame display window for one time by using a preset rendering object; and calling a layer window drawing function to perform secondary drawing on the frame display window after the primary drawing, and updating the frame display window after the secondary drawing.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
The above description is only exemplary of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements, etc. that are within the spirit and principle of the present invention should be included in the present invention.

Claims (10)

1. A method for creating a window frame is applied to a live platform, and the method comprises the following steps:
setting a current window as a frameless window according to the received window attribute;
acquiring a window handle of the current window, and setting the current window as a parent window of a pre-registered frame display window based on the window handle;
setting a second window parameter of the frame display window according to the first window parameter of the current window;
displaying the border display window based on the second window parameter;
drawing the frame display window for one time by using a preset rendering object;
and calling a layer window drawing function to perform secondary drawing on the frame display window after the primary drawing, and updating the frame display window after the secondary drawing.
2. The method of claim 1, wherein the setting a second window parameter of the bezel display window according to the first window parameter of the current window comprises:
acquiring a left pixel left, a right pixel right, an upper pixel top, a lower pixel bottom and a SHADOW display width SHADOW _ MARGIN of the current window;
determining the width of the frame display window according to a formula int width, right, rect, left + SHADOW _ region 2;
determining the height of the frame display window according to a formula int height, bottom-bottom, top + SHADOW _ region, 2; wherein the first window parameter comprises: left pixel left, right pixel right, upper pixel top, lower pixel bottom and SHADOW display width SHADOW _ MARGIN of the current window; the second window parameter includes: the frame displays the width and height of the window.
3. The method of claim 1, wherein the drawing the bezel display window using a preset rendering object comprises:
creating a DIB independent bitmap structure;
creating a device-related bitmap file by using the DIB-independent bitmap structure, and storing a bitmap handle of the bitmap file;
adding the bitmap handle to a pre-established device object DC;
creating a graphics device interface rendering object, adding the DC to the rendering object;
drawing a preset background picture by using the rendering object;
rendering the drawn background picture to the frame window;
and placing the frame window below the current window.
4. The method of claim 3, wherein the rendering the drawn background picture to the border window comprises:
dividing the background picture into nine-square lattices in an equal ratio;
rendering the pictures corresponding to the four corners of the Sudoku to the four vertex angles of the frame window respectively;
rendering the four borders of the Sudoku to corresponding borders of the border window respectively;
and filling the middle part of the nine-square grid into the frame window.
5. The method of claim 1, wherein the calling layer window drawing function draws the framed display window twice after the first drawing, comprising:
and calling the layer window drawing function to draw the equipment object DC into the layer window, wherein the DC stores the secondary drawing data of the frame display window.
6. The method of claim 1, wherein after updating the border display window after the second rendering, further comprising:
monitoring message parameters in a message queue by using a message circulation function, and judging whether the message parameters are changed;
and under the condition that the message parameters are changed, calling a window callback function to process the message parameters.
7. An apparatus for creating a window border, the apparatus comprising:
the first setting unit is used for setting the current window as a frameless window according to the received window attribute;
the second setting unit is used for acquiring the window handle of the current window and setting the current window as a parent window of a pre-registered frame display window based on the window handle;
the third setting unit is used for setting a second window parameter of the frame display window according to the first window parameter of the current window;
the display unit is used for displaying the frame display window based on the second window parameter;
the drawing unit is used for drawing the frame display window once by using a preset rendering object;
and calling a layer window drawing function to perform secondary drawing on the frame display window after the primary drawing, and updating the frame display window after the secondary drawing.
8. The apparatus according to claim 7, wherein the third setting unit is specifically configured to:
acquiring a left pixel left, a right pixel right, an upper pixel top, a lower pixel bottom and a SHADOW display width SHADOW _ MARGIN of the current window;
determining the width of the frame display window according to a formula int width, right, rect, left + SHADOW _ region 2;
determining the height of the frame display window according to a formula int height, bottom-bottom, top + SHADOW _ region, 2; wherein the first window parameter comprises: left pixel left, right pixel right, upper pixel top, lower pixel bottom and SHADOW display width SHADOW _ MARGIN of the current window; the second window parameter includes: the frame displays the width and height of the window.
9. A computer-readable storage medium, on which a computer program is stored, which program, when executed by a processor, carries out the steps of:
setting a current window as a frameless window according to the received window attribute;
acquiring a window handle of the current window, and setting the current window as a parent window of a pre-registered frame display window based on the window handle;
setting a second window parameter of the frame display window according to the first window parameter of the current window;
displaying the border display window based on the second window parameter;
drawing the frame display window for one time by using a preset rendering object;
and calling a layer window drawing function to perform secondary drawing on the frame display window after the primary drawing, and updating the frame display window after the secondary drawing.
10. A computer device for creating a window border, comprising:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein,
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 6.
CN201810027602.4A 2018-01-11 2018-01-11 A kind of method, apparatus and computer equipment creating window border Pending CN110032372A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810027602.4A CN110032372A (en) 2018-01-11 2018-01-11 A kind of method, apparatus and computer equipment creating window border

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810027602.4A CN110032372A (en) 2018-01-11 2018-01-11 A kind of method, apparatus and computer equipment creating window border

Publications (1)

Publication Number Publication Date
CN110032372A true CN110032372A (en) 2019-07-19

Family

ID=67234340

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810027602.4A Pending CN110032372A (en) 2018-01-11 2018-01-11 A kind of method, apparatus and computer equipment creating window border

Country Status (1)

Country Link
CN (1) CN110032372A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473077A (en) * 2013-09-27 2013-12-25 珠海市君天电子科技有限公司 Method and device for enriching display interface of main window of application program
CN105468674A (en) * 2015-11-12 2016-04-06 珠海市君天电子科技有限公司 Window interception method and device and terminal equipment
CN105930037A (en) * 2016-06-12 2016-09-07 广州视睿电子科技有限公司 window frame shadow display method and device
CN106020591A (en) * 2016-05-10 2016-10-12 上海青研信息技术有限公司 Eye-control widow movement technology capable of achieving human-computer interaction

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103473077A (en) * 2013-09-27 2013-12-25 珠海市君天电子科技有限公司 Method and device for enriching display interface of main window of application program
CN105468674A (en) * 2015-11-12 2016-04-06 珠海市君天电子科技有限公司 Window interception method and device and terminal equipment
CN106020591A (en) * 2016-05-10 2016-10-12 上海青研信息技术有限公司 Eye-control widow movement technology capable of achieving human-computer interaction
CN105930037A (en) * 2016-06-12 2016-09-07 广州视睿电子科技有限公司 window frame shadow display method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
AHYSWANG: "QT 9宫格实现窗口阴影", 《HTTPS://BLOG.CSDN.NET/AHYSWANG/ARTICLE/DETAILS/41476343》 *

Similar Documents

Publication Publication Date Title
CN106991645B (en) Image split-joint method and device
KR102353766B1 (en) Apparatus and method for controlling display
US10884605B2 (en) Methods and systems for displaying hidden information on a web page
CN103226453B (en) Method for mapping display and operation of mobile phone screen to computer terminal
CN105808044B (en) Information pushing method and device
US9805488B2 (en) Method and apparatus for processing image
CN105867751B (en) Operation information processing method and device
WO2017008551A1 (en) Bullet screen display method and apparatus
CN110399583B (en) Page display method and device, electronic equipment and storage medium
CN106780684B (en) Animation effect realization method and device
US11294533B2 (en) Method and terminal for displaying 2D application in VR device
EP3142336A1 (en) Synchronization method for notification message of electronic device, and electronic device
KR20150072819A (en) Method and apparatus for displaying digital contents in electronic device
US20150379163A1 (en) Method and Apparatus for Creating Curved Surface Model
CN110989878A (en) Animation display method and device in applet, electronic equipment and storage medium
WO2018000372A1 (en) Picture display method and terminal
DE202017007296U1 (en) An electronic device comprising a curved display area
CN103325332A (en) Webpage refreshing method, device and equipment
CN106250080A (en) Method for displaying image and device
CN109885302A (en) A kind of methods of exhibiting and terminal device applied fastly
US20190205367A1 (en) Method and Apparatus for Obtaining Web Content
CN109992337B (en) Webpage display method and device and storage medium
CN106873851A (en) Method, device and terminal that 3D regards the Widget imitated are created in interactive interface
CN103713874A (en) Power system real-time picture Web interface showing method
CN103412707B (en) Method, device and equipment that a kind of display box is shown

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190719

RJ01 Rejection of invention patent application after publication