Search found 36 matches

by YuMERA
Mon Apr 20, 2020 10:26 am
Forum: C++ Development
Topic: wxListEvent
Replies: 3
Views: 117

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: 117

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: 136

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: 136

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: 136

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: 136

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: 167

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: 167

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...
by YuMERA
Wed Feb 26, 2020 8:43 am
Forum: C++ Development
Topic: border-color wxStaticText
Replies: 3
Views: 198

Re: border-color wxStaticText

ONEEYEMAN wrote:
Mon Feb 24, 2020 3:55 pm
Do you want to indicate the incorect input from the user?

Thank you.
This scenario is interesting to me... How? Thx.
by YuMERA
Mon Feb 24, 2020 10:47 pm
Forum: Database Related
Topic: WxWidgets 3.1, Windows, codeblocks and MySQL
Replies: 9
Views: 1467

Re: WxWidgets 3.1, Windows, codeblocks and MySQL

Hi to all, I'm having lot of problems in finding a way to connect to a MySQl database by using WxWdigets on Windows. On Linux, I use mysql++ library and everything works fine, but I can't figure out how to do it under Windows. I don't need to use exactly the same library, I just need to be able to ...
by YuMERA
Fri Feb 14, 2020 1:41 am
Forum: C++ Development
Topic: Decimal format conversion from one locale to another locale(en_US)
Replies: 6
Views: 254

Re: Decimal format conversion from one locale to another locale(en_US)

Thanks for the helpful info.
This is what I needed : wxString::FromCDouble()/ToCDouble()
by YuMERA
Thu Feb 13, 2020 12:55 am
Forum: C++ Development
Topic: Decimal format conversion from one locale to another locale(en_US)
Replies: 6
Views: 254

Decimal format conversion from one locale to another locale(en_US)

I use wxLocale wxLANGUAGE_SERBIAN and have a decimal format like 1,23 I would like to convert it to decimal in format wxLANGUAGE_ENGLISH like 1.23 how?
by YuMERA
Sun Dec 22, 2019 1:59 am
Forum: C++ Development
Topic: wxString Replace()
Replies: 4
Views: 232

Re: wxString Replace()

Thanks Bro.
by YuMERA
Sun Dec 22, 2019 1:30 am
Forum: C++ Development
Topic: wxString Replace()
Replies: 4
Views: 232

Re: wxString Replace()

This line causes the error

Code: Select all

wxString ss = s.Replace(" ","\u2007");
by YuMERA
Sun Dec 22, 2019 12:09 am
Forum: C++ Development
Topic: wxString Replace()
Replies: 4
Views: 232

wxString Replace()

I need this because I want to right format numbers in print document to the printer without using Monospace font. wxString s = wxString::Format("%9s",wxNumberFormatter::ToString(atof(d11),g_dot)); wxString ss = s.Replace(" ","\u2007"); dc->DrawText(ss, data_x + 475, data_y + 1) I actually don't know...