Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / The order of painting windows on the frame

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. The order of painting windows on the frame
#3382
Posted by: 2004-02-16 03:15:28
Does anybody know hot to change the order in which windows are painted. I was looking for something about that, but I found only informations about functions Lower() and Raise(), which only sends the window to top or bottom of the windows hierarchy. And these functions don't offer that what I was looking for. And one more thing. I create a frame with two simple windows on it. And one window partialy covered another. I also set different cursors for both windows, and I noticed that the cursor doesn't change as it should. When the mouse points the top window I see cursor of the bottom window. rem
Message2. Re: The order of painting windows on the frame
#3394
Posted by: upCASE 2004-02-18 20:32:36
Hi!
Lower() and Raise() only work for top level windows like dialogs or frames, but not for buttons etc. The only way to change that seems to be to reorder the creation of the windows.

upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message3. Re: The order of painting windows on the frame
#3484
Posted by: 2004-03-10 00:15:35
Hello, after long brake I found a few minutes to post an answer.  I used these methods with ordinary windows and I was surprised that it works. Though You can only change the order of one window, and only to top or bottom. And I have one more problem. I tried to use xrc library and I got these warnings.
[Warning] duplicate section `.data$_ZTV16wxTopLevelWindow' has different size
.../Program Files/Dev-Cpp/lib/libwxmsw.a(framecmn.o) C:Program FilesDev-Cppmingw32binld.exe: C
[Warning] duplicate section `.data$_ZTV19wxTopLevelWindowMSW' has different size
/Program Files/Dev-Cpp/lib/libwxmsw.a(toplevel.o) C:Program FilesDev-Cppmingw32binld.exe: C
[Warning] duplicate section `.data$_ZTV19wxTopLevelWindowMSW' has different size

... and many many more.

My xrc file looks like below.
<?xml version="1.0" encoding="utf-8"?>
  <resource xmlns="http://www.wxwindows.org/wxxrc" rel="nofollow" target="_blank" class="bt">http://www.wxwindows.org/wxxrc" version="2.3.0.1">
    <object name="B1" class="wxButton">
      <pos>10, 10</pos>
      <size>100, 30</size>
    </object>
  </resource>
I should get a button on the frame but I don't. Offcourse I put these two functions into the frame constructor

  wxXmlResource::Get()->InitAllHandlers();
  wxXmlResource::Get()->Load("resource.xrc");
ps. Thank's for Your help, UpCase.
rem.
Message4. Re: The order of painting windows on the frame
#3485
Posted by: upCASE 2004-03-10 02:02:29
Hi!
I guess you either updated to a newer gcc version or use an outdated XRC lib for an older version than you current gcc. Either way: I think you'll have to recompile the XRC lib in order to make it work.
Another chance could be trying to recompile the whole project, not just changed parts. I noticed that this can happen, but rarely does...

upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Message5. Re: The order of painting windows on the frame
#3486
Posted by: upCASE 2004-03-10 02:04:49
Hi again!
I forgot to mention that Lower() and Raise() do have this behavior (work only for one window and set it to a topmost position) because of the underlying API on windows. SetWindowPosition() can only change to z-order that way. I'm not sure how this is handled on other platforms.

upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-3-29  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0