Search found 135 matches

by Laurent Berger
Tue Sep 18, 2018 4:42 pm
Forum: Compiler / Linking / IDE Related
Topic: Build wxwidgets with system library
Replies: 2
Views: 230

Re: Build wxwidgets with system library

You likely need to build wxWidgets and OpenCV with the same PNG ZLIB and TIFF libs Now I have got wxWidgets and Opencv with same PNG ZLIB and TIFF but process is not automatic : add path tiffconf.h When wxwidgets uses libtiff tiff.h and tiffconf.h files are in same directory. It is not true for Ope...
by Laurent Berger
Tue Sep 18, 2018 12:31 pm
Forum: Compiler / Linking / IDE Related
Topic: Build wxwidgets with system library
Replies: 2
Views: 230

Build wxwidgets with system library

Hi, I use CMake (3.11.0) to build wxWidgets (staticlib = wxBUILD_SHARED_OFF) on windows (VS 2017 Win64). I want to use the inside opencv libs for PNG ZLIB and TIFF to avoid duplicate symbols when I link my application. After many tries (something is wrong in CMake-GUI when wxBUILDPNG is sys) ihave g...
by Laurent Berger
Mon Sep 17, 2018 12:11 pm
Forum: Compiler / Linking / IDE Related
Topic: link error using wxwidgets in static for my own lib
Replies: 5
Views: 432

Re: link error using wxwidgets in static for my own lib

thanks for all test. What is your platform linux or windows ? (MSys2 GCC 8=windows ?)

There is a problem with flag WXUSINGDLL in wxNanoSample : it must be used only when static build is needed. I tried to insert in cmakelists.txt but it is not tested yet
by Laurent Berger
Sun Sep 16, 2018 7:53 am
Forum: Compiler / Linking / IDE Related
Topic: link error using wxwidgets in static for my own lib
Replies: 5
Views: 432

link error using wxwidgets in static for my own lib

Hi, I can compile link and run my project using my own lib using wxwidgets dll libs. Using static libs I have got 1 error and three warnings : 2>main.obj : warning LNK4217: locally defined symbol [email protected]@[email protected]@Z (public: __cdecl wxString::wxString(char const *)) imported in function "unsign...
by Laurent Berger
Thu Sep 13, 2018 8:16 pm
Forum: C++ Development
Topic: Basic GUI
Replies: 11
Views: 2388

Re: Basic GUI

Nice and only one wxApp as suggested by ONEEYEMAN
I tested with windows 10 and vs 2017. May be it's a good sample to add to wxWidgets repo

What's your platform?
by Laurent Berger
Thu Sep 13, 2018 7:28 pm
Forum: C++ Development
Topic: Basic GUI
Replies: 11
Views: 2388

Re: Basic GUI

Hi, I didn't want to insult you. If I did - I apologize. Going back to your question - did you look at the console sample? Thank you. Ok close Now you said "you can't have 2 wxApp-derived classes in the project" but when I run my program It works : int l1 = GetNumber<int>(); // I can see a window h...
by Laurent Berger
Thu Sep 13, 2018 6:24 pm
Forum: C++ Development
Topic: Basic GUI
Replies: 11
Views: 2388

Re: Basic GUI

This looks unnecessarily complicated. What exactly are you trying to do? My students don't know gui loop and have to learn some basics in C++ in console mode. Today cout and cin in a black screen with young people knowing only popup windows in instagram, facebook..it's difficult. I want something r...
by Laurent Berger
Thu Sep 13, 2018 6:17 pm
Forum: C++ Development
Topic: Basic GUI
Replies: 11
Views: 2388

Re: Basic GUI

Hi, On top of what doublemax said - you can't have 2 wxApp-derived classes in the project. What is the purpose? Also, based on your responce and the code you wrote it seems you don't understand the notion of the GUI and wxWidgets in general. I suggest your start with some basic C++ classes, then ta...
by Laurent Berger
Wed Sep 12, 2018 7:38 pm
Forum: C++ Development
Topic: Basic GUI
Replies: 11
Views: 2388

Re: Basic GUI

Thanks I need main entry point. With your answer and https://forums.wxwidgets.org/viewtopic.php?t=43513 #include "wx/wx.h" #include <wx/numdlg.h> #include<iostream> #include<string> class GetNumberApp : public wxApp { public: int number; virtual bool OnInit() { number = wxGetNumberFromUser("enter nu...
by Laurent Berger
Wed Sep 12, 2018 6:31 pm
Forum: C++ Development
Topic: Basic GUI
Replies: 11
Views: 2388

Basic GUI

Hi, I'm looking for basic GUi for noobs. Something like this void main (void) { double x=wxGetValue("Real number please:"); wxString s=wxGetString("Your name please:); } wxGetValue or wxGetString open a dialog box and when user press return key dialog is closed. No need of event loop. Is possible wi...
by Laurent Berger
Thu Jul 05, 2018 8:42 pm
Forum: C++ Development
Topic: 2D-Plots
Replies: 44
Views: 2983

Re: 2D-Plots

by Laurent Berger
Sat Jun 30, 2018 4:03 pm
Forum: C++ Development
Topic: use getIcon for wxFrame
Replies: 6
Views: 437

Re: use getIcon for wxFrame

wxBitmap b2(f->ImageAffichee()->Scale(30, 30)); wxIcon icon=iconBundle.GetIcon(wxSize(32, 32), wxIconBundle::FALLBACK_NEAREST_LARGER); (Assuming the code posted reflects the real code) Is 30 instead of 32 in the first part a typo or intent? Yes it was. I checked flag wxIconBundle::FALLBACK_NEAREST_...
by Laurent Berger
Sat Jun 30, 2018 12:12 pm
Forum: C++ Development
Topic: use getIcon for wxFrame
Replies: 6
Views: 437

Re: use getIcon for wxFrame

thanks for yours answers wxBitmap b1(f->ImageAffichee()->Scale(64, 64)); wxBitmap b2(f->ImageAffichee()->Scale(30, 30)); wxBitmap b3(f->ImageAffichee()->Scale(16, 16)); wxIcon icon; icon.CopyFromBitmap(b1); wxIconBundle lotIcons(icon); icon.CopyFromBitmap(b2); lotIcons.AddIcon(icon); icon.CopyFromBi...
by Laurent Berger
Sat Jun 30, 2018 7:02 am
Forum: C++ Development
Topic: use getIcon for wxFrame
Replies: 6
Views: 437

Re: use getIcon for wxFrame

icon in upper left corner of window is an image content rescaled. Image can be 3000x3000. I try to get this icon instead of rescaled twice. I think i will have to add this icon to my window class
by Laurent Berger
Fri Jun 29, 2018 3:50 pm
Forum: C++ Development
Topic: Issues with opencv built-in functions and WxGLCanvas SwapBuffers()?
Replies: 3
Views: 215

Re: Issues with opencv built-in functions and WxGLCanvas SwapBuffers()?

Can you try to reproduce problem using penguin sample? I cannot reproduce your issue. My source code is penguin.cpp and I changed : void TestGLCanvas::OnPaint( wxPaintEvent& WXUNUSED(event) ) { // must always be here wxPaintDC dc(this); SetCurrent(*m_glRC); // Initialize OpenGL if (!m_gldata.initial...