Hi there,
What I'm trying to do:
I've got an image which I want to rescale, while keeping its aspect ratio. That means that if I have a square window and a rectangular (w > h) image, the image is scaled on window resizing so that the height of the scaled image is now the height of the new window, and a scroll bar appears at the bottom of the window, because the image doesn't fit entirely in the window (if not clear, run my code, but change IMAGE_PATH otherwise it looks for the demo image.bmp at the root directory)
The Problem: When resizing the window to an aspect ratio different from the image aspect ratio, everything is fine, but when the aspect ratio is the same and both scrollbars disapear, some weird shit happens: the image flickers like hell and the programs dies 9 times out of 10
I use GetClientSize() to rescale the image, however the function does not return the size the window would have WITHOUT the scrollbars.
Any idea or comment?
Also, why can't I switch properly (file menu) from notebook to splitter view? should I go through a wxpanel instead of directly using MyFrame.win?
any chance of being able to swich from splitter to notebook to MDI without recreating MyCanvas windows?
Oh! and my code which is absolutely useless is at best public domain, at worse (from having taken code from other programs) opensource
Cheers,
Egor
/ (8.16 KB)
···
--
_______________________________________________
Talk More, Pay Less with Net2Phone Direct(R), up to 1500 minutes free!
http://www.net2phone.com/cgi-bin/link.cgi?143