Search found 53 matches

by csniper
Wed Dec 28, 2022 5:23 am
Forum: Platform Related Issues
Topic: DPI Awareness and DPI scale issue
Replies: 8
Views: 1098

Re: DPI Awareness and DPI scale issue

In the notebook example, I still could not get the idea how wx handled DPI scaling. Not all scaled and it does not responded to scaling changing.
by csniper
Wed Dec 28, 2022 2:20 am
Forum: Platform Related Issues
Topic: DPI Awareness and DPI scale issue
Replies: 8
Views: 1098

Re: DPI Awareness and DPI scale issue

My app
by csniper
Tue Dec 27, 2022 7:30 am
Forum: Platform Related Issues
Topic: DPI Awareness and DPI scale issue
Replies: 8
Views: 1098

Re: DPI Awareness and DPI scale issue

Foundings on sample/widgets after changing scale from 100% to 150%
All the sample widgets from Comobox down to ToggleButton will scale but not others above it.
Any idea?
After scale
by csniper
Tue Dec 27, 2022 7:21 am
Forum: Platform Related Issues
Topic: DPI Awareness and DPI scale issue
Replies: 8
Views: 1098

Re: DPI Awareness and DPI scale issue

Yes. I compiled all from souce by VS 2022, VC 17.4.3. BTW, it's 64 bit WIndows 10. I tried the sample from wx and confirmed the wxDPIChangedEvent could not be received by adding the code snippet as below(samples/text) EVT_MENU(RICHTEXT_TAB_STOPS, RichTextFrame::OnTabStops) EVT_DPI_CHANGED(RichTextFr...
by csniper
Tue Dec 27, 2022 3:00 am
Forum: Platform Related Issues
Topic: DPI Awareness and DPI scale issue
Replies: 8
Views: 1098

DPI Awareness and DPI scale issue

Basic info: wxWidgets 3.2.1 on Windows 10. I set DPI Awareness as "Per Monitor High DPI Aware". I tried to change DPI scale of my monitor from 100% to 150% or vice versa. What found: 1. Did not get notification in my callback for wxDPIChangedEvent 2. The APP looks a little bit weird, some ...
by csniper
Tue Feb 25, 2020 6:54 am
Forum: C++ Development
Topic: string encoding in wxStreamToTextRedirector
Replies: 9
Views: 1579

Re: string encoding in wxStreamToTextRedirector

It works in a weird way I think it is because MS windows uses UTF16.

I used a customized redirector function for my app and convert it with wxString("...", wxConvUtf8). Now I can output as expected.

Thanks anyway.
by csniper
Tue Feb 25, 2020 1:45 am
Forum: C++ Development
Topic: string encoding in wxStreamToTextRedirector
Replies: 9
Views: 1579

Re: string encoding in wxStreamToTextRedirector

Thanks, doublemax. Will try it and let you know the result.
by csniper
Sun Feb 23, 2020 1:46 am
Forum: C++ Development
Topic: string encoding in wxStreamToTextRedirector
Replies: 9
Views: 1579

Re: string encoding in wxStreamToTextRedirector

Thanks, doublemax. Now I understand the root cause.

BTW: do you think it should be fixed/supported by wxWidgets?
by csniper
Sat Feb 22, 2020 10:30 am
Forum: C++ Development
Topic: string encoding in wxStreamToTextRedirector
Replies: 9
Views: 1579

Re: string encoding in wxStreamToTextRedirector

I made a minimal example with a dialog which has a text control and two buttons. Below is the code snippet for demo the issue. void testDialog::OnAbout(wxCommandEvent& event) { std::string s("\xE6\xB5\x8B\xE8\xAF\x95"); // UTF8 TextCtrl1->Clear(); wxStreamToTextRedirector redirctor(Tex...
by csniper
Sat Feb 22, 2020 9:39 am
Forum: C++ Development
Topic: string encoding in wxStreamToTextRedirector
Replies: 9
Views: 1579

Re: string encoding in wxStreamToTextRedirector

I'll try to make a minimal, compilable code sample.

I'm using wxWidgets 3.1.3. The encoding of the string in the example was UTF8(I verified). The locale of my OS is GBK.
by csniper
Sat Feb 22, 2020 2:35 am
Forum: C++ Development
Topic: string encoding in wxStreamToTextRedirector
Replies: 9
Views: 1579

string encoding in wxStreamToTextRedirector

I met a problem to display UTF8 non-ASCII string with wxStreamToTextRedirector. The string is displayed OK with other wxWidgets text control after being converted by mb_str(wxConvUTF8). As below
Image 2.png
Image 2.png (16.69 KiB) Viewed 1579 times
I tried to change wxConvCurrent to wxConvUTF8 but it did not work.

Any suggestions?
by csniper
Fri Jan 17, 2020 8:02 am
Forum: C++ Development
Topic: Parsing and Displaying Markdown File
Replies: 4
Views: 1678

Re: Parsing and Displaying Markdown File

doublemax wrote: Mon Jul 08, 2019 3:48 pm If you find a good solution, please let us know.
I did this in my app by converting markdown by Cpp-Markdown(changed to support Unicode and use xpressive) and display it with wxHtmlWindow. Not sure if anyone had a better solution.
by csniper
Fri Jan 10, 2020 5:16 am
Forum: Platform Related Issues
Topic: APP does not exit in minimized mode
Replies: 3
Views: 1013

Re: APP does not exit in minimized mode

@ONEEYEMAN do you mean this is a known issue?
by csniper
Fri Jan 10, 2020 3:53 am
Forum: Platform Related Issues
Topic: APP does not exit in minimized mode
Replies: 3
Views: 1013

APP does not exit in minimized mode

I used wxWidgets 3.1.3, windows 10 64bits I clicked close in the right click menu when the APP was minimized on the task bar. However, the app was still there till I click on the ICON on the task bar. The window flashed during restore and the app exited this time. If I close the APP when its window ...
by csniper
Wed Dec 25, 2019 9:06 am
Forum: Platform Related Issues
Topic: Different looking of wxChoice
Replies: 17
Views: 68985

Re: Different looking of wxChoice

The code is mixed in a mess of a complex multitab dialog.
https://github.com/LiMinggang/madedit-m ... 632d01e7df