Search found 115 matches

by katuday
Fri Feb 01, 2019 12:25 am
Forum: C++ Development
Topic: Using wxWidgets in a Multi-process Architecture
Replies: 8
Views: 229

Re: Using wxWidgets in a Multi-process Architecture

wxWidgets has wxProcess Once you have the process executing, you can do IPC between the app (server) and that process (client). Or use a temp file updated frequently, one process write, the other reads. This is only true if the process is launched asynchronously, otherwise the server waits (see wxE...
by katuday
Wed Jan 30, 2019 11:53 pm
Forum: C++ Development
Topic: Using wxWidgets in a Multi-process Architecture
Replies: 8
Views: 229

Re: Using wxWidgets in a Multi-process Architecture

As far as i understand you, i would think i had the same question some weeks ago. I found two possible solutions: You may use wxThread to program some explizit multithreading (seem quiet complicated without some multithreading-experience, so i did not try it). Alternatively there is OpenMP, which s...
by katuday
Wed Jan 30, 2019 11:41 pm
Forum: C++ Development
Topic: Using wxWidgets in a Multi-process Architecture
Replies: 8
Views: 229

Re: Using wxWidgets in a Multi-process Architecture

ONEEYEMAN wrote:Hi,
Are you looking for "multi-processing" or "multi-threading"?

Thank you.
I want "multi-processing" NOT "multi-threading".
I want independent processes so that in case once process crashes does not bring down the entire app.
by katuday
Wed Jan 30, 2019 8:07 pm
Forum: C++ Development
Topic: Using wxWidgets in a Multi-process Architecture
Replies: 8
Views: 229

Using wxWidgets in a Multi-process Architecture

Windows 10 and Visual Studio 2017. I would like to build a wxWidgets app as a proof of concept in a Multi-process Architecture similar to modern browsers like Chrome, Edge and Firefox. No, I am not interested in building a browser, for that I can simply to use the available wrappers like wxWebViewCh...
by katuday
Sun Jun 17, 2018 7:02 pm
Forum: C++ Development
Topic: How do you set cell attributes of a virtual wxListCtrl ?
Replies: 4
Views: 799

Re: How do you set cell attributes of a virtual wxListCtrl ?

Thanks for the lead. So I created an attributes object wxListItemAttr m_attr; Set the attributes in the constructor of my model as m_attr.SetFont(wxFontInfo(12).FaceName("Tahoma")); and implemented OnGetItemAttr as wxListItemAttr* OnGetItemAttr(long item) const { return (wxListItemAttr *)&m_attr; } ...
by katuday
Sun Jun 17, 2018 5:55 pm
Forum: C++ Development
Topic: How do you set cell attributes of a virtual wxListCtrl ?
Replies: 4
Views: 799

How do you set cell attributes of a virtual wxListCtrl ?

I have a virtual wxListCtrl class MyList : public wxListCtrl …. virtual wxString OnGetItemText(long item, long column) const { // } m_mylist = new MyList(this, ID_MYLIST, wxDefaultPosition, wxSize(-1, -1), wxLC_REPORT | wxLC_NO_HEADER | wxLC_VIRTUAL | wxLC_SINGLE_SEL | wxLC_HRULES | wxLC_VRULES ); H...
by katuday
Wed Dec 20, 2017 11:54 pm
Forum: C++ Development
Topic: How to draw a Bitmap in a wxDataViewCtrl Cell
Replies: 5
Views: 734

Re: How to draw a Bitmap in a wxDataViewCtrl Cell

If you want to put a bitmap in a cell then change "string" in explicit MyRenderer(wxDataViewCellMode mode) : wxDataViewCustomRenderer("string", mode, wxALIGN_CENTER) to "wxBitmap" If you don't plan to change the cell frequently, why don't you use wxDataViewBitmapRenderer http://docs.wxwidgets.org/t...
by katuday
Sun Dec 17, 2017 11:35 pm
Forum: C++ Development
Topic: How to draw a Bitmap in a wxDataViewCtrl Cell
Replies: 5
Views: 734

Re: How to draw a Bitmap in a wxDataViewCtrl Cell

The code looks ok. Did you check if the bitmap is loaded correctly? Try a png with alpha channel for a test and set the useMask parameter of the drawbitmap call to true. Do you mean like this? if (m_pass.IsOk()) { wxMessageBox("OK"); dc->DrawBitmap(m_pass, rect.GetX(), rect.GetY(), true); // set tr...
by katuday
Sun Dec 17, 2017 11:11 pm
Forum: C++ Development
Topic: How to draw a Bitmap in a wxDataViewCtrl Cell
Replies: 5
Views: 734

How to draw a Bitmap in a wxDataViewCtrl Cell

I am using custom renderer such as class MyRenderer: public wxDataViewCustomRenderer { public: explicit MyRenderer(wxDataViewCellMode mode) : wxDataViewCustomRenderer("string", mode, wxALIGN_CENTER) { } virtual bool Render(wxRect rect, wxDC *dc, int state) wxOVERRIDE { dc->DrawBitmap(m_wheel, rect.G...
by katuday
Mon Dec 04, 2017 9:53 pm
Forum: Compiler / Linking / IDE Related
Topic: Visual Studio 2017 compiled program fails to run ( library program mismatch )
Replies: 1
Views: 1055

Visual Studio 2017 compiled program fails to run ( library program mismatch )

Windows 7. I have compiled the library ( static lib / static crt ) using Microsoft Visual Studio Community 2017 Version 15.4.5 Then I compiled my program (static crt ) using the same compiler. When I launch the program I get the error: Mismatch between the program and the library build versions dete...
by katuday
Tue Nov 07, 2017 10:47 pm
Forum: C++ Development
Topic: Using wxDataViewCtrl and STL containers
Replies: 6
Views: 570

Re: Using wxDataViewCtrl and STL containers

ONEEYEMAN wrote:Hi,
Why do you need to pass the whole map?
You need just the key and the value will be stored inside wxVariant *.
Fair enough. Some pseudo code, please? to show the GetValue() virtual function?
by katuday
Tue Nov 07, 2017 9:19 pm
Forum: C++ Development
Topic: Using wxDataViewCtrl and STL containers
Replies: 6
Views: 570

Re: Using wxDataViewCtrl and STL containers

ONEEYEMAN wrote:Hi,
Why not use "item" for that purpose?
It has only a "void *".
Would you mind to elaborate on how to use "item"? I have added some code in my question. How do I pass my std::map to the ctrl as "Item?
by katuday
Tue Nov 07, 2017 6:41 pm
Forum: C++ Development
Topic: Using wxDataViewCtrl and STL containers
Replies: 6
Views: 570

Re: Using wxDataViewCtrl and STL containers

The problem is in order the retrieve the value from the container you implement the virtual function virtual void GetValue (wxVariant &variant, const wxDataViewItem &item, unsigned int col) const =0 declared in wxDataViewModel This function accepts ( among other parameters ) an integer representing ...
by katuday
Mon Nov 06, 2017 11:18 pm
Forum: C++ Development
Topic: Using wxDataViewCtrl and STL containers
Replies: 6
Views: 570

Using wxDataViewCtrl and STL containers

I have read the sample and documentation for wxDataViewCtrl but it is still unclear if it is possible to use STL container specifically std::map to store the data for the wxDataViewModel? I want to display a data table in a tree like structure. The data is already in a std::map. The example uses a n...