Search found 27 matches

by happybamboo
Tue Jun 08, 2010 12:27 am
Forum: wxWidgets Development (Chinese)
Topic: 请教下wxMDIParentFrame和wxMDIChildFrame的问题。
Replies: 3
Views: 2031

哪位兄台帮下忙啊,这个问题折磨我很久了。
by happybamboo
Mon Jun 07, 2010 1:39 pm
Forum: wxWidgets Development (Chinese)
Topic: 请教下wxMDIParentFrame和wxMDIChildFrame的问题。
Replies: 3
Views: 2031

我自己再顶下。大家帮帮忙吧。
by happybamboo
Mon Jun 07, 2010 7:42 am
Forum: wxWidgets Development (Chinese)
Topic: 请教下wxMDIParentFrame和wxMDIChildFrame的问题。
Replies: 3
Views: 2031

终于发帖成功了,我的问题应该不难,大家帮下我吧,谢谢了。
by happybamboo
Mon Jun 07, 2010 7:41 am
Forum: wxWidgets Development (Chinese)
Topic: 请教下wxMDIParentFrame和wxMDIChildFrame的问题。
Replies: 3
Views: 2031

请教下wxMDIParentFrame和wxMDIChildFrame的问题。

我写了俩个class,一个wxFrame继承于wxMDIParentFrame,一个wxChild继承于wxMDIChildFrame。然后定义了一个全局变量wxFrame *MainFrame; 在OnInit函数中给MainFrame赋值了,然后,通过一个循环定义了9个wxChild的变量。他们的父窗口都是MainFrame。但是这些子窗口都先不显示。而是必须等到我点击MainFrame的toolBar上的图标才一个一个的显示出来.我现在的做法是创建了一个wxChild **Child;然后给Child开了9个空间,分别在给Child[0-9]赋值,先给他们用函数Show(false),等...
by happybamboo
Mon Jun 07, 2010 7:37 am
Forum: wxWidgets Development (Chinese)
Topic: 有熟悉wxMDIParentFrame和wxMDIChildFrame的兄弟们帮
Replies: 0
Views: 1105

有熟悉wxMDIParentFrame和wxMDIChildFrame的兄弟们帮

我写了俩个class,一个wxFrame继承于wxMDIParentFrame,一个wxChild继承于wxMDIChildFrame。然后定义了一个全局变量wxFrame *MainFrame; 在OnInit函数中给MainFrame赋值了,然后,通过一个循环定义了9个wxChild的变量。他们的父窗口都是MainFrame。但是这些子窗口都先不显示。而是必须等到我点击MainFrame的toolBar上的图标才一个一个的显示出来.我现在的做法是创建了一个wxChild **Child;然后给Child开了9个空间,分别在给Child[0-9]赋值,先给他们用函数Show(false),等...
by happybamboo
Mon Jun 07, 2010 7:34 am
Forum: wxWidgets Development (Chinese)
Topic: 有熟悉wxMDIParentFrame和wxMDIChildFrame的兄弟们帮
Replies: 0
Views: 1252

有熟悉wxMDIParentFrame和wxMDIChildFrame的兄弟们帮

我写了俩个class,一个wxFrame继承于wxMDIParentFrame,一个wxChild继承于wxMDIChildFrame。然后定义了一个全局变量wxFrame *MainFrame; 在OnInit函数中给MainFrame赋值了,然后,通过一个循环定义了9个wxChild的变量。他们的父窗口都是MainFrame。但是这些子窗口都先不显示。而是必须等到我点击MainFrame的toolBar上的图标才一个一个的显示出来.我现在的做法是创建了一个wxChild **Child;然后给Child开了9个空间,分别在给Child[0-9]赋值,先给他们用函数Show(false),等...
by happybamboo
Thu Apr 01, 2010 2:12 am
Forum: wxWidgets Development (Chinese)
Topic: 求助,关于wxwidgets的wxAuiManager
Replies: 0
Views: 1139

求助,关于wxwidgets的wxAuiManager

我想在wxMDIParentFrame 中用wxAuiManager来管理界面,程序大体如下: MainFrame::MainFrame(const wxString& title, const wxSize& size, const wxPoint& pos, long style) : wxAuiMDIParentFrame(NULL, wxID_ANY, title, pos, size, style) { Maximize(true); m_mgr.SetManagedWindow(this); SetIcon(wxIcon(chip_xpm)); child = new ChildF...
by happybamboo
Wed Dec 02, 2009 1:05 am
Forum: C++ Development
Topic: Why wxTimer do not work?
Replies: 2
Views: 618

Auria wrote:I think you need to call
http://docs.wxwidgets.org/stable/wx_wxt ... ersetowner
Yes,you are right,thank you very very very very much.
this problem puzzled me for a week.........
thank you again.
by happybamboo
Tue Dec 01, 2009 1:48 pm
Forum: C++ Development
Topic: Why wxTimer do not work?
Replies: 2
Views: 618

Why wxTimer do not work?

I have derived a class MyCanvas from wxScrolledCanvas,and in MyCanvas there is a wxTimer m_timer,and there is a member function void OnTimer(wxTimerEvent&event).I think nothing is wrong.But no matter how i tryed,I can not receive Timer Event. So my question is: can wxScrolledCanvas receive wxTimerEv...
by happybamboo
Mon Nov 30, 2009 1:36 am
Forum: C++ Development
Topic: A problem about mouse left down
Replies: 2
Views: 528

Auria wrote:On mouse down, you could start a wxTimer that wakes up once in a while until the mouse is released (mouse release event stops the timer). Then, this timer can increment a counter, and something can happen when the counter reaches some value.
i'll try your answer,thank you very much.
by happybamboo
Mon Nov 30, 2009 1:07 am
Forum: C++ Development
Topic: A problem about mouse left down
Replies: 2
Views: 528

A problem about mouse left down

Hi,guys,this is my first time to ask question here,and english is not my mother language,so,if I spell some word wrong,or write something wrong,please don't mock me. Here is my problem.I drew a rectangle(or whatever) on a canvas,when I put my mouse on it ,I pressed the mouse left button down,and kee...
by happybamboo
Mon Nov 30, 2009 12:54 am
Forum: wxWidgets Development (Chinese)
Topic: 怎么才能延时显示呢?
Replies: 3
Views: 2409

Re: 怎么才能延时显示呢?

BlueDream wrote:
happybamboo wrote:我现在想实现一个延时显示的动作,用鼠标左键点击一个图形,按下鼠标左键持续一秒钟时间后,图形变化,否则图形不变,这个动作怎么才能实现呢?
有高人可以给我解答吗?
有个笨办法,在鼠标左键事件使用wxTimer,在时间事件中使图形变化,并停止timer
不是你想的那样啊,大哥,我要求的是一秒钟之后鼠标左键还在按下的状态图形才会变化,不是鼠标点击一秒之后就变化
by happybamboo
Mon Nov 30, 2009 12:52 am
Forum: wxWidgets Development (Chinese)
Topic: 请问下点击选择是怎么实现的?
Replies: 3
Views: 1666

auronc wrote:Reference below link:
http://www.codeproject.com/KB/GDI/CSimpleDraw.aspx

But the code is written by MFC. :lol:
这个下载不了代码啊。。。。。
by happybamboo
Mon Nov 23, 2009 8:33 am
Forum: wxWidgets Development (Chinese)
Topic: 请问下点击选择是怎么实现的?
Replies: 3
Views: 1666

请问下点击选择是怎么实现的?

比如说我在canvas上画了一些线(黑色),怎么样才能实现点击一下某条线,此线的颜色变成红色。是每条线都定好坐标,然后按鼠标点击的坐标来判断选择的哪条线,然后重画那条线吗?有没有其他方法?
by happybamboo
Tue Oct 27, 2009 10:22 am
Forum: wxWidgets Development (Chinese)
Topic: 求助!!!wxGrid
Replies: 1
Views: 1392

Re: 求助!!!wxGrid

happybamboo wrote:我自己写一个类继承于wxGrid类,为什么我不能实现EVT_MOTION等鼠标操作?
EVT_GRID_CELL_LEFT_CLICK等没问题,难道说wxGrid类不支持evt_motion事件吗?
另外,如果我建了一个Frame,然后Frame上又加了一个Panel,我点击鼠标左键的话,是Frame和Panel都能收到鼠标点击事件还是只有Panel能收到点击事件?