Search found 12 matches

by cnfnjatmzx
Mon Oct 24, 2011 5:26 am
Forum: wxWidgets Development (Chinese)
Topic: wxWidgets过滤部分事件失效, 这是什么原因呢?
Replies: 6
Views: 6260

Re: wxWidgets过滤部分事件失效, 这是什么原因呢?

event.skip()的意思貌似不是过滤事件 event.skip()的作用是告诉MainLoop继续处理这个消息,而不是在当前handler处理完了就中断了, 就是说如果其他的parent的窗口或者paragate窗口还有相应的handler时,也应该调用他们。 直接return试试 你误会我的意思了, event.Skip() 是不会过滤掉事件. 我的问题是: if (wxIsalpha(event.GetKeyCode())) // 如果输入的是字母, 则把它显示出来;否则把它过滤掉并弹出一个警告窗口. { event.Skip(); } else // 过滤掉按键并弹出一个警告窗口...
by cnfnjatmzx
Wed Oct 05, 2011 3:18 pm
Forum: wxWidgets Development (Chinese)
Topic: wxWidgets过滤部分事件失效, 这是什么原因呢?
Replies: 6
Views: 6260

Re: wxWidgets过滤部分事件失效, 这是什么原因呢?

在Linux 下一切正常, 在 Windows 下, 用 VS2010 和 Code::blocks 的结果相同, 都是有这种问题.
希望大侠们帮忙看看, 在 Windows 下为什么会有这种错误产生.
小弟先行告谢!
by cnfnjatmzx
Wed Oct 05, 2011 1:39 pm
Forum: wxWidgets Development (Chinese)
Topic: wxWidgets过滤部分事件失效, 这是什么原因呢?
Replies: 6
Views: 6260

wxWidgets过滤部分事件失效, 这是什么原因呢?

大家好, 我是 wxWidgets 新手, 在匆匆看完了 <<使用wxWidgets进行跨平台程序开发>> 这本书后, 我感觉有很多地方都不扎实, 所以又从头开始看了, 今天刚开始就遇到了一个问题: 在 3.3 过滤某个事件 章节介绍的 过滤键盘按键 的小例子: 如果按键是 字母, 则正常输出, 否则什么也不输出. 这个程序我在 Linux 测试通过, 但在 Win7 64位下表现不正常: 如果按 数字键 1, 程序会提示按键不是字母, 但还是把 1 显示出来了, 之后再按任何数字都不会再输出了. 之后我测试了键盘上所有的符号(非字母), 发现对于所有的非字母键, 程序是可以判断出它不是字母,...
by cnfnjatmzx
Mon Sep 19, 2011 1:20 pm
Forum: wxWidgets Development (Chinese)
Topic: 使用Code::Blocks的中国人进来聚聚?
Replies: 27
Views: 39757

Re: 使用Code::Blocks的中国人进来聚聚?

Code::Blocks 10.05 编译 wxWidgets 耗费时间特长, 是命令编译或 anjuta 的好几倍, 不知同志们有这个问题不?
by cnfnjatmzx
Sun Sep 11, 2011 5:55 am
Forum: C++ Development
Topic: A question about the wxShowTip example.
Replies: 9
Views: 2595

Re: A question about the wxShowTip example.

I'm sorry. My english is so poor that make you fell puzzled.
Today, I get a load of how to install wxWidgets with VS2008. Though I can't build all succeeded, I can use VS2010 compile wxWidgets code. What's more, I succeeded in compiling wxShowTip example.
Thank you very much!
:lol:
by cnfnjatmzx
Sat Sep 10, 2011 1:45 pm
Forum: C++ Development
Topic: A question about the wxShowTip example.
Replies: 9
Views: 2595

Re: A question about the wxShowTip example.

You should try again with VS2010. If the provided .vcproj files don't work for you, try the .DSW file and let VS convert it. That always worked 100% for me. Oh no! I do this all the afternoon and night, but I also can't succeed! :cry: I have compiled the .lib , but I don't know how to setup the VS2...
by cnfnjatmzx
Fri Sep 09, 2011 6:47 am
Forum: C++ Development
Topic: A question about the wxShowTip example.
Replies: 9
Views: 2595

Re: A question about the wxShowTip example.

Auria wrote:I think the issue is unrelated to wxShowTip, seems like VC 6.0 is confused with either "static" or "size_t" (I can't quite tell, didn't use VC 6 in ages)

Thanks!
There must be have somethings wrong with VC++6.0. The same code can be compiled in Fedora 15.

Thanks all above!
by cnfnjatmzx
Thu Sep 08, 2011 5:38 am
Forum: C++ Development
Topic: A question about the wxShowTip example.
Replies: 9
Views: 2595

Re: A question about the wxShowTip example.

VC++6.0 is very, very, very outdated. Is there any chance you can update? There don't have any update for VC++6.0. At the begin time, I used Visual Studio 2010. But I failed setup wxWidgets for Visual Studio 2010. This method is invalid now. http://wiki.wxwidgets.org/Microsoft_Visual_C%2B%2B_Guide#...
by cnfnjatmzx
Thu Sep 08, 2011 3:36 am
Forum: wxWidgets Development (Chinese)
Topic: 大家都是怎么念wxWidgets?
Replies: 5
Views: 5177

Re: 大家都是怎么念wxWidgets?

同样纠结中...
by cnfnjatmzx
Wed Sep 07, 2011 2:30 pm
Forum: C++ Development
Topic: A question about the wxShowTip example.
Replies: 9
Views: 2595

A question about the wxShowTip example.

The book Cross Platform GUI Programming with wxWidgets have a wxShowTip example in page 211. Does it have some wrong? Where and how to solve it? void MyFrame::ShowTip() { static size_t s_index = (size_t) -1; if ( s_index == (size_t) - 1 ) { ... I use VC++6.0. The following are error information: war...