Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Problem with OnSize() and VC++ .Net

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

  
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Problem with OnSize() and VC++ .Net
#4717
Posted by: 2004-07-04 06:05:03
  I got a wxFrame with a wxSplitterWindow member m_split. In the OnSize() function of the frame i use SetSashPosition(pos) of the splitter ,dependentent of the size of the frame.
  The problem i have is that when the frame is created,it calls OnSize() and m_split should be NULL. So I change the sash position only if m_split!=NULL.
I have tried with BCC5.5 and with mingw(dev-cpp),and it worked. But with VC++,all the frame's members aren't NULL, they all are 0xcdcdcdcd(I saw in the Debug). So I put this condition (m_split!=0xcdcdcd) and amazingly it works when compiling with VC++,but doesn't work when compiling with BCC5.5 or mingw.

  Basically,all I want is a Frame that has a splitter that changes its position whenever the Frame changes its size.
  And it's quite strange what is hapening with VC++, because when frame::OnSize() is called, all the frame members are uninitialized(should be NULL? but they are 0xcdcdcdcd) excepts the menus and menubar,which are initialized at some values,while ALL the frame members are initialized in the constructor of the frame.

  I'd really want to know when the size event is sent? Immediately after the frame constructor returns,or elsewhere.
Forum List • Thread List • Reply • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
¥880.00 ·
 
 
¥1,390.00 ·
 
 
¥1,380.00 ·
 
 
¥287.00 ·
 
 
¥918.00 ·
 
 
¥860.00 ·
© Sun 2024-11-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0