Search found 111 matches

by Everydaydiesel
Mon Jun 03, 2019 4:16 pm
Forum: C++ Development
Topic: Drawing With 'Layers'
Replies: 10
Views: 218

Re: Drawing With 'Layers'

Does it draw a line on yours? When I try it on mine it doesnt draw the red line.

build 2017-09-30, 18:21:54 wx3.0.3 (Linux, unicode) 64 bit
by Everydaydiesel
Mon Jun 03, 2019 3:18 pm
Forum: C++ Development
Topic: Drawing With 'Layers'
Replies: 10
Views: 218

Re: Drawing With 'Layers'

I tried that code but the line is still on top of the text instead of underneath
OutputEnlarged.png
OutputEnlarged.png (4.07 KiB) Viewed 163 times
by Everydaydiesel
Mon Jun 03, 2019 3:00 pm
Forum: C++ Development
Topic: Drawing With 'Layers'
Replies: 10
Views: 218

Re: Drawing With 'Layers'

Thanks. I think I am getting closer. This code creates this but it is not drawing the red line for some reason. (the background is transparent) TestOutput.png wxBitmap bmp(463, 105, 32); bmp.LoadFile("Input.png"); wxMemoryDC memDC(bmp); memDC.SetBackground(*wxTRANSPARENT_BRUSH); memDC.SetBackgroundM...
by Everydaydiesel
Mon Jun 03, 2019 12:59 pm
Forum: C++ Development
Topic: Drawing With 'Layers'
Replies: 10
Views: 218

Re: Drawing With 'Layers'

Thank you for the reply. I thought I was doing that? Maybe LoadFile clears the mask out? wxBitmap bmp(463, 105, 32); wxMask *pmask = new wxMask(bmp, wxColour(255, 255, 255)); bmp.SetMask(pmask); bmp.LoadFile("Input.png"); edit: I tried the DrawBitmap function after DrawLine but it still did not work...
by Everydaydiesel
Mon Jun 03, 2019 5:16 am
Forum: C++ Development
Topic: Drawing With 'Layers'
Replies: 10
Views: 218

Re: Drawing With 'Layers'

Here is the enlarged version of the ouput


Actual Output:
ActualOutputEnlarged.png
ActualOutputEnlarged.png (4.25 KiB) Viewed 213 times

Target Output:
TargetOutputEnlarged.png
TargetOutputEnlarged.png (4.19 KiB) Viewed 213 times
by Everydaydiesel
Mon Jun 03, 2019 5:10 am
Forum: C++ Development
Topic: Drawing With 'Layers'
Replies: 10
Views: 218

Drawing With 'Layers'

Hello, I am trying to draw in 'layers' but the code is not exactly doing what I intended. Here is the input to the program (always png/bmp) Input.png What I want it to do is draw the line BEHIND the text. I think the way I do this is with the following steps (I could be wrong) 1. Load the image (alw...
by Everydaydiesel
Mon Jun 03, 2019 1:25 am
Forum: C++ Development
Topic: Drawing transparent bitmap on panel
Replies: 8
Views: 6562

Re: Drawing transparent bitmap on panel

The problem is that the "standard" wxDC functions don't handle transparency too well. And drawing with a transparent brush is like a no-operation, it does nothing. You have to use wxGraphicsContext or wxGCDC for this. This sample code creates a transparent bitmap with a red rectangle in the middle:...
by Everydaydiesel
Thu May 16, 2019 2:38 pm
Forum: C++ Development
Topic: Converting Time Zones To Central Standard Time (CST)
Replies: 2
Views: 112

Converting Time Zones To Central Standard Time (CST)

I seem to be going in circles here and I would greatly appreciate any help I can get. I have a date that comes in as "2019-05-16T09:30:00-04:00" as an example. (I wont know the timezone in advance) In the example above it is -4:00 from UTC 2019-05-16 09:30:00 - 04:00 According to this chart https://...
by Everydaydiesel
Tue Feb 26, 2019 5:27 pm
Forum: C++ Development
Topic: Passing Data From Static Classes To Main Dialog Class
Replies: 4
Views: 137

Re: Passing Data From Static Classes To Main Dialog Class

compiler tells me it is a std::shared_ptr<http_connection> self = shared_from_this(); it was actually taken from this example ( I wish i could convert that example without shared and lambdas but I have tried and failed) https://www.boost.org/doc/libs/1_69_0/libs/beast/example/http/server/small/http_...
by Everydaydiesel
Tue Feb 26, 2019 4:49 pm
Forum: C++ Development
Topic: Passing Data From Static Classes To Main Dialog Class
Replies: 4
Views: 137

Re: Passing Data From Static Classes To Main Dialog Class

Thank you for the reply. I tried this first and got hung up on this problem. I pass in a reference to 's' and it acts like it cant see s at all. I suspect this has something to do with lambda but I am not good with them at all. // Asynchronously receive a complete request message. void read_request(...
by Everydaydiesel
Tue Feb 26, 2019 5:25 am
Forum: C++ Development
Topic: Passing Data From Static Classes To Main Dialog Class
Replies: 4
Views: 137

Passing Data From Static Classes To Main Dialog Class

Hello, I have a dialog application that has a main thread and a second std:thread. The std::thread starts a http listener and has its own static class https://www.boost.org/doc/libs/1_69_0/libs/beast/example/http/server/small/http_server_small.cpp My question is, when a event fires inside the static...
by Everydaydiesel
Mon Feb 25, 2019 5:47 pm
Forum: C++ Development
Topic: Detecting Multiple Instances And Passing Variables
Replies: 1
Views: 118

Detecting Multiple Instances And Passing Variables

Hello, I have an application that I want to have only one instance running. I have the following code that is able to detect the 2nd instance but I am having trouble passing the command line parameter from the second application to the first. #include <wx/snglinst.h> void Application_Dialog::OnInit(...
by Everydaydiesel
Wed Feb 13, 2019 4:53 pm
Forum: C++ Development
Topic: Selecting Multiple Items In A wxListBox Without Having To Manually Press Ctrl
Replies: 11
Views: 327

Re: Selecting Multiple Items In A wxListBox Without Having To Manually Press Ctrl

I already have wxLB_MULTIPLE and I CAN hold the ctl key down and select multiple items. My question is, how can I create this functionality WITHOUT having to hold ctl. Platform, wxWidgets version? With wxLB_MULTIPLE you should get the behavior you want. I checked with the "widgets" sample under Win...
by Everydaydiesel
Tue Feb 12, 2019 4:57 pm
Forum: C++ Development
Topic: Selecting Multiple Items In A wxListBox Without Having To Manually Press Ctrl
Replies: 11
Views: 327

Re: Selecting Multiple Items In A wxListBox Without Having To Manually Press Ctrl

Thank you for the reply however that does not really help me.

I already have wxLB_MULTIPLE and I CAN hold the ctl key down and select multiple items. My question is, how can I create this functionality WITHOUT having to hold ctl.