Search found 44 matches
- Fri Oct 02, 2020 11:16 pm
- Forum: C++ Development
- Topic: wxMenuIttem get label text from selected ID
- Replies: 1
- Views: 175
wxMenuIttem get label text from selected ID
Can I get the text of the submenu name via ID? I have an event EVT_MENU_RANGE (ID_SUB_RADIO, ID_SUB_RADIO + 10000, RadioStationFrame :: OnSelectRadio); I try this void RadioStationFrame::OnSelectRadio(wxCommandEvent& event){ sub_radio->SetId(event.GetId()); wxString m = sub_radio->GetName(); wxLogMe...
- Sat Sep 05, 2020 7:24 pm
- Forum: C++ Development
- Topic: wxMediaCtrl and more stream information
- Replies: 1
- Views: 194
wxMediaCtrl and more stream information
I made a small test program for listening to radio over streaming with wxMediaCtrl and it works properly ... ... ... MC = new wxMediaCtrl(this, -1, "", wxPoint(18,52), wxSize(480,110), 0, wxMEDIABACKEND_WMP10); MC->ShowPlayerControls(wxMEDIACTRLPLAYERCONTROLS_DEFAULT); MC->Connect(wxEVT_MEDIA_LOADED...
- Wed Aug 19, 2020 11:48 am
- Forum: C++ Development
- Topic: wxButton and identifier
- Replies: 4
- Views: 238
Re: wxButton and identifier
Thank you all for your help. What I needed was this:
and works.
Thx @ONEEYEMAN and @PB.
Code: Select all
wxButton* buttonClicked = dynamic_cast<wxButton *>( event.GetEventObject() );
tcPinDisplay->SetValue(buttonClicked->GetLabel());
Thx @ONEEYEMAN and @PB.
- Wed Aug 19, 2020 8:47 am
- Forum: C++ Development
- Topic: wxButton and identifier
- Replies: 4
- Views: 238
Re: wxButton and identifier
Thx but for this
I have error
Code: Select all
wxButton buttonClicked = dynamic_cast<wxButton *>( event.GetEventObject() );
error: conversion from 'wxButton*' to non-scalar type 'wxButton' requested|
- Wed Aug 19, 2020 1:45 am
- Forum: C++ Development
- Topic: wxButton and identifier
- Replies: 4
- Views: 238
wxButton and identifier
How to get the value of wxButton label based on the Identifier or otherwise. I have a few buttons on wxDialog and I would like to bind the event by clicking on any button to display the label of that button.
- Mon Jun 08, 2020 10:34 pm
- Forum: C++ Development
- Topic: wxBase64Encode
- Replies: 4
- Views: 429
Re: wxBase64Encode
Generally the e-mail attachment size is quite limited (usually in the order of 10s of MBs at most), so it should be OK to load the whole file at once into memory. Not sure if using wxFFile instead of wxFile would be faster here. I suppose that wxFile, unlike wxFFile, is opened in binary mode by def...
- Mon Jun 08, 2020 7:10 pm
- Forum: C++ Development
- Topic: wxBase64Encode
- Replies: 4
- Views: 429
Re: wxBase64Encode
https://docs.wxwidgets.org/trunk/group__group__funcmacro__misc.html#gaafaeb4b7aef5c4f9795341938cb469ae This is my code and it is currently working. I don't know if it's a good approach or it could be better? wxFileDialog openFileDialog(this, _(_T("Izaberi fajl koji želite da šaljete")), "", "", "Al...
- Mon Jun 08, 2020 1:03 am
- Forum: C++ Development
- Topic: wxBase64Encode
- Replies: 4
- Views: 429
wxBase64Encode
How do I do wxBase64 encodes for an entire file, say .zip extensions? Is this possible in wxWidgets? I need it to send an email with an associated file from the 'curl' library where Base64 file encoding is required.
Thx.
Thx.
- Mon Apr 20, 2020 10:26 am
- Forum: C++ Development
- Topic: wxListEvent
- Replies: 3
- Views: 400
Re: wxListEvent
Thanks. That is what I need.
Code: Select all
wxMouseState mouse_state;
mouse_state = wxGetMouseState();
if (mouse_state.LeftIsDown())
wxMessageBox("Left click")
- Sun Apr 19, 2020 11:53 pm
- Forum: C++ Development
- Topic: wxListEvent
- Replies: 3
- Views: 400
wxListEvent
I have one event ItemSelect function
My question is : How I know what is mouse button is pressed (LEFT or RIGHT) before producing the event?
For example, please.
Thx.
me[R]a
Code: Select all
OnlcRacunItemSelect(wxListEvent& event)
For example, please.
Thx.
me[R]a
- Fri Apr 17, 2020 11:56 am
- Forum: C++ Development
- Topic: wxExecute and mysqldump
- Replies: 5
- Views: 485
Re: wxExecute and mysqldump
I produced this code and now it works as I wanted. It may not be in the spirit of good code, but it works. wxString myAppPath(wxStandardPaths::Get().GetDataDir()); //myPath je putanja do exe folder wxString dest_file = myAppPath + _T("\\backup.bat"); wxString command = myAppPath + "\\mysqldump --hos...
- Fri Apr 17, 2020 11:10 am
- Forum: C++ Development
- Topic: wxExecute and mysqldump
- Replies: 5
- Views: 485
Re: wxExecute and mysqldump
In addtion to what Nuki wrote: The output redirection with ">" is a function of the shell, that doesn't work with wxExecute. Try creating a new shell by putting a "CMD /C" in front of the command. But this will most likely make a command window pop up. Thanks for Your answer If I put the "CMD / C" ...
- Fri Apr 17, 2020 11:04 am
- Forum: C++ Development
- Topic: wxExecute and mysqldump
- Replies: 5
- Views: 485
Re: wxExecute and mysqldump
Hi YuMera, I suggest you use your debugger, set a breakpoint on wxExecute and run. Once you hit the breakpoint evaluate the string command. I guess it will only contain your command up to the password option. I think the line should be: wxString command = myAppPath + "\\mysqldump --host=localhost -...
- Fri Apr 17, 2020 12:36 am
- Forum: C++ Development
- Topic: wxExecute and mysqldump
- Replies: 5
- Views: 485
wxExecute and mysqldump
I have this code for backup MySQL database wxString myAppPath(wxStandardPaths::Get().GetDataDir()); //myPath je putanja do exe foldera wxString command = myAppPath + "\\mysqldump --host=localhost --port=3306 -u root --password=xxxx " "--databases xxxx -R -e --triggers --single-transaction > " + myAp...
- Tue Mar 03, 2020 7:32 pm
- Forum: C++ Development
- Topic: wxDatePickerCtrl and arithmetic operations
- Replies: 2
- Views: 362
Re: wxDatePickerCtrl and arithmetic operations
Thanks for the useful info.
This code is what I need for -1 month
This code is what I need for -1 month
Code: Select all
wxDateTime dt = wxDateTime::Now();
dt.Subtract(wxDateSpan(0,1));
dpOd->SetValue(dt);
wxString do_date = dpOd->GetValue()).Format("%Y-%m-%d");