Search found 102 matches

by lfjking
Fri Dec 21, 2018 10:56 am
Forum: wxWidgets Development (Chinese)
Topic: wxwidgets 3.0.4 wxString中文问题
Replies: 1
Views: 619

Re: wxwidgets 3.0.4 wxString中文问题

wxString s1("中文");
wxString s2(_("汉字"));
wxString s3(str);
wxString s4(str.c_str());

改:
wxString s1(wxT("中文"));
wxString s2(wxT("中文"));
wxString s3(str);
wxString s4(str);

s3,s4 是否正确取决与你的wxWidgets 编译时是多字节 还是 unicode
我使用的是 3.10版本 unicode 编译。
改成上面是可以正常显示的。
可视化UI编辑 建议使用wxFormBuilder.
by lfjking
Fri Dec 14, 2018 6:11 pm
Forum: C++ Development
Topic: [HELP]How to DIY the Frame Colour (block or front)?
Replies: 4
Views: 258

Re: [HELP]How to DIY the Frame Colour (block or front)?

thanks so mush.
Maybe we can do something to changed the Appearance of UI, eg.frame panel and even more.
Can make the interface of Wx colorful and diverse.
:D
by lfjking
Sat Dec 08, 2018 6:05 am
Forum: C++ Development
Topic: [HELP]How to DIY the Frame Colour (block or front)?
Replies: 4
Views: 258

[HELP]How to DIY the Frame Colour (block or front)?

OK.
The default color of the interface is too dazzling.
I want to set all the colors to dark, like to the vs2013.
who can give me some idear.
thanks.
by lfjking
Sat Nov 10, 2018 8:22 am
Forum: C++ Development
Topic: I want to move a wxStaticBitmap from frame to another Dialog, how to do?
Replies: 6
Views: 543

Re: I want to move a wxStaticBitmap from frame to another Dialog, how to do?

I don't know the SetContainingSizer what to do and why? According to documentation : This normally does not need to be called by user code. It is called when a window is added to a sizer, and is used so the window can remove itself from the sizer when it is destroyed. I follow the debug one by one....
by lfjking
Sat Nov 10, 2018 5:35 am
Forum: C++ Development
Topic: I want to move a wxStaticBitmap from frame to another Dialog, how to do?
Replies: 6
Views: 543

Re: I want to move a wxStaticBitmap from frame to another Dialog, how to do?

I check the code follow the breaking_point, I get the warried code: wxSizerItem* wxSizer::DoInsert( size_t index, wxSizerItem *item ) { m_children.Insert( index, item ); if ( item->GetWindow() ) item->GetWindow()->SetContainingSizer( this ); if ( item->GetSizer() ) item->GetSizer()->SetContainingWin...
by lfjking
Fri Nov 09, 2018 6:56 pm
Forum: C++ Development
Topic: I want to move a wxStaticBitmap from frame to another Dialog, how to do?
Replies: 6
Views: 543

Re: I want to move a wxStaticBitmap from frame to another Dialog, how to do?

It's not totally clear to me what you want to do. If you just want to display the same bitmap in another window, i would suggest to just create a new wxStaticBitmap based on the same bitmap. Everything else would be unnecessarily complicated. the project same as this head page that I define One of ...
by lfjking
Sat Jul 14, 2018 8:56 am
Forum: C++ Development
Topic: I want to move a wxStaticBitmap from frame to another Dialog, how to do?
Replies: 6
Views: 543

Re: I want to move a wxStaticBitmap from frame to another Dialog, how to do?

It's not totally clear to me what you want to do. If you just want to display the same bitmap in another window, i would suggest to just create a new wxStaticBitmap based on the same bitmap. Everything else would be unnecessarily complicated. sorry , I use the wrong fun setParent . I can switch nor...
by lfjking
Sat Jul 14, 2018 7:11 am
Forum: C++ Development
Topic: I want to move a wxStaticBitmap from frame to another Dialog, how to do?
Replies: 6
Views: 543

I want to move a wxStaticBitmap from frame to another Dialog, how to do?

I want to move a wxStaticBitmap from frame to another Dialog, how to do? frame: /////////////////////////////////////////////////////////////////////////////// /// Class MyFrame.h /////////////////////////////////////////////////////////////////////////////// #include "MyDialog.h" class MyFrame : pu...
by lfjking
Thu Jun 28, 2018 12:27 pm
Forum: C++ Development
Topic: issue: about wxSizer class fit size changed follow children size
Replies: 3
Views: 328

Re: issue: about wxSizer class fit size changed follow children size

ok I get this. I solved it, although it looks a bit stupid wxWindowList& childlist = parent->GetChildren(); int childcount = childlist.GetCount(); wxRect rc; for(int i = 0; i < childcount; ++i){ rc += childlist[i].GetRect(); } //wxAuiManager m_mgr wxAuiPaneInfo &it = m_mgr.GetPane(parent); it.Floati...
by lfjking
Wed Jun 27, 2018 6:42 pm
Forum: wxWidgets Development (Chinese)
Topic: 用wxSizer 到几个类 怎么 可以做到 让父panl 跟随子UI改变而改变大小
Replies: 0
Views: 764

用wxSizer 到几个类 怎么 可以做到 让父panl 跟随子UI改变而改变大小

我最近遇到个问题。虽然暴力解决了。但是 还是想发出来问下 可否用wx 到方式得到答案 就是 按比例 约束窗口size 到问题 一个主窗口MainFrame 调用了 wxAUI 创建一个 panl 添加到 wxAUI, panl 作为一个浮动窗口。 panl 增加一个 wxSizer 來管理 子控件 child_panl(这个用来放在panl 顶部 用来放 一排按钮的) 和 wxStaicBitmap. panl 有一个 size_chang 事件:当窗口大小变化时用来 按照 wxStaicBitmap包含到图片的大小比例來 缩放wxStaicBitmap 并约束 panl 的Size 大概像这...
by lfjking
Tue Jun 26, 2018 5:42 pm
Forum: C++ Development
Topic: issue: about wxSizer class fit size changed follow children size
Replies: 3
Views: 328

Re: issue: about wxSizer class fit size changed follow children size

Is this problem related to wxAUI? Did you try the ´layout in a "normal" wxFrame or wxDialog? Can you make a screenshot or scribble of what you want to achieve? yes i use the wxAUI. void MainFrame::Onm_Aui_float_panel_Changed_Size( wxSizeEvent& event ) { //Calculate the aspect ratio of the picture h...
by lfjking
Tue Jun 26, 2018 11:27 am
Forum: C++ Development
Topic: issue: about wxSizer class fit size changed follow children size
Replies: 3
Views: 328

issue: about wxSizer class fit size changed follow children size

I still can't understand the window adjustment correctly。 So I throw this Look at this code first: the MainForm: class MainFrame : public wxFrame { protected: wxPanel* m_Aui_float_panel; wxPanel* m_Aui_float_panel_child_top_panel; wxStaticBitmap* m_Aui_float_panel_child_center_bitmap; public: MainFr...
by lfjking
Sat Feb 03, 2018 11:34 pm
Forum: C++ Development
Topic: need help on using WxTextCtrl to read line by line and save
Replies: 20
Views: 2482

Re: need help on using WxTextCtrl to read line by line and save

I thought you want to show the cmd on the textctrl and get the code to the cmd to run? if right, you can chang to use wxExecute(): http://docs.wxwidgets.org/3.1.0/group__group__funcmacro__procctrl.html#gaa276e9e676e26bafeec3141b73399b33 One TextCtrl only show the cmd. One TextCtrl to get the code to...
by lfjking
Sat Feb 03, 2018 11:10 pm
Forum: C++ Development
Topic: On the random code problem of wxHtmlWindow
Replies: 5
Views: 880

Re: On the random code problem of wxHtmlWindow

My guess is that the automatic detection of the charset fails. Try the HTML4 style syntax: <meta http-equiv="content-type" content="text/html; charset=UTF-8"> i doubt its the html, I'd wager that its an issue with the way the file is read. reading line by line likely invokes wxString's implicit utf...