Search found 265 matches

by cutecode
Mon Jan 20, 2020 11:50 pm
Forum: C++ Development
Topic: Aui how to change size of a docked pane
Replies: 1
Views: 17

Aui how to change size of a docked pane

I'v made a bottom docked pane for diagnostic messages to a user.
And I want it showed up for 1 sec. and then minimized it's height.

But I cant change its size what ever I tried.

Thank you
by cutecode
Mon Jan 20, 2020 8:36 pm
Forum: C++ Development
Topic: How to know if a wxFrame is beeing closed by a user
Replies: 9
Views: 107

Re: How to know if a wxFrame is beeing closed by a user

hi I don't have problems when I open wxFrame programmticaly. coz I set focus to other form by myself. But when user closes wxFrame pressing on top-right corner X button. The focus goes nowhere. That's why I want to catch that event when the frame is closed by user pressing X button. As doublemax suj...
by cutecode
Mon Jan 20, 2020 5:09 pm
Forum: C++ Development
Topic: How to know if a wxFrame is beeing closed by a user
Replies: 9
Views: 107

Re: How to know if a wxFrame is beeing closed by a user

hi
my application has 4 types of user interfaces
1. MDI
2. AUI
3. wxFrame
4. wxAuiNotebook

witch inteface to use, the user selects in "User options form"

I have problem on focus setting only with wxFrames.
After a wxFrame closes, no one wxFrame is getting focus
by cutecode
Sun Jan 19, 2020 7:40 pm
Forum: C++ Development
Topic: How to know if a wxFrame is beeing closed by a user
Replies: 9
Views: 107

Re: How to know if a wxFrame is beeing closed by a user

1. I do not want to disable the close button 2. I have a main wxFrame and it has many child wxFrames. The problem is when one child wxFrame closes, the previece wxFrame does not get focused. So I've made my own stack wxArray of wxFrames. And when one frame closes, the other foresed to get focus in i...
by cutecode
Sun Jan 19, 2020 2:47 pm
Forum: C++ Development
Topic: How to know if a wxFrame is beeing closed by a user
Replies: 9
Views: 107

How to know if a wxFrame is beeing closed by a user

How to know if a wxFrame is beeing closed by a user, not programmatically? EVT_CLOSE(func): Process a wxEVT_CLOSE_WINDOW event when the frame is being closed by the user or programmatically (see wxWindow::Close). The user may generate this event clicking the close button (typically the 'X' on the to...
by cutecode
Mon Jan 06, 2020 4:36 pm
Forum: wxWidgets Development (Russian)
Topic: cutecode, Ну и где вопрос про треды?
Replies: 4
Views: 317

Re: cutecode, Ну и где вопрос про треды?

у меня soap server через gSoap, его только многопоточным делать надо, иначе тормоза будут.

rand - он безопасный, просто если не вызвать srand, то потом у каждого потока одинаковые rand() идут. Если вызывать srand() в каждом потоке, тогда rand() разные в каждом потоке.
by cutecode
Mon Jan 06, 2020 3:42 pm
Forum: wxWidgets Development (Russian)
Topic: cutecode, Ну и где вопрос про треды?
Replies: 4
Views: 317

Re: cutecode, Ну и где вопрос про треды?

Привет, еще раз. Я тут разбираюсь пока. Пока думал как вопросы сформулироватаь, ты на них уже ответил. Спасибо, я так и решил что надо пользоваться mutex-ами, вот только не понятно какие функции thread-safe, а какие - нет. Пока узнаю все это методом "тыка", через дебаг определяю где прога крэшится и...
by cutecode
Mon Jan 06, 2020 12:29 pm
Forum: Platform Related Issues
Topic: How to pass by ref wxString::Clone() to a function
Replies: 2
Views: 79

How to pass by ref wxString::Clone() to a function

Code: Select all

int GetGrvIntrTime(wxString &lpsz)
{
	...
}
wxString sz;
p = GetGrvIntrTime(sz.Clone());
This code compiles on Windows, but not on Linux
I got this error message

Code: Select all

error: invalid initialization of non-const reference of type ‘wxString&’ from an rvalue of type ‘wxString’
by cutecode
Mon Jan 06, 2020 7:28 am
Forum: C++ Development
Topic: Should I call wxLocal::Init() on every wxThread created?
Replies: 13
Views: 201

Re: Should I call wxLocal::Init() on every wxThread created?

Спасибо, братан.

Получается если я из потока вызываю какую либо глобальную функцию, то я также должен делать копию строки?

Code: Select all

bool sum_global_dll_func(wxString& sz)
{
	...
}

wxMyThread::func()
{
	wxString sz;
	sum_global_dll_func(sz.clone());
	
}
Очень интересно, щас попробую.

thx
by cutecode
Sun Jan 05, 2020 10:08 pm
Forum: C++ Development
Topic: Should I call wxLocal::Init() on every wxThread created?
Replies: 13
Views: 201

Re: Should I call wxLocal::Init() on every wxThread created?

hello.

This wxString is pathed by value, not by reference.
And the threads do not comunicate with each other, but they do call global functions.
Should I privent every global function with wxCriticalSection?

thx
by cutecode
Sun Jan 05, 2020 6:01 pm
Forum: C++ Development
Topic: Should I call wxLocal::Init() on every wxThread created?
Replies: 13
Views: 201

Should I call wxLocal::Init() on every wxThread created?

I have a multythreaded webservice. And I found that on Windows wxString converts to char* not correctly. const char* chr; chr = (const char*)szERR.c_str(); So I added m_local.Init() on every thread Entry(), and it did helped. Now all wxStrings are converted to char* as expected. But on Linux my code...
by cutecode
Sun Nov 24, 2019 10:19 am
Forum: wxCode
Topic: wxPdf not compile on MAC with the newest wx3.1.3
Replies: 1
Views: 201

Re: wxPdf not compile on MAC with the newest wx3.1.3

hello

I downloaded wx-3.1.4-master
recompiled, and now wxPDF compiles with no errors

thanks