Search found 14 matches

by MatthewDP
Fri Mar 27, 2020 9:49 am
Forum: C++ Development
Topic: Saving wxImage to wxStringOutputStream fails
Replies: 8
Views: 443

Re: Saving wxImage to wxStringOutputStream fails

Well, that's officially awesome.

The code works as advertised. I've got my PNG in a string, as it were, and displaying.

Thanks PB!
by MatthewDP
Thu Mar 26, 2020 5:32 pm
Forum: C++ Development
Topic: Saving wxImage to wxStringOutputStream fails
Replies: 8
Views: 443

Re: Saving wxImage to wxStringOutputStream fails

PB - With regards to your questions: What do you want to accomplish by saving a binary data to a string? If I wanted to get in-memory representation of a PNG, I would use wxMemoryOutputStream. If I wanted a PNG stored as text, I would uuencode it first. I sometimes need to save out an image to file ...
by MatthewDP
Thu Mar 26, 2020 5:23 pm
Forum: C++ Development
Topic: Saving wxImage to wxStringOutputStream fails
Replies: 8
Views: 443

Re: Saving wxImage to wxStringOutputStream fails

In regards to Kvaz1r's suggestion to use wxConvLocal, I do get a single line of text which is the beginning to a PNG string. It is:

Code: Select all

‰PNG\r\n\x1a\n
With regards to PB's suggestion of:

Code: Select all

 wxStringOutputStream sos(nullptr, wxConvISO8859_1);
the value of GetString() is still empty.
by MatthewDP
Thu Mar 26, 2020 12:13 pm
Forum: C++ Development
Topic: Saving wxImage to wxStringOutputStream fails
Replies: 8
Views: 443

Re: Saving wxImage to wxStringOutputStream fails

Kvaz1r,

You are correct. Both should be wxBITMAP_TYPE_PNG. I copied code where I was experimenting with the string based MIME type. It doesn't make any difference if you use wxBITMAP_TYPE_PNG or "image/png".

I have now corrected this in my original post.
by MatthewDP
Thu Mar 26, 2020 11:47 am
Forum: C++ Development
Topic: Saving wxImage to wxStringOutputStream fails
Replies: 8
Views: 443

Saving wxImage to wxStringOutputStream fails

Windows 10 wxWidgets 3.1.3 MSVC 16.2.5 (Visual C++ 2019) Preprocessor Definitions: WIN32;_WINDOWS;UNICODE;_UNICODE;_DEBUG;__WXDEBUG__;CMAKE_INTDIR="Debug";%(PreprocessorDefinitions) I have a wxImage object generated from a bitmap. When I save it to a file stream, everything works find. The file is c...
by MatthewDP
Mon Mar 24, 2014 7:05 pm
Forum: Platform Related Issues
Topic: Embed a 3rd party app into a window in my app
Replies: 1
Views: 828

Embed a 3rd party app into a window in my app

Hi all, I am curious whether this is even possible: I would like to embed a 3rd party Windows-based app into a window in my wxWidgets application. For example, could I embed (run) the Skype executable or AutoCad within a window or on a canvas within my app? [This is, of course, aside from any legal ...
by MatthewDP
Fri Sep 16, 2005 8:10 pm
Forum: C++ Development
Topic: Problem catching Key Down event
Replies: 7
Views: 1337

> You want only some key sequences to be trapped, then you can use accelerators and also if you don't handle the key events in child windows, it will ultimately reach to the parent only. Priyank, I don't want to use accelerators because of the nature of the control-key sequences. So I want to catch ...
by MatthewDP
Thu Sep 15, 2005 8:32 pm
Forum: C++ Development
Topic: Problem catching Key Down event
Replies: 7
Views: 1337

priyank - thanks for your post. I see that that does work for my panel class when it has focus. I am more interested in having the main Frame class catch all key down events regardless of what control has focus. For a common example, if I press Ctrl-S, I would like to get to the onSave function. Of ...
by MatthewDP
Thu Sep 15, 2005 4:37 am
Forum: C++ Development
Topic: Problem catching Key Down event
Replies: 7
Views: 1337

Problem catching Key Down event

WinXP SP2, MSVC7.1, wxWidgets 2.6.0 Hi all, I'm having trouble catching a key down event on any of my controls. I have tried to catch the event in the main frame, a panel, and a dialog. All the other events work fine (for example, the button click in the code below). I used the same Connect command ...
by MatthewDP
Fri Sep 02, 2005 9:11 pm
Forum: C++ Development
Topic: Button bitmap with 2.6.0
Replies: 5
Views: 950

I re-saved the bitmaps as 24-bit bitmap images (from MS Paint). This solved the problem. I'm not sure what exact format they were before (16 or 256). But 24 bit seems to work.

Thanks,
Matt.
by MatthewDP
Fri Sep 02, 2005 5:13 pm
Forum: C++ Development
Topic: Button bitmap with 2.6.0
Replies: 5
Views: 950

Re: creating a blank bitmap if the other is not loaded, that was exactly my intention. If I couldn't load the bitmap, I wanted some way to continue to run the application. This just guarantees that a bitmap is available.

Perhaps I could do something else, but that's a quick solution for now.
by MatthewDP
Fri Sep 02, 2005 5:18 am
Forum: C++ Development
Topic: Button bitmap with 2.6.0
Replies: 5
Views: 950

Button bitmap with 2.6.0

Hi all, wxWidgets 2.6.0, MSW XP SP2 I updated from 2.4.2 to 2.6.0 and I ran into a problem. When adding bitmap pictures to my toolbar buttons, the bitmaps appear to be inverted in color. [I'm not sure it's exactly a color inversion, but the normal gray background is now green, and all the colors are...
by MatthewDP
Mon Apr 25, 2005 10:34 pm
Forum: C++ Development
Topic: Radiobox color error, wx2.5.5, MSW, VC7.1
Replies: 5
Views: 1201

Avi,

thank you for your reply.

Unfortunately the new 2.6.0 didn't seem to fix my problem.

Any other ideas?

Matt.
by MatthewDP
Thu Apr 21, 2005 6:32 am
Forum: C++ Development
Topic: Radiobox color error, wx2.5.5, MSW, VC7.1
Replies: 5
Views: 1201

Radiobox color error, wx2.5.5, MSW, VC7.1

wx2.5.5, MSW, VC7.1 Hi all, I'm having a problem after updating to 2.5.5 from 2.4.2. I have a panel which has a white background color. To this panel, I add several controls. All of these controls are also set to a white background color. This works except for the Radiobox. The radiobox shows up wit...