Search found 120 matches

by katuday
Mon Oct 14, 2019 9:18 pm
Forum: C++ Development
Topic: Hoa to display row number in a wxListCtrl of type wxLC_REPORT virual mode?
Replies: 13
Views: 270

Hoa to display row number in a wxListCtrl of type wxLC_REPORT virual mode?

I want to diplay the rownber like the way wxGird does it

Code: Select all

GetRowLabelValue (int row) const.
Is there an API function or this will require custom coding?
by katuday
Sun Oct 06, 2019 7:08 pm
Forum: C++ Development
Topic: wxGrid does not display UTF8 characters correctly
Replies: 7
Views: 166

Re: wxGrid does not display UTF8 characters correctly

It looks like the original data was UTF8 encoded twice. How does the data get into your app? This works (UTF8 converted to hex to ensure there are no conversion errors anywhere). const char utf8[] = "\xe0\xa4\x95\xe0\xa4\xbe\xe0\xa4\x9a\xe0\xa4\x82\x20\xe0\xa4\xb6\xe0\xa4\x95\xe0\xa5\x8d\xe0\xa4\xa...
by katuday
Sun Oct 06, 2019 6:31 pm
Forum: C++ Development
Topic: wxGrid does not display UTF8 characters correctly
Replies: 7
Views: 166

Re: wxGrid does not display UTF8 characters correctly

doublemax wrote:
Sun Oct 06, 2019 6:15 pm

Code: Select all

wxString::FromUTF8(val.data());
This would have been the correct way. What didn't work? If the wxString was empty, there's an error in the UTF8 encoding.
That call
wxString::FromUTF8(val.data());
returns the same result as
wxString ( val.data()
by katuday
Sun Oct 06, 2019 6:08 pm
Forum: C++ Development
Topic: wxGrid does not display UTF8 characters correctly
Replies: 7
Views: 166

Re: wxGrid does not display UTF8 characters correctly

This has nothing to do with wxGrid. Sanskrit: ï»¿à ¤•à ¤¾à ¤šà ¤‚ à ¤¶à ¤•à ¥à ¤¨à ¥‹à ¤®à ¥à ¤¯à ¤¤à ¥à ¤¤à ¥à ¤®à ¥ à ¥¤ à ¤¨à ¥‹à ¤ªà ¤¹à ¤¿à ¤¨à ¤¸à ¥à ¤¤à ¤¿ à ¤®à ¤¾à ¤®à ¥ à ¥¥ This is un-decoded UTF8. How do you g...
by katuday
Sun Oct 06, 2019 4:30 pm
Forum: C++ Development
Topic: wxGrid does not display UTF8 characters correctly
Replies: 7
Views: 166

wxGrid does not display UTF8 characters correctly

My environment: wxWidgets-3.1.2 Windows 10, Visual Studio 2017 x64-bit static build ( UNICODE) I am trying to load and display phrases in a wxGrid (one line per cell ) from this page http://www.columbia.edu/~fdc/utf8/ But the characters are not displayed correctly in the grid. For example this Sansk...
by katuday
Fri Feb 01, 2019 12:25 am
Forum: C++ Development
Topic: Using wxWidgets in a Multi-process Architecture
Replies: 8
Views: 395

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: 395

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: 395

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: 395

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: 891

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: 891

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: 879

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: 879

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: 879

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...