Search found 11375 matches

by doublemax
Sun Oct 22, 2017 12:21 pm
Forum: Compiler / Linking / IDE Related
Topic: MinGW and wxAuiNotebook
Replies: 3
Views: 35

Re: MinGW and wxAuiNotebook

Can you successfully build the "aui" sample that comes with wxWidgets? If yes, check which libraries it imports. It's possible that MSVC adds them automatically through #pragma's
by doublemax
Sun Oct 22, 2017 12:12 pm
Forum: C++ Development
Topic: screenshot code problem.
Replies: 8
Views: 139

Re: screenshot code problem.

I can't see how your code could ever have worked. As there was a similar question a while ago, i decided to write a small class for grabbing a screen area. For simplicity it only uses the "fake" method that just grabs the whole screen and displays the bitmap full screen. I.e. if there are ...
by doublemax
Sat Oct 21, 2017 11:07 am
Forum: Database Related
Topic: How i can save the char data directly to blob db?
Replies: 2
Views: 28

Re: How i can save the char data directly to blob db?

wxImage img=mybitmap.ConvertToImage(); unsigned char* data=img.GetData(); int datalength=img.GetWidth()*img.GetHeight()*3; This is not a good solution. You lose the alpha channel if there is one. And more importantly, you have no information about width and height in the data buffer. It's better to...
by doublemax
Sat Oct 21, 2017 8:10 am
Forum: General Development
Topic: WebView::GetPageSource() returns original HTML
Replies: 5
Views: 87

Re: WebView::GetPageSource() returns original HTML

@OP: Did you manually edit the page or just programmatically using Cut()/Copy()/Paste()/DeleteSelection() ?
by doublemax
Fri Oct 20, 2017 6:47 am
Forum: General Development
Topic: WebView::GetPageSource() returns original HTML
Replies: 5
Views: 87

Re: WebView::GetPageSource() returns original HTML

I haven't tried it myself, but it sounds normal to me if you only get the original HTML back. I'm more surprised that things like Cut/Paste/Deleteselection work at all.

Have you tried SetEditable()?
by doublemax
Thu Oct 19, 2017 9:12 pm
Forum: C++ Development
Topic: wxHTTP. How to send data and read response
Replies: 1
Views: 34

Re: wxHTTP. How to send data and read response

When i comment out the SetPostText() call, i get a response. I'm not sure yet if this is really a wxHTTP problem. Maybe it just because the data you're sending is incomplete? I would suggest to test this with the command line version of Curl first. If that works, continue with wxHTTP. Or use libcurl...
by doublemax
Thu Oct 19, 2017 8:35 pm
Forum: Component Writing
Topic: Custom Text Control
Replies: 4
Views: 45

Re: Custom Text Control

Small sample use wxHtmlListBox: class MyHtmlListBox : public wxHtmlListBox { public: MyHtmlListBox(wxWindow *parent) : wxHtmlListBox( parent, wxID_ANY ) { }; ~MyHtmlListBox() {}; protected: virtual wxString OnGetItem( size_t n ) const { return wxString::Format( wxT("<table border=0><tr><td widt...
by doublemax
Thu Oct 19, 2017 8:16 pm
Forum: Component Writing
Topic: Custom Text Control
Replies: 4
Views: 45

Re: Custom Text Control

I would use wxVListBox for this. It will handle all the scrolling, mouse handling etc for you. All you need to do is to derive from wxVListBox and implement two virtual methods: OnMeasureItem() which just returns the height for each item. In the simplest case you just return a constant value here. O...
by doublemax
Thu Oct 19, 2017 7:52 pm
Forum: Component Writing
Topic: Adding Your Code To 'CustomClass' Control
Replies: 1
Views: 23

Re: Adding Your Code To 'CustomClass' Control

I think the CB forum (if one exist) would be a better place to ask this.
by doublemax
Thu Oct 19, 2017 7:49 pm
Forum: Component Writing
Topic: Custom Text Control
Replies: 4
Views: 45

Re: Custom Text Control

Can you user directly type into this or is it just for display? In the latter case check out wxSimpleHtmlListBox. But it might be a little tricky to implement more than one column. The next best choice would be wxVListBox. If this should also be editable, you have a huge mountain to climb and i woul...
by doublemax
Thu Oct 19, 2017 11:04 am
Forum: C++ Development
Topic: screenshot code problem.
Replies: 8
Views: 139

Re: screenshot code problem.

I would need a working sample to try it out myself. There are only two things that look a little suspicious: void screenShotFrame::DoPaint(wxWindow* wnd, const wxPen& linePen) You're passing in a window pointer. Are you sure it's the correct one? How does the "real" paint event handler...
by doublemax
Thu Oct 19, 2017 8:24 am
Forum: C++ Development
Topic: screenshot code problem.
Replies: 8
Views: 139

Re: screenshot code problem.

I didn't run the code, so i don't really know what you meant with "altered background". Maybe there were some artifacts when the old code was trying to draw outside the window area?
by doublemax
Thu Oct 19, 2017 6:31 am
Forum: C++ Development
Topic: screenshot code problem.
Replies: 8
Views: 139

Re: screenshot code problem.

dc.DrawRectangle(x1, y1, x2, y2); The parameters 3 and 4 are width and height, not absolute positions void screenShotFrame::screenCapturePart1( wxMouseEvent& event ) { x1=x2=y1=y2=0; wxPoint pt = wxGetMousePosition(); x1= pt.x - this->GetScreenPosition().x; y1 = pt.y - this->GetScreenPosition()...
by doublemax
Tue Oct 17, 2017 10:17 pm
Forum: C++ Development
Topic: wxBrush SetStipple different between panel and printer
Replies: 5
Views: 84

Re: wxBrush SetStipple different between panel and printer

Upscaled bitmaps always look bad. If you just want diagonal stripes i would create a new bitmap from scratch and use wxMemoryDC to draw the pattern into it. But if you want to scale, something like this should work: wxBitmap orig_bmp(...); wxBitmap scaled_bmp = wxBitmap( orig_bmp.ConvertToImage().Sc...
by doublemax
Tue Oct 17, 2017 3:52 pm
Forum: C++ Development
Topic: wxBrush SetStipple different between panel and printer
Replies: 5
Views: 84

Re: wxBrush SetStipple different between panel and printer

Stipple brushes are probably pixel based, so on a printer with much higher DPI they will look much smaller. I guess you have to create the brush bitmap dynamically based on the printer resolution.

Go to advanced search