Search found 55 matches

by dqf88
Sat Jan 19, 2019 5:41 am
Forum: wxWidgets Development (Chinese)
Topic: setuserscale and draw
Replies: 0
Views: 2278

setuserscale and draw

有一张背景图片,我在上面绘制曲线,当我用setsuserscale放大或缩小图片时,程序调用ondraw重新绘制曲线,此时会出现曲线和图像错位的现象,怎么样才能保证在缩放大小的同时,曲线还在图片原来的相对位置上?
by dqf88
Sun Dec 16, 2018 3:54 am
Forum: C++ Development
Topic: How to calculate the new point when i zoomed the canvas using SetUserScale method?
Replies: 1
Views: 318

How to calculate the new point when i zoomed the canvas using SetUserScale method?

How to calculate the new point when i zoomed the canvas using SetUserScale method? I want the point got by mouse to be changed with zooming
by dqf88
Mon Nov 19, 2018 11:46 am
Forum: C++ Development
Topic: about SetUserScale
Replies: 4
Views: 470

Re: about SetUserScale

firstly, i draw line on the canvas, then i zoom the canvas, the problem comes as the following pictures.

before zooming the canvas
1.png
after zooming the canvas
2.png
by dqf88
Mon Nov 19, 2018 12:24 am
Forum: C++ Development
Topic: about SetUserScale
Replies: 4
Views: 470

Re: about SetUserScale

when zoom the canvas, the lines deviate from its original position
by dqf88
Sun Nov 18, 2018 1:40 am
Forum: C++ Development
Topic: about SetUserScale
Replies: 4
Views: 470

about SetUserScale

I have drew lines on the background picture with mouse, when zooming the canvas with SetUserScale method, there comes the problem(see the following pictures), how to solve the problem? void AAFrame::PrepareDC(wxDC& dc) { dc.SetLogicalOrigin( m_xLogicalOrigin, m_yLogicalOrigin ); dc.SetAxisOrientatio...
by dqf88
Sat Nov 17, 2018 3:11 pm
Forum: C++ Development
Topic: about wxVector
Replies: 3
Views: 731

Re: about wxVector

for循环中调用vector容器erase函数 代码示例 int main(){ vector<int> a; a.push_back(3); a.push_back(2); a.push_back(3); a.push_back(3); a.push_back(5); vector<int>::iterator b; int x = 3; for(b=a.begin();b!=a.end();b++) { if(*b==x){ b=a.erase(b); } } for(b=a.begin();b!=a.end();b++) { printf("value=%d\n", *b); } ret...
by dqf88
Sat Nov 17, 2018 3:09 pm
Forum: C++ Development
Topic: about wxVector
Replies: 3
Views: 731

Re: about wxVector

Code: Select all

wxVector<Line>::iterator i;
for(i=lines.begin(); i!=lines.end();)
{
    if((*i).isSelected)
    {
        i=lines.erase(i);
    }
    else
    {
        i++;
    }
}
by dqf88
Sat Nov 17, 2018 1:44 pm
Forum: C++ Development
Topic: about wxVector
Replies: 3
Views: 731

about wxVector

what's wrong with the following code? struct Line { wxPoint ptStart; wxPoint ptEnd; bool isSelected; } ; wxVector<Line> lines; Line l; l.ptStart=wxPoint(20,30); l.ptEnd=wxPoint(270,390); l.isSelected=true; lines.push_back(l); wxVector<Line>::iterator i; for(i=lines.begin(); i!=lines.end(); i++) { co...
by dqf88
Fri Mar 09, 2018 12:16 am
Forum: Compiler / Linking / IDE Related
Topic: The sample "wxWidgets app" application can't be compiled smoothly
Replies: 4
Views: 1959

Re: The sample "wxWidgets app" application can't be compiled smoothly

Thanks, the libraries requested are in the "MinGW\lib" folder
by dqf88
Thu Mar 08, 2018 8:17 am
Forum: Compiler / Linking / IDE Related
Topic: The sample "wxWidgets app" application can't be compiled smoothly
Replies: 4
Views: 1959

Re: The sample "wxWidgets app" application can't be compiled smoothly

I can't find these two libraries after compiling the wxwidgets3.1.1
by dqf88
Thu Mar 08, 2018 6:18 am
Forum: Compiler / Linking / IDE Related
Topic: The sample "wxWidgets app" application can't be compiled smoothly
Replies: 4
Views: 1959

The sample "wxWidgets app" application can't be compiled smoothly

I can't compile the sample application "wxWidgets app" using wxwidgets3.1.1 and codeblocks17.12, but there is no error using wxwidgets3.1.0 and codeblocks17.12, why ? -------------- Build: Release in SS (compiler: GNU GCC Compiler)--------------- windres.exe -IC:\wxWidgets-3.1.1\include -IC:\wxWidge...
by dqf88
Thu Aug 18, 2016 2:02 am
Forum: Compiler / Linking / IDE Related
Topic: CodeBlocks IDE has no "wxWidgets 3.1.x" option
Replies: 6
Views: 1913

Re: CodeBlocks IDE has no "wxWidgets 3.1.x" option

New Pagodi wrote:I wrote about some solutions here.
The error occured when I builded the program with "wxWidgets is built as a monolithic library" option
by dqf88
Thu Aug 18, 2016 12:42 am
Forum: Compiler / Linking / IDE Related
Topic: CodeBlocks IDE has no "wxWidgets 3.1.x" option
Replies: 6
Views: 1913

Re: CodeBlocks IDE has no "wxWidgets 3.1.x" option

New Pagodi wrote:I wrote about some solutions here.
Thanks
by dqf88
Tue Aug 16, 2016 5:00 am
Forum: Compiler / Linking / IDE Related
Topic: CodeBlocks IDE has no "wxWidgets 3.1.x" option
Replies: 6
Views: 1913

CodeBlocks IDE has no "wxWidgets 3.1.x" option

CodeBlocks IDE has no "wxWidgets 3.1.x" option, how to solve this problem? Thanks
by dqf88
Wed Aug 10, 2016 1:04 pm
Forum: Announcements and Discoveries
Topic: ANN: wxSQLite3 3.3.1 released
Replies: 5
Views: 1772

Re: ANN: wxSQLite3 3.3.1 released

doublemax wrote:WXSQLITE_LIMIT_WORKER_THREADS is defined in wxsqlite3.h. Maybe you forgot to update it or it's included from an older version?
I build the project in wxSQLite3 3.3.1