Search found 79 matches

by Rocketmagnet
Fri Dec 01, 2017 11:48 am
Forum: C++ Development
Topic: GIF transparent colour turning bright pink
Replies: 21
Views: 2980

Re: GIF transparent colour turning bright pink

I think I have found the place it's happening: on line 162 of gifdecod.cpp, in the function wxGIFDecoder::ConvertToImage() pal[3 * transparent + 0] = 255, pal[3 * transparent + 1] = 0, pal[3 * transparent + 2] = 255; image->SetMaskColour(255, 0, 255); The palette colour marked as transparent is actu...
by Rocketmagnet
Fri Dec 01, 2017 11:37 am
Forum: C++ Development
Topic: GIF transparent colour turning bright pink
Replies: 21
Views: 2980

Re: GIF transparent colour turning bright pink

Hi Doublemax, As I'm sure you know, in an 8-bit GIF format image, there are three main parts: the compressed 8-bit pixel data the palette the transparency tag The pixel data itself is stored without a concept of transparency. In this case, the image has a background colour of 210. The palette is a l...
by Rocketmagnet
Fri Dec 01, 2017 10:26 am
Forum: C++ Development
Topic: GIF transparent colour turning bright pink
Replies: 21
Views: 2980

Re: GIF transparent colour turning bright pink

Hi PB, Perhaps I'm not describing the problem correctly. There should be no pink colour at all. In fact, the original GIF is a greyscale image. As I said in my original post, the image should look like the one on the left, not the one on the right. Somewhere the pink colour is being added to an imag...
by Rocketmagnet
Thu Nov 30, 2017 4:52 pm
Forum: C++ Development
Topic: GIF transparent colour turning bright pink
Replies: 21
Views: 2980

Re: GIF transparent colour turning bright pink

It does support transparency. You just have to enable it by adding 'true' at the end: dc.DrawBitmap(bitmap, x, y, true); Then it renders the pink stuff as transparent. But I don't want it to be rendered transparent. I want the pink stuff to be rendered in its correct colour, which is grey. My questi...
by Rocketmagnet
Thu Nov 30, 2017 2:39 pm
Forum: C++ Development
Topic: GIF transparent colour turning bright pink
Replies: 21
Views: 2980

GIF transparent colour turning bright pink

Hi, I load a GIF image using wxImage::LoadFile(). Then I draw the image to a wxPaintDc using DrawBitmap(). The image should look like the one on the left, but instead it looks like the one on the right. GIFs.png It seems that the 'transparent' colour has been replaced by a bright pink. Is there some...
by Rocketmagnet
Wed Nov 29, 2017 12:14 pm
Forum: Platform Related Issues
Topic: Native Windows DirCtrl ?
Replies: 2
Views: 741

Re: Native Windows DirCtrl ?

I wonder how much work this would be to add to wxGenericDirCtrl? Perhaps it's something I could try to add. I don't have any experience with Windows native code, but maybe it's possible.

I'm just surprised that more people aren't asking for this.
by Rocketmagnet
Wed Nov 29, 2017 10:35 am
Forum: Platform Related Issues
Topic: Native Windows DirCtrl ?
Replies: 2
Views: 741

Native Windows DirCtrl ?

I'm using the wxGenericDirCtrl, and it looks like this on MSW. wxGenericDirCtrl.png However, I'd prefer it to look like a native Windows directory structure with the virtual folders, like Downloads, Documents, etc. Native_Windows.png Is this possible? Surely someone must have done this before? Hugo
by Rocketmagnet
Tue Jan 26, 2010 12:14 am
Forum: C++ Development
Topic: Unicode nonsense from wxFileSystem ::FindFirst( )
Replies: 0
Views: 543

Unicode nonsense from wxFileSystem ::FindFirst( )

This code used to work in 2.8, but seems to fail in 2.9. wxString libraryFileName; wxFileSystem *FileSystem = new wxFileSystem(); FileSystem->ChangePathTo(_T("library"), true); libraryFileName = FileSystem->FindFirst(_T("*.cmp"), wxFILE); cout << libraryFileName << endl; This code outputs "file:/E%3...
by Rocketmagnet
Sun Nov 29, 2009 12:35 pm
Forum: C++ Development
Topic: worth passing wxString by reference ?
Replies: 2
Views: 759

worth passing wxString by reference ?

Hi all

If i'm passing a wxString to a function which doesn't need to modify the original, is there any point passing it by reference?

As I understand it, wxString uses reference counting internally, so it will be passed by reference anyway.

Many thanks

Hugo
by Rocketmagnet
Thu Sep 10, 2009 4:03 pm
Forum: C++ Development
Topic: Improving wxFileType under Windows
Replies: 2
Views: 811

Thanks leiradella,

I have submitted a defect ticket:

http://trac.wxwidgets.org/ticket/11186

Hugo
by Rocketmagnet
Thu Sep 10, 2009 3:51 pm
Forum: C++ Development
Topic: How to get special directories on Windows (Desktop etc)
Replies: 9
Views: 2279

doublemax, It should be possible to provide an interface to a platform independent way to implement a file browser. I know that Windows has its own strange structure, Linux has its own, and the Max has its own. But they're all file systems, and they're all a tree structure. Each node has a name, and...
by Rocketmagnet
Wed Sep 09, 2009 2:09 pm
Forum: C++ Development
Topic: How to get special directories on Windows (Desktop etc)
Replies: 9
Views: 2279

leiradella, I'm creating my own file dialog, but need a file control as part of that. So I can't use wxFileDialog. wxGenericDirCtrl only shows the drives, not the special folders. doublemax, I might end up using SHGetSpecialFolderLocation, but it would be great to have a platform independent way to ...
by Rocketmagnet
Mon Sep 07, 2009 7:30 pm
Forum: C++ Development
Topic: wxDateTime -> "Yesterday" , "tomorrow"
Replies: 5
Views: 1216

Thanks Jim,

that helps.

Hugo
by Rocketmagnet
Mon Sep 07, 2009 11:09 am
Forum: C++ Development
Topic: wxDateTime -> "Yesterday" , "tomorrow"
Replies: 5
Views: 1216

Thanks blockn102,

but I'm not sure this function will be available on all platforms.

It would be very useful if wxDateTime had this function.

Hugo
by Rocketmagnet
Mon Sep 07, 2009 9:29 am
Forum: C++ Development
Topic: wxDateTime -> "Yesterday" , "tomorrow"
Replies: 5
Views: 1216

wxDateTime -> "Yesterday" , "tomorrow"

Hi all,

if I have a wxDateTime, how can I find out of this is yesterday, etc.? There doesn't seem to be a function which works in all cases.

Many thanks

Hugo