Search found 375 matches

by cutecode
Fri Jan 15, 2021 6:44 am
Forum: wxWidgets Development (Russian)
Topic: How to Privent wxFrame from Move and stay it maxsized
Replies: 20
Views: 724

Re: How to Privent wxFrame from Move and stay it maxsized

Does that code prevent the high CPU load? If yes, you could try to use wxRecursionGuard to do the same. https://docs.wxwidgets.org/trunk/classwx_recursion_guard.html Yes, it prevents, but it overlods for some seconds at startup of aplication. It seems to me I found a solution adding one more flag v...
by cutecode
Fri Jan 15, 2021 6:37 am
Forum: wxWidgets Development (Russian)
Topic: How to Privent wxFrame from Move and stay it maxsized
Replies: 20
Views: 724

Re: How to Privent wxFrame from Move and stay it maxsized

ONEEYEMAN wrote:
Thu Jan 14, 2021 11:26 pm
Hi,
Why do you have OnFrameMove2() and OnFrameMove()?

Thank you.
OnFrameMove2() is called after exiting from OnFrameMove()
I can't call SetPosition() inside OnFrameMove()
by cutecode
Thu Jan 14, 2021 10:26 pm
Forum: wxWidgets Development (Russian)
Topic: How to Privent wxFrame from Move and stay it maxsized
Replies: 20
Views: 724

Re: How to Privent wxFrame from Move and stay it maxsized

see this

Code: Select all

OnFrameMove2
1x27
OnFrameMove
0x0
OnFrameMove
by cutecode
Thu Jan 14, 2021 10:08 pm
Forum: wxWidgets Development (Russian)
Topic: How to Privent wxFrame from Move and stay it maxsized
Replies: 20
Views: 724

Re: How to Privent wxFrame from Move and stay it maxsized

The only solution I see, is setting the flag twice. Just tested on windows, move event is called twice too, after setting SetPissition() wxPoint pt(0, 0); m_nIsMoving++; SetPosition(pt); m_nIsMoving++; } } void MyFrame::OnFrameMove(wxMoveEvent& event) { if(m_nIsMoving > 0) { m_nIsMoving--; return; }...
by cutecode
Thu Jan 14, 2021 9:46 pm
Forum: wxWidgets Development (Russian)
Topic: How to Privent wxFrame from Move and stay it maxsized
Replies: 20
Views: 724

Re: How to Privent wxFrame from Move and stay it maxsized

This won't help.
After calling SetPosition() - OnFrameMove() is called twice.
The first time immediately after calling SetPosition(), and second time after exiting from OnFrameMove2()

Not sure if this behaver would be all linux distributions
by cutecode
Thu Jan 14, 2021 12:36 am
Forum: wxWidgets Development (Russian)
Topic: How to Privent wxFrame from Move and stay it maxsized
Replies: 20
Views: 724

Re: How to Privent wxFrame from Move and stay it maxsized

yes, you can check it on my demo virtual server.
Ther's no titlebar, but menuebar behaves like captionbar

https://dentasoft.ru/download.php

Thank you
by cutecode
Wed Jan 13, 2021 10:50 pm
Forum: wxWidgets Development (Russian)
Topic: How to Privent wxFrame from Move and stay it maxsized
Replies: 20
Views: 724

Re: How to Privent wxFrame from Move and stay it maxsized

As sugested here https://forums.wxwidgets.org/viewtopic.php?f=1&t=26794&p=114388&hilit=wxMoveEvent#p114388 I set timer for every wxMoveEvent This code is working, and prcessor is taking 85% only for 5-10 seconds void MyFrame::OnFrameMove2() { printf("OnFrameMove2\n"); int x, y; GetPosition(&x, &y); ...
by cutecode
Wed Jan 13, 2021 10:17 pm
Forum: wxWidgets Development (Russian)
Topic: How to Privent wxFrame from Move and stay it maxsized
Replies: 20
Views: 724

Re: How to Privent wxFrame from Move and stay it maxsized

no,
After setting possition to (0, 0)
the real possition is set to (6, 43)

linux gtk3
by cutecode
Wed Jan 13, 2021 9:50 pm
Forum: wxWidgets Development (Russian)
Topic: How to Privent wxFrame from Move and stay it maxsized
Replies: 20
Views: 724

Re: How to Privent wxFrame from Move and stay it maxsized

Обнаружил проблему с wxMoveEvent Прога "жрет" процессор на 100%. оказалось, что при установке позиции окна в wxPoint(0, 0) опять вызывается wxMoveEvent, и так все в цикле один вызов вызывает другой вызов рекурсивно. Как лучше предотвращать перемещения окна? void MyFrame::OnFrameMove2() { wxPoint pt(...
by cutecode
Mon Dec 14, 2020 7:59 pm
Forum: C++ Development
Topic: КРАС to wxString
Replies: 4
Views: 263

Re: КРАС to wxString

hello!

Now I got this string from onother server.

Code: Select all

"\u041d\u0435\u0442 \u043f\u0440\u0430\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430"
How to convert it to wxString?

wxHtmlEntitiesParser - dit not help

Thank you
by cutecode
Fri Dec 04, 2020 9:28 am
Forum: wxCode
Topic: wxPdfDC - DrawRectangle() uses black pen instead of mine
Replies: 6
Views: 442

Re: wxPdfDC - DrawRectangle() uses black pen instead of mine

Greate thanks for your job.
by cutecode
Thu Dec 03, 2020 11:30 pm
Forum: wxCode
Topic: wxPdfDC - DrawRectangle() uses black pen instead of mine
Replies: 6
Views: 442

Re: wxPdfDC - DrawRectangle() uses black pen instead of mine

Thank you, now it is ok. But now I have an assertion ASSERT INFO: ../src/common/unichar.cpp(52): assert ""Assert failure"" failed in FromHi8bit(): invalid multibyte character BACKTRACE: [1] wxUniChar::FromHi8bit(char) [2] wxPdfEncrypt::CreateDocumentId() [3] wxPdfDocument::PutTrailer() [4] wxPdfDocu...
by cutecode
Thu Dec 03, 2020 10:07 am
Forum: wxCode
Topic: wxPdfDC - DrawRectangle() uses black pen instead of mine
Replies: 6
Views: 442

wxPdfDC - DrawRectangle() uses black pen instead of mine

Hello, utelle Could you help me? At first I thought I had wrong code in my drawings. But after simplifing my code I found that DrawRectangle() uses always BLACK PEN started from second page On first page pen is ok, but starting from page 2 it always black Here is my code for (int nPage = 1; nPage <=...
by cutecode
Wed Nov 25, 2020 11:58 am
Forum: wxCode
Topic: wxPdfDocument how to compile for code::blocs?
Replies: 2
Views: 316

Re: wxPdfDocument how to compile for code::blocs?

thank you
this did help

Code: Select all

mingw32-make config=release_wxdll_win32  all
by cutecode
Wed Nov 25, 2020 12:18 am
Forum: wxCode
Topic: wxPdfDocument how to compile for code::blocs?
Replies: 2
Views: 316

wxPdfDocument how to compile for code::blocs?

Hello
I didn't find information on how to compile wxPdfDocument with mingw32 on Windows.
Is this command right?

Code: Select all

mingw32-make -f wxpdfdoc.make BUILD=release SHARED=1 -IE:\wx\lib\gcc_dll\mswu
Thank you