Click here to Skip to main content
15,896,526 members

Comments by the vacuum (Top 14 by date)

the vacuum 7-May-14 5:44am View    
Thanks for your reply?, Sorry, I'm new in MFC, I couldn't get what you explained?
Did you mean to use splitter window?
If so.. for example I have splitted the window to two part with two columns and one row ie Pan(0, 0) & Pan(0, 1).
Then if I need to display first opening image file(using CDocument::OnOpenDocument) in Splitter Pan(0, 1), how can I do this? where I specify to display it in second splitter pan(0,1)?
I'm using CView::OnDraw to display the image. The image have been copy to a memory dc before writing to the window. Can I use this handle to do..?
What I understanding that each splitter pan in splitter window has a handle & I can map the image file or memory dc to that handle. Is it right? If so how can I get the handle of a particular splitter pan?
Also, I have implemented facility for zooming and panning image. For its calculations I'm using size of frame that displaying particular image file. So I have to get size of the window(splitter) pan where a particular image is displayed for zooming and panning it individually?
the vacuum 29-Apr-14 3:45am View    
how can extend the application window to second monitor?
the vacuum 27-Mar-14 1:07am View    
Thank you very much for the solution...
Sorry for the inconvenience I couldn't understand what you mean by the statement
"If you want to shift the origin, than you have also to change the x and y by the difference divided by zoom factor."
Do you mean x & y of the source(xSrc & ySrc parameters in StretchBlt) or the destination window (x & y parameters)?
another doubt is
what you mean by "difference" difference between which values?


Currently my program working properly except this requirement. I had analyzed image processing libraries like CxImage on the starting, but as i application is simple one I don't need them.
My doubt about StretchBlt is about the mapping of image to destination window while it varies. For example my image size is 100 x 100 and my destination window size is 50 x 70 then In to which pixel of the destination rectangle the image pixel(50, 50) will be displayed?
Also if the destination rectangle size changes to (500 x 600) then to where the image pixel(50, 50)will be mapped to?.
I expect, if find a solution to calculate the mapping between the image pixels to the destination pixel, the image pixels can be relocated to any pixel in window coordinates.

My understanding is that the CSrollView::GetScrollPosition method gives the documents width & height point in left top position of scroll window. Like that have any function available in CView?
the vacuum 26-Mar-14 2:08am View    
Anyway I avoided CSrollView and used CView ...
Thanks for helps..........
the vacuum 20-Mar-14 5:00am View    
I tried that, but the mouse click event in toolbar is not forwarding to my view class..