Search found 67 matches

by shawnee
Wed Sep 26, 2018 6:01 am
Forum: C++ Development
Topic: wxEVT_LIST_ITEM_SELECTED could not be triggered again if the item has been selected
Replies: 9
Views: 871

Re: wxEVT_LIST_ITEM_SELECTED could not be triggered again if the item has been selected

Thanks doublemax, you always give us final professional answers!
I'd like ask you another question. If the listctrl is under Extended mode, how can I know the shift or ctrl key is pressing down when select item in list?
by shawnee
Wed Sep 26, 2018 3:49 am
Forum: C++ Development
Topic: wxEVT_LIST_ITEM_SELECTED could not be triggered again if the item has been selected
Replies: 9
Views: 871

Re: wxEVT_LIST_ITEM_SELECTED could not be triggered again if the item has been selected

The whole solve way is: this->mylist->Bind(wxEVT_LEFT_DOWN, &MyList::OnClickListItem, this, this->mylist->GetId()); this->mylist->Bind(wxEVT_LEFT_DCLICK, &MyList::OnClickListItem, this, this->mylist->GetId()); void MyList::OnClickListItem(wxMouseEvent& event) { int eventx = this->mylist->ScreenToCli...
by shawnee
Wed Sep 26, 2018 3:47 am
Forum: C++ Development
Topic: wxEVT_LIST_ITEM_SELECTED could not be triggered again if the item has been selected
Replies: 9
Views: 871

Re: wxEVT_LIST_ITEM_SELECTED could not be triggered again if the item has been selected

Oh, I got stupid, should be: this->mylist->SetItemState(row, wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED) to select an item.
by shawnee
Wed Sep 26, 2018 1:14 am
Forum: C++ Development
Topic: wxEVT_LIST_ITEM_SELECTED could not be triggered again if the item has been selected
Replies: 9
Views: 871

Re: wxEVT_LIST_ITEM_SELECTED could not be triggered again if the item has been selected

even I set -- this->mylist->SetItemState(row, 1, wxLIST_STATE_SELECTED), it's still useless.
by shawnee
Wed Sep 26, 2018 1:12 am
Forum: C++ Development
Topic: wxEVT_LIST_ITEM_SELECTED could not be triggered again if the item has been selected
Replies: 9
Views: 871

Re: wxEVT_LIST_ITEM_SELECTED could not be triggered again if the item has been selected

If I change wxEVT_LEFT_UP to wxEVT_LEFT_DOWN, then I could get left button single clicking mouse event.
But I got a new problem, no highlight on selected item is showing. If response wxEVT_LEFT_UP, the highlight is showing.
Anybody could help me out? Thanks!
by shawnee
Tue Sep 25, 2018 8:33 am
Forum: C++ Development
Topic: wxEVT_LIST_ITEM_SELECTED could not be triggered again if the item has been selected
Replies: 9
Views: 871

Re: wxEVT_LIST_ITEM_SELECTED could not be triggered again if the item has been selected

I bind this event: this->mylist->Bind(wxEVT_LEFT_UP, &MyList::OnClickListItem, this, this->mylist->GetId()); void MyList::OnClickListItem(wxMouseEvent& event) { int eventx = this->mylist->ScreenToClient(wxGetMousePosition()).x; int eventy = this->mylist->ScreenToClient(wxGetMousePosition()).y; wxPoi...
by shawnee
Tue Sep 25, 2018 6:36 am
Forum: C++ Development
Topic: wxEVT_LIST_ITEM_SELECTED could not be triggered again if the item has been selected
Replies: 9
Views: 871

wxEVT_LIST_ITEM_SELECTED could not be triggered again if the item has been selected

Hi All,

I'm using single selection wxListCtrl. I found when I select a selected item again, it won't trigger wxEVT_LIST_ITEM_SELECTED event.
How can I get wxEVT_LIST_ITEM_SELECTED event from selected item? I really need this kind of behavior.
Thanks!
by shawnee
Wed Aug 22, 2018 1:53 am
Forum: Platform Related Issues
Topic: if call wx GUI from dll, the style of GUI would be not WIN10 native style
Replies: 9
Views: 1012

Re: if call wx GUI from dll, the style of GUI would be not WIN10 native style

I'm using vs2015. Including path(c/c++ -> Gerneral -> Additional Include Directories ) about wxWidgets has been set. Are you sure this is the correct setting. These are for C++ compiler, not the resource one which are in Resources -> General -> Additional Include Directories. The setting is availab...
by shawnee
Tue Aug 21, 2018 12:30 pm
Forum: Platform Related Issues
Topic: if call wx GUI from dll, the style of GUI would be not WIN10 native style
Replies: 9
Views: 1012

Re: if call wx GUI from dll, the style of GUI would be not WIN10 native style

I got this prompt: fatal error RC1015: cannot open include file 'wx/msw/rcdefs.h' Did you add the required path (WXWIN\include) to the include directories for resource compiler? What compiler/linker are you using? MSVC adds the manifest automatically by default... I'm using vs2015. Including path(c...
by shawnee
Tue Aug 21, 2018 9:02 am
Forum: Platform Related Issues
Topic: if call wx GUI from dll, the style of GUI would be not WIN10 native style
Replies: 9
Views: 1012

Re: if call wx GUI from dll, the style of GUI would be not WIN10 native style

If load wx GUI not from dll project, just from main(.exe) project, the style is WIN10 style.
But I didn't add any rc or manifest to main project. I'm confused...
by shawnee
Tue Aug 21, 2018 8:56 am
Forum: Platform Related Issues
Topic: if call wx GUI from dll, the style of GUI would be not WIN10 native style
Replies: 9
Views: 1012

Re: if call wx GUI from dll, the style of GUI would be not WIN10 native style

Thank you PB!
I got this prompt: fatal error RC1015: cannot open include file 'wx/msw/rcdefs.h'
by shawnee
Tue Aug 21, 2018 8:24 am
Forum: Platform Related Issues
Topic: if call wx GUI from dll, the style of GUI would be not WIN10 native style
Replies: 9
Views: 1012

Re: if call wx GUI from dll, the style of GUI would be not WIN10 native style

Thanks PB!
I make a manifest copied from winxp.txt, and reside the folder where is as same as my application.
It seems not solve the problem.
by shawnee
Tue Aug 21, 2018 7:25 am
Forum: Platform Related Issues
Topic: if call wx GUI from dll, the style of GUI would be not WIN10 native style
Replies: 9
Views: 1012

if call wx GUI from dll, the style of GUI would be not WIN10 native style

I built two projects in Windows. One is the program entry project, the other is a dll project. In entry project, it's just WinMain entry. All of wxWidgets GUI issues(wxApp, wxFrame,etc.) will be done in dll project. I found, the appearance of widget, such as wxChoice, wxRadioButton and wxTextCtrl ar...
by shawnee
Tue Jun 26, 2018 1:57 am
Forum: C++ Development
Topic: wxBoxSizer border
Replies: 1
Views: 196

Re: wxBoxSizer border

Oh, I checked again. The outside extra one pixel gray border belongs to wxButton itself.
So, It seems no way to get rid of it? :(
by shawnee
Tue Jun 26, 2018 1:46 am
Forum: C++ Development
Topic: wxBoxSizer border
Replies: 1
Views: 196

wxBoxSizer border

Hi All, I'm running into a problem about wxBoxSizer border around wxButton. Here is my codes: wxPanel * regionPanel = new wxPanel(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNO_BORDER); regionPanel->SetBackgroundColour(wxColour(234,163,65)); wxBoxSizer * hSizer = new wxBoxSizer(wxHORIZONTA...