Search found 43 matches

by YuMERA
Sat Sep 05, 2020 7:24 pm
Forum: C++ Development
Topic: wxMediaCtrl and more stream information
Replies: 1
Views: 70

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...
by YuMERA
Wed Aug 19, 2020 11:48 am
Forum: C++ Development
Topic: wxButton and identifier
Replies: 4
Views: 90

Re: wxButton and identifier

Thank you all for your help. What I needed was this:

Code: Select all

wxButton* buttonClicked = dynamic_cast<wxButton *>( event.GetEventObject() );
tcPinDisplay->SetValue(buttonClicked->GetLabel());
and works.
Thx @ONEEYEMAN and @PB.
by YuMERA
Wed Aug 19, 2020 8:47 am
Forum: C++ Development
Topic: wxButton and identifier
Replies: 4
Views: 90

Re: wxButton and identifier

Thx but for this

Code: Select all

wxButton buttonClicked = dynamic_cast<wxButton *>( event.GetEventObject() );
I have error
error: conversion from 'wxButton*' to non-scalar type 'wxButton' requested|
by YuMERA
Wed Aug 19, 2020 1:45 am
Forum: C++ Development
Topic: wxButton and identifier
Replies: 4
Views: 90

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.
by YuMERA
Mon Jun 08, 2020 10:34 pm
Forum: C++ Development
Topic: wxBase64Encode
Replies: 4
Views: 275

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...
by YuMERA
Mon Jun 08, 2020 7:10 pm
Forum: C++ Development
Topic: wxBase64Encode
Replies: 4
Views: 275

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...
by YuMERA
Mon Jun 08, 2020 1:03 am
Forum: C++ Development
Topic: wxBase64Encode
Replies: 4
Views: 275

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.
by YuMERA
Mon Apr 20, 2020 10:26 am
Forum: C++ Development
Topic: wxListEvent
Replies: 3
Views: 261

Re: wxListEvent

catalin wrote:
Mon Apr 20, 2020 9:00 am
You probably need wxGetMouseState(), then check for left/right button state.
Thanks. That is what I need.

Code: Select all

    wxMouseState  mouse_state;
    mouse_state = wxGetMouseState();
    if (mouse_state.LeftIsDown())
    	wxMessageBox("Left click")
by YuMERA
Sun Apr 19, 2020 11:53 pm
Forum: C++ Development
Topic: wxListEvent
Replies: 3
Views: 261

wxListEvent

I have one event ItemSelect function

Code: Select all

OnlcRacunItemSelect(wxListEvent& event)
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
by YuMERA
Fri Apr 17, 2020 11:56 am
Forum: C++ Development
Topic: wxExecute and mysqldump
Replies: 5
Views: 301

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...
by YuMERA
Fri Apr 17, 2020 11:10 am
Forum: C++ Development
Topic: wxExecute and mysqldump
Replies: 5
Views: 301

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" ...
by YuMERA
Fri Apr 17, 2020 11:04 am
Forum: C++ Development
Topic: wxExecute and mysqldump
Replies: 5
Views: 301

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 -...
by YuMERA
Fri Apr 17, 2020 12:36 am
Forum: C++ Development
Topic: wxExecute and mysqldump
Replies: 5
Views: 301

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...
by YuMERA
Tue Mar 03, 2020 7:32 pm
Forum: C++ Development
Topic: wxDatePickerCtrl and arithmetic operations
Replies: 2
Views: 265

Re: wxDatePickerCtrl and arithmetic operations

Thanks for the useful info.
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");
by YuMERA
Tue Mar 03, 2020 10:40 am
Forum: C++ Development
Topic: wxDatePickerCtrl and arithmetic operations
Replies: 2
Views: 265

wxDatePickerCtrl and arithmetic operations

It's possible? I have one wxDatePickerCtrl and i know GetValue() returning wxDateTime. I need like something : SetValue() = GetValue() - 1day; SetValue() = GetValue() - 1month; SetValue() = GetValue() - 1year; Maybe is simple for this or must parse date and create value... If possible this pls examp...