Search found 25 matches

by guyanqiu
Tue Jan 08, 2013 2:49 am
Forum: wxDev-C++
Topic: wxDev-C++7.4 sometime not save the changes of the project
Replies: 1
Views: 2328

wxDev-C++7.4 sometime not save the changes of the project

The version of mine is 7.4.2.569. Sometimes, when I create a new project, and add some files to the project, then compiler and link. The project can save and can open with the files. Then, I add other files to the project for update the program. then compiler and link. now, close the project , then ...
by guyanqiu
Wed Dec 05, 2012 4:33 am
Forum: The Code Dump
Topic: wxGrid with MS Excel (copy/paste)
Replies: 10
Views: 12091

Re: wxGrid with MS Excel (copy/paste)

Thanks all. I do a little change /******************************************************************************/ void myGrid::Copy(wxCommandEvent &event) { wxString copy_data; bool something_in_this_line; copy_data.Clear(); for (int i=0; i<GetRows();i++) { something_in_this_line = false; for (int j...
by guyanqiu
Fri Nov 02, 2012 3:13 am
Forum: Platform Related Issues
Topic: The background of wxToolbar not refresh in wxWidgets2.9.3
Replies: 0
Views: 638

The background of wxToolbar not refresh in wxWidgets2.9.3

The attachment is the source code.
I compile the code use wxWidgts2.8.12, the background of the wxToolbar refreshed OK,
but it not refreshed when compile by wxWidegets2.9.3.
TheCode.rar
code and image
(13.35 KiB) Downloaded 92 times
by guyanqiu
Tue Jul 17, 2012 2:51 am
Forum: C++ Development
Topic: Warning: duplicate section ... has different size
Replies: 1
Views: 3446

Re: Warning: duplicate section ... has different size

我也遇到了这个问题,究其原因是因为头文件和库文件不一致导致的。

I met this trouble too, because of the header files is not in accordance with the lib files.
You should use the right header files, or link the right libs.
by guyanqiu
Fri Jul 13, 2012 1:02 am
Forum: Compiler / Linking / IDE Related
Topic: cvFindContours crash with wxWidgets
Replies: 1
Views: 3349

Re: cvFindContours crash with wxWidgets

I solved it by use the OpenCV2.4.2.
by guyanqiu
Wed Jul 11, 2012 9:18 am
Forum: Compiler / Linking / IDE Related
Topic: cvFindContours crash with wxWidgets
Replies: 1
Views: 3349

cvFindContours crash with wxWidgets

When I use cvFindContours with wxWidgets I copy the code in the OpenCV dir sampe/c/squares.c, than change the GUI to wxWidgtes, But the cvPyrUp and cvFindContours is crashed. And cvCanny( tgray, gray, 0, thresh, 3 ); Only 3 is well ,5 and 7 crashed. Please forgive my pool English. // returns sequenc...
by guyanqiu
Tue Dec 13, 2011 12:59 am
Forum: wxWidgets Development (Chinese)
Topic: 为什么Drawbitmap在wxGTK中不显示图片
Replies: 3
Views: 3901

Re: 为什么Drawbitmap在wxGTK中不显示图片

我测试了,和用wxImage效果一样,我发现把那个文件对话框移到旁边,再打开图片,就能显示了,
我用英文也再跨平台板面问了一下,原来需要在EVT_PAINT中绘制,不然的话,重绘的时候就会把图片搞没掉,
所以之前文件对话框在显示的对话框之上,就不会显示出来图片了。
谢谢!
Windows平台和Linux平台不一样的地方,远远多过文档所说的。
by guyanqiu
Mon Dec 12, 2011 2:56 pm
Forum: C++ Development
Topic: Debian6.0.3 wxGtk Does Not Display wxBitmap
Replies: 2
Views: 748

Re: Debian6.0.3 wxGtk Does Not Display wxBitmap

Hi, You're painting in a wxClientDC, which works. Soon after, OnPaint() is called, which overwrites what you just displayed. You need to override the panel's OnPaint() and paint the image there, using a wxPaintDC. Regards, David Thanks very much for your reply. I use OnPaint() EVT_PAINT I test the ...
by guyanqiu
Mon Dec 12, 2011 6:22 am
Forum: wxWidgets Development (Chinese)
Topic: 为什么Drawbitmap在wxGTK中不显示图片
Replies: 3
Views: 3901

Re: 为什么Drawbitmap在wxGTK中不显示图片

bitmap 用带参数wxBitmapType的版本试试。 就是直接用wxBitmap(const wxString& name, wxBitmapType type)来读取图片,然后再显示么? if( dialog.ShowModal() == wxID_OK) { wxString FilePath_Name = dialog.GetPath(); //wxImage image(FilePath_Name); wxBitmap bitmap(FilePath_Name,wxBITMAP_TYPE_JPEG); wxClientDC dc(Panel1); dc.DrawBitmap(b...
by guyanqiu
Mon Dec 12, 2011 2:32 am
Forum: C++ Development
Topic: Debian6.0.3 wxGtk Does Not Display wxBitmap
Replies: 2
Views: 748

Debian6.0.3 wxGtk Does Not Display wxBitmap

Hello , I use code::blocks10.05, Debian squeeze 6.0.3 , Install the wxGtk2.8.10 with the Synaptic. I use the wxSmith, only palce a panel1 and a button1 in a dialog, when push the button , Select a image show on the panel. But the image just show in a flash.Here is the code: void imageDialog::OnButto...
by guyanqiu
Sat Dec 10, 2011 5:12 am
Forum: wxWidgets Development (Chinese)
Topic: 为什么Drawbitmap在wxGTK中不显示图片
Replies: 3
Views: 3901

为什么Drawbitmap在wxGTK中不显示图片

void imageDialog::OnButton1Click(wxCommandEvent& event) { wxInitAllImageHandlers(); //Initialize graphic format handlers wxString caption = wxT("选择照片"); wxString wildcard = wxT("照片(*.jpg;*.png;*.bmp)|*.jpg;*.png;*.bmp|所有文件(*.*)|*.*"); wxString defaultDir=wxT(""); wxString defaultFileName = wxT("");...
by guyanqiu
Thu Sep 22, 2011 1:11 pm
Forum: wxDev-C++
Topic: How to update WxWidgets in WxDev-C++?
Replies: 7
Views: 5965

Re: How to update WxWidgets in WxDev-C++?

Can you please write this in English? because I really don't understand anything. 1、Adding Environment Variables Mine wxDev-C++ install position:D:\Dev-cpp mingw32-make.exe install position:D:\Dev-Cpp\bin cc1.exe install position):D:\Dev-Cpp\libexec\gcc\mingw32\3.4.5 We need add these directories t...
by guyanqiu
Mon Sep 05, 2011 12:06 am
Forum: wxWidgets Development (Chinese)
Topic: wxDC上DrawBitmap,怎么保持刷新而不闪烁
Replies: 8
Views: 6685

Re: wxDC上DrawBitmap,怎么保持刷新而不闪烁

baozixishi wrote:楼主:请问你的这个闪烁问题有解决吗?我也遇到同样的问题,就是鼠标在移动的过程中,需要刷新,但是一刷新
就会出现闪烁的问题。
昨天刚刚解决了,在外部把图片处理好,转化成wxBitmap,然后,在UpdateUI事件中,绘制图片
具体可以参考这个
http://wiki.wxwidgets.org/An_image_panel
关键是,只在UpdateUI事件中调用DrawBitmap方法,这样就不闪烁了。
我之前闪烁,是因为在UpdateUI事件中,同时处理了图片。
by guyanqiu
Fri Sep 02, 2011 5:16 am
Forum: Compiler / Linking / IDE Related
Topic: Mismatch between the program and library build versions
Replies: 4
Views: 8643

Re: Mismatch between the program and library build versions

Fatal Error: Mismatch between the program and library build versions detected. The library used 2.8 (debug,ANSI,compiler with C++ ABI 1002,wx containers,compatible with 2.6), and your program used 2.8 (no debug,ANSI,compiler with C++ ABI 1002,wx containers,compatible with 2.6). ./run.sh: line 1: 18...
by guyanqiu
Fri Sep 02, 2011 3:44 am
Forum: wxWidgets Development (Chinese)
Topic: wxDC上DrawBitmap,怎么保持刷新而不闪烁
Replies: 8
Views: 6685

Re: wxDC上DrawBitmap,怎么保持刷新而不闪烁

samsam598 wrote:
guyanqiu wrote: 但仍然能显示大小不同的图片,小于控件的照片直接显示,大于控件范围的照片按比例缩小显示。
不明白为何不用wxStaticBitmap+wxSizer,俺曾用该方案做过测试,可以满足要求。
显示图片的区域是固定不变的,窗口没有标题栏,也不能拉伸。
使用wxStaticBitmap显示图片大小不一样时,这个控件的大小会变,就不符合我的要求了。
通讯录的照片大小都不一样,所以,我就没有使用wxStaticBitmap控件。如果显示同样大小的图片,用这个控件还算可以,但是也会发生拖动到屏幕边缘时,显示的图片会被擦掉,被其他窗口覆盖的话,移开其他窗口也会被擦掉。