TW468125B - Handling method for displaying transparent window - Google Patents
Handling method for displaying transparent window Download PDFInfo
- Publication number
- TW468125B TW468125B TW88111758A TW88111758A TW468125B TW 468125 B TW468125 B TW 468125B TW 88111758 A TW88111758 A TW 88111758A TW 88111758 A TW88111758 A TW 88111758A TW 468125 B TW468125 B TW 468125B
- Authority
- TW
- Taiwan
- Prior art keywords
- window
- transparent
- displaying
- scope
- item
- Prior art date
Links
Landscapes
- User Interface Of Digital Computer (AREA)
- Digital Computer Display Output (AREA)
Abstract
Description
4 6 812 5 五、發明說明(1) 【發明的應 本發明 種用以在透 其在螢幕申 【發明背景 大多數 視窗僅會在 拖曳、縮放 方法,只需 可,然而以 的顯示進行 對靜態透明 將透明視窗 其結果只是 處理動態透 示視窗前, (Bit map ) 如欲顯示之 ..且在多。:層視 景重晝的問 【發明欲解 現今處 完善,特別 的速度。 用範圍】 係有關一種顯示透明視窗的處理方法,尤指一 明視窗進行拖動、縮放、定位等操作時,處理 顯示的方法。 ] 情況下,透明視窗通常是靜態的,也就是透明 螢幕中的同一位置顯示、操作,而不需要進行 等動態操作,目前對此類靜態透明視窗的處理 在視窗類別註冊時初始化晝刷(即設為空)即 現今之視窗的顯示處理技術,對動態透明視窗 處理而言,就不十分完善,因為如果只簡單地 視窗進行動態操作,視窗系統(W i n d 〇 w s )會 建立位置的背景視為該視窗的背景同一處理, 視窗僅在建立時是透明的,這顯然没有意義。 明視窗最簡單的方法為螢幕拷貝,也訧是在顯 先將螢幕上預定顯示的區域拷貝成一位元圖 ,並貼在當前顯示之視窗的背景上,但是假 視窗的區域很大時,則會影響顯示的速度,而 窗…重.......豐·-或造切換時,·這種方-法將無-法'-解決脅〜· 題。 決之問題】 理顯示螢幕中,顯示動態透明視窗的方法不甚 是在顯示多個重疊的視窗時,會嚴重影響顯示 〇4 6 812 5 V. Description of the invention (1) [The invention should be applied to the screen through the application [Background of the invention Most windows are only dragging and zooming methods, only need to be, but the display is Static transparent will make the window transparent. The result is just before processing the dynamic transparent window. (Bit map) If you want to display it, and more. : Layers of Scenery and Day-Asking Question [Inventive desire to solve nowadays perfection, special speed. The scope of use is related to a processing method for displaying a transparent window, especially a method for processing display when a window is dragged, zoomed, or positioned. ] In the case, transparent windows are usually static, that is, displayed and operated at the same position on the transparent screen, without the need for dynamic operations. At present, the processing of such static transparent windows is initialized during the window class registration (ie Set to blank), that is, the current window display processing technology is not perfect for dynamic transparent window processing, because if you simply perform dynamic operations on the window, the window system (Wind 0ws) will create a background view of the position. For the same background of the window, the window is transparent only when it is created, which obviously makes no sense. The easiest way to display a window is to copy the screen. It is also necessary to first copy the area to be displayed on the screen into a bitmap and paste it on the background of the currently displayed window. However, when the area of the fake window is large, Will affect the speed of the display, and the window ... heavy ....... Feng ·· or when switching, · this method-no method--to solve the problem ~. The problem] In the display screen, the method of displaying dynamic transparent windows is not even when displaying multiple overlapping windows, which will seriously affect the display.
第4頁 五、發明說明(2) 【發明之概述】 本發明的主要目的在於利用透明視窗的隱藏/顯示功 能來實現單個透明視窗的動態操作,並採用將透明視窗句 柄(hand 1 e)註冊的方法來解決多重透明視窗重疊顯示時消 息陷入死循環、以及顯示速度遲缓的問題。 本發明係利用註冊窗口類函數(例如: AfxRegisterWndClass()),初始化晝刷參數(即設為 空),然後在CWnd類_生成一個對象,再將註冊類作為類 別名稱參數(ClassName)傳入即可建立一透明視窗,同 時藉由窗口移動消息響應函數(例如:Ο η Μ 〇 v i n g ())、窗 口尺寸變化消息響應函數(例如:OnS i ze ())、以及窗口 重晝消息響應函數(例如:OnPa i n t ())的重載,來保証 在拖動、縮放時不將背景一同帶走,和視窗在切換時能正 常顯示;在處理多重透明視窗時,則是採用視窗句柄註冊 的方法來進行,並在顯示時逐一取得其他透明視窗的位 置,一旦位置重疊便將其隱藏,並將開關量置位,且在所 有重疊視窗都已隱藏後,再給父視窗發送WM_P A I NT消息, 最後再依次將隱視窗顯示出來,如此不但可防止消息陷入 死循環a也可解.決背.景重晝和佔用系統資源的問題·:· ι 〜.. .. 有關本發明之詳細内容及技術,茲就配合圖式說明如 |; 下: 【圖式簡單說明】 第1圖,為本發明建立及操作透明視窗的流程圖。 第2圖,為本發明對多重透明視窗重疊處理的流程圖。Page 4 V. Description of the invention (2) [Summary of the invention] The main purpose of the present invention is to realize the dynamic operation of a single transparent window by using the hide / show function of the transparent window, and to register the handle of the transparent window (hand 1e). Method to solve the problem of messages falling into an endless loop and slow display speed when multiple transparent windows are overlapped and displayed. The present invention uses a registration window class function (for example: AfxRegisterWndClass ()) to initialize the day brush parameters (that is, set to null), and then generates an object in the CWnd class_, and then passes the registration class as the class name parameter (ClassName) A transparent window can be created, and at the same time, the message response function (for example: 0 η Μ ving ()), the window size change message response function (for example, OnSze ()), and the window daylight message response function ( For example: OnPa int ()) is overloaded to ensure that the background is not taken away when dragging and zooming, and the window can be displayed normally when switching; when processing multiple transparent windows, the method of window handle registration is used. To do it, and obtain the positions of other transparent windows one by one when displaying, hide them once the positions overlap, and set the switch, and after all overlapping windows have been hidden, send the WM_P AI NT message to the parent window, Finally, the hidden windows are displayed in turn, so that not only can prevent the message from falling into the endless loop a, it can also be solved. The problem. Jing Zhongtian and the problem of occupying system resources: ι ~ .. .. For more information and technology, hereby to the present invention as described with figures |; follows: Brief Description of the drawings] [FIG 1, a flowchart of establishing and operating a transparent window of the present invention. FIG. 2 is a flowchart of overlapping processing of multiple transparent windows according to the present invention.
4 6 81 2 5 五、發明說明(3) 第3圖,為本發明對特殊透明視窗處理的流程圖^ 【發明之詳細說明】 根據本發明所揭露之技術,對於視窗的顯示處理可區 分為四種態樣: 1 · 建立透明視窗: 請參閱「第1圖」*首係利用註冊窗口類函數(例 如:AfxRegisterWndClass())註冊一個視窗類(步驟1 0 1),初始化晝刷參數(即置為空)(步驟1 〇 2 ),然 後用窗口類(CWnd )中生成一個對象(步驟103),最 後在建立視窗時將註冊類作為類別名稱(ClassName )參 數傳入即可(步驟1 〇 4 )。 2 · 單個動態透明視窗操作及顯示: 接續「第1圖」所示,在透明視窗建立後,為保証在 拖動、縮放時不將上層視窗(如:父視窗;或多個子視窗 中的某一個;或作業系統的桌布)的背景一同帶走,必須 重載窗口移動和窗口尺寸變化的消息響應函數(步驟1 0 5 ),並在其中作如下的調用: S h 〇 wM i n d o w (· S-W _ Η· I D E ); 一..4 6 81 2 5 V. Description of the invention (3) Figure 3 is a flowchart of the special transparent window processing of the present invention ^ [Detailed description of the invention] According to the technology disclosed by the present invention, the display processing of the window can be divided into Four modes: 1. Create a transparent window: Please refer to "Figure 1" * The first is to register a window class using the registered window class function (for example: AfxRegisterWndClass ()) (step 1 0 1), and initialize the day brush parameters (ie Set it to blank) (step 1 〇 2), and then use the window class (CWnd) to generate an object (step 103), and finally pass the registration class as the ClassName (ClassName) parameter when creating the window (step 1 〇 4). 2 · Operation and display of a single dynamic transparent window: Continuing from "Figure 1", after the transparent window is created, in order to ensure that the upper window (such as: the parent window; One; or the wallpaper of the operating system), and the message response function (step 105) of window movement and window size change must be reloaded, and the following calls must be made in it: Sh owM indow (· SW _ Η · IDE); a ..
ShowWindow(SW_SHOW); • · ψ 同時為保証視窗在切換時能正常顯示,需重載窗口重 晝消息響應函數(例如:0 η P a i n t ())(步驟1 0 6 ), 並在其中作如下調用:ShowWindow (SW_SHOW); • ψ At the same time, in order to ensure that the window can be displayed normally when switching, it is necessary to reload the window and day message response function (for example: 0 η P aint ()) (step 1 0 6), and do the following in it transfer:
4 6 812 5 五、發明說明(4) dc. SetBkMode(TRANSPARENT);4 6 812 5 V. Description of the invention (4) dc. SetBkMode (TRANSPARENT);
ShowWindos(Sff_HIDE); ::SendMessage(GetParent() ->m_hWn, WM_PAI NT, 0, 0 );ShowWindos (Sff_HIDE); :: SendMessage (GetParent ()-> m_hWn, WM_PAI NT, 0, 0);
ShowWindow(S_SHOW); 3 * 多重透明視窗的重疊處理: 窗的窗口重 (WM_PAINT 息死循環, 口重晝消息 本發明係採 透明視窗建 '202 置(步驟2 置位(步驟 後(步驟2 再依次將隱 關其具體的 參閱「第2圖」,由於在單個動態透明視 畫消息響應函數中向父視窗發送窗口重晝消息 ),因此當多個透明視窗重疊時,將會造成消 即:視窗1 (窗口重畫消息)一 > 父視窗(窗 )、>視窗2 (窗口重畫消息)一 > 視窗1 , 用视窗句柄註冊的方法來解決這一問題,即在 立時將自己的視窗句柄進行註冊(步驟2 0 1 ),而在顯示時則逐一取得其他透明視窗的位 0 3 ),如果位置重疊則將其隱藏並將開關量 2 〇 4 ' 2 0 5 ),當所有重疊視窗都已隱藏 〇 6 ) ’再給父視窗發送窗口重晝消息,然後 藏視窗顯示,出來(-步驟2 0 7、2 0 8 ),有 實現如以下之虚擬碼: static BOOL bTransparentPaint; static CArray<HWND,HWND>ChidHand1e; static UINT nPaintNum; OnCreate(LPCREATESTRUCT ipCreateStruct)ShowWindow (S_SHOW); 3 * Overlay processing of multiple transparent windows: The window weight of the window (WM_PAINT). The present invention adopts a transparent window to build the '202 setting (step 2 setting (after step 2) Refer to "Figure 2" in turn for details. Because a window is sent to the parent window in a single dynamic transparent video message response function), when multiple transparent windows overlap, it will cause elimination: Window 1 (window redraw message)-> parent window (window), > window 2 (window redraw message)-> window 1, use the method of window handle registration to solve this problem, that is, immediately set yourself Register the window handle (step 2 0 1), and get the other transparent window bits 0 3 one by one during display), if the positions overlap, hide it and switch the value 2 0 4 '2 0 5), when all The overlapping windows have been hidden. 〇6) 'Then send a window re-day message to the parent window, and then hide the window to display it (-steps 2 0 7 and 2 0 8). The virtual code is as follows: static BOOL bTransparentPaint; static CA rray < HWND, HWND >ChidHand1e; static UINT nPaintNum; OnCreate (LPCREATESTRUCT ipCreateStruct)
46 81 25 五、發明說明(5)46 81 25 V. Description of the invention (5)
ChiIdHandle,Add(m_hWnd) return Ο ;ChiIdHandle, Add (m_hWnd) return Ο;
OnDestroy () i nt nSize = ChildHandle.GetSizeC); for(int 1=0;I<nSize;i++) i f(ChildHandle[i]= = m„hWnd) {OnDestroy () i nt nSize = ChildHandle.GetSizeC); for (int 1 = 0; I <nSize; i ++) i f (ChildHandle [i] = = m „hWnd) {
ChildHandle. RemoveAt(i, 1); break;ChildHandle. RemoveAt (i, 1); break;
OnPa i n t() if(lbTransparentPaint) { nPa i ntNum = 0; ShowWindow(SW_HIDE);OnPa i n t () if (lbTransparentPaint) {nPa i ntNum = 0; ShowWindow (SW_HIDE);
第8頁 4 6 8125 五、發明說明(6) int nSize=ChildHandle.GetSize(); CRect recti,rect2,rect3; GetWindowRect(rectl); CArrar<HWND,HffND>HideHandle; f or (i nt i=0;i<nSize ; i+ + ) if(ChildHandle[i] !=m_hWnd) { ::GetWindowRect(ChileHandle[i], rect2); if(rect3.IntersectRect(rectl,rec t2)) { bTransparentPaint=TURE; ::ShowWindow(ChildHandle[i], SW_HIDE);Page 8 4 6 8125 V. Description of the invention (6) int nSize = ChildHandle.GetSize (); CRect recti, rect2, rect3; GetWindowRect (rectl); CArrar < HWND, HffND >HideHandle; f or (i nt i = 0 ; i <nSize; i + +) if (ChildHandle [i]! = m_hWnd) {:: GetWindowRect (ChileHandle [i], rect2); if (rect3.IntersectRect (rectl, rec t2)) {bTransparentPaint = TURE; :: ShowWindow (ChildHandle [i], SW_HIDE);
HideHandle.Add(ChildHandle[i]); } } nPa i n tnum = hideHandle.GetSizeO; ::SendMessage(GetParent() ~ -' . ->m_bWnd, WM_PAINT, 0,0) ; f or (i nt j=nPaintNum;j>0;j--) HWNDhWndl=HideHandle[j-1]; ::ShowWindow(HxdeHandle [j-1],SW_SH0WN0RMAL);HideHandle.Add (ChildHandle [i]);}} nPa in tnum = hideHandle.GetSizeO; :: SendMessage (GetParent () ~-'.-≫ m_bWnd, WM_PAINT, 0,0); f or (i nt j = nPaintNum; j >0; j--) HWNDhWndl = HideHandle [j-1]; :: ShowWindow (HxdeHandle [j-1], SW_SH0WN0RMAL);
81 2 5 五、發明說明(7) }81 2 5 V. Description of the invention (7)}
ShowWindow(SW_SHOffNORMAL); } else { nPaintNum--; if(inPaintNum) bTransparentPaint ~ FLASE; 4 · 特殊透明視窗的處理: 請參閱「第3圖」,在某些情沉下,透明視窗中可能有某 些控件,如:編輯(E d i t )輸入區’而這些控件操作時通 常會重刷背景’因此在對此類透明視窗進行處理時,首先 必須重載窗口顏色控制消息響應函數(例如: OnCtlColor())(步驟3 0 1 ),並重設晝刷參數值(設 為空值)(步驟3 0 2),如以下之虚擬碼:ShowWindow (SW_SHOffNORMAL);} else {nPaintNum--; if (inPaintNum) bTransparentPaint ~ FLASE; 4 · Handling of special transparent windows: Please refer to "Figure 3". In some cases, there may be some in transparent windows Controls, such as: Edit (E dit) input area, and these controls usually redraw the background when operating. Therefore, when processing such transparent windows, you must first override the window color control message response function (for example: OnCtlColor ()) (Step 3 0 1), and reset the day brush parameter value (set to null value) (Step 3 0 2), such as the following virtual code:
OnCt 1 Ge i or ( ) ..v; return NULL; 然後在控件狀態改變(如:在編輯時的窗口改變消φ 響應函數(例如:0 n C h a n g e ())及窗口接收焦點消幸、OnCt 1 Ge i or () ..v; return NULL; and then change the state of the control (such as: window change during editing φ response function (for example: 0 n C h a n g e ()) and the window receiving focus,
第10頁 46 81 25 五、發明說明C8) 響應函數(OnSetf〇cus())動作)時,作如下的調用 (步驟3〇3 ):Page 10 46 81 25 V. Description of the invention C8) When the response function (OnSetfocus ()) action), make the following call (step 3〇3):
ShowWindow(SW_HIDE);ShowWindow (SW_HIDE);
ShowWindow(SW_SHOW);ShowWindow (SW_SHOW);
必須注意的是,當控件經過隱藏/顯示後會失去焦 點’因此父視窗在判明狀態後需調用窗口接收焦點消息響 應函數將焦點設回控件(步驟3 ◦ 4 ),而控件也必須藉 助一標誌量判斷窗口接收焦點消息(龍_setfocus )從何 而來(步驟3 〇 5 ) ’否則又將陷入死循環中°此外,若 某一透明視窗需作特殊處理,而且又被其他透明視窗蓋住 時,只要先依「第3圖」的流程對此視窗作處理後,再依 「第2圖」所示的流程針對視窗重疊的狀況祚進步的處 理即可。 以上所述主要是以子視窗的建立來說明,對於其他類 型视窗的顯示處理,其本基本原理相同,俱需依其對應的 對象作相應的改變,例如:在單一視窗建立時,將給父視 窗發的消息改為給系統,將對進程内部發犯改為系統註 jm ^It must be noted that when the control is hidden / shown, it loses focus. Therefore, after the parent window determines the state, it needs to call the window to receive the focus message response function to set the focus back to the control (step 3 ◦ 4), and the control must also use a flag Where does the judging window receive the focus message (Dragon_setfocus) from (Step 3 005) 'Otherwise it will fall into an endless loop ° In addition, if a transparent window needs special treatment and is covered by other transparent windows At this time, as long as this window is processed according to the process of "Figure 3", then the process of "window overlap" according to the process shown in "Figure 2" can be improved. The above description is mainly based on the creation of child windows. For the display processing of other types of windows, the basic principles are the same, and corresponding changes need to be made according to their corresponding objects. For example, when a single window is created, it will be given to the parent. The message sent by Windows was changed to the system, and the internal violation of the process was changed to the system note jm ^
Titj1 〇Titj1 〇
雖然本發.明已.以較佳實施例揭露如上’然其並务'用 以限定本發明,任何熟習此技藝者,在不腺離本發明之精 神和範圍内,當可作些許之更動與潤飾,因此本發明之保 護範圍當視後附之申請專利範圍所界定者為準。 【發明之效果】 根據本發明所揭露之技術在對多個重參之透明視窗作Although the present invention has been disclosed in the preferred embodiment to limit the invention as described above, any person skilled in the art can make some changes without departing from the spirit and scope of the invention. And retouching, so the scope of protection of the present invention shall be determined by the scope of the attached patent application. [Effects of the invention] According to the technology disclosed in the present invention,
46 81 2546 81 25
第12頁Page 12
Claims (1)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW88111758A TW468125B (en) | 1999-07-12 | 1999-07-12 | Handling method for displaying transparent window |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW88111758A TW468125B (en) | 1999-07-12 | 1999-07-12 | Handling method for displaying transparent window |
Publications (1)
Publication Number | Publication Date |
---|---|
TW468125B true TW468125B (en) | 2001-12-11 |
Family
ID=21641467
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW88111758A TW468125B (en) | 1999-07-12 | 1999-07-12 | Handling method for displaying transparent window |
Country Status (1)
Country | Link |
---|---|
TW (1) | TW468125B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106020358A (en) * | 2010-01-06 | 2016-10-12 | 苹果公司 | Transparent electronic device |
-
1999
- 1999-07-12 TW TW88111758A patent/TW468125B/en not_active IP Right Cessation
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106020358A (en) * | 2010-01-06 | 2016-10-12 | 苹果公司 | Transparent electronic device |
CN106020358B (en) * | 2010-01-06 | 2019-06-07 | 苹果公司 | Transparent electronic device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8723887B2 (en) | Methods and systems for per pixel alpha-blending of a parent window and a portion of a background image | |
US7543242B2 (en) | Method and structure for implementing layered object windows | |
US7409248B2 (en) | Layer based paint operations | |
Tan et al. | WinCuts: manipulating arbitrary window regions for more effective use of screen space | |
US6549218B1 (en) | Dynamic effects for computer display windows | |
US6954218B2 (en) | Method and apparatus for high-performance rendering and hit-testing of a window tree | |
US6088018A (en) | Method of using video reflection in providing input data to a computer system | |
US7969453B2 (en) | Partial display updates in a windowing system using a programmable graphics processing unit | |
Bell et al. | An annotated situation-awareness aid for augmented reality | |
KR20220032653A (en) | Systems, methods, and graphical user interfaces for interacting with augmented and virtual reality environments | |
US9292944B2 (en) | System and method for computing an image | |
CA2202106A1 (en) | A non-timeline, non-linear digital multimedia composition method and system | |
CN106547571A (en) | A kind of cardon display packing that can customize | |
CN107766024B (en) | PPT projection control method and system based on splicing wall | |
CN114924824B (en) | Visual object blurring method, visual object rendering method and computing device | |
CN107436760A (en) | Multiwindow rendering intent and device | |
CN107423014A (en) | Multiwindow rendering intent and device | |
JP3579775B2 (en) | Video generator | |
TW468125B (en) | Handling method for displaying transparent window | |
JP2003531429A (en) | Digital document processing | |
JP2006164177A (en) | Electronic conference system | |
US20050088446A1 (en) | Graphics layer reduction for video composition | |
JP2002057964A (en) | Projector and projection display system, and method for it and recording medium | |
CN102012811A (en) | Desktop labeling and interacting method | |
US5812125A (en) | Method and apparatus for selectively generating display images |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
GD4A | Issue of patent certificate for granted invention patent | ||
MM4A | Annulment or lapse of patent due to non-payment of fees |