Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++/MFC
Hi,
I have designed a SDI application to display a bitmap image(1024x768). In the bottom and right sides of the displayed bitmap image there is a row and column of white pixels which are not there in the original bitmap image(I have checked this in paint). I have no clue where it is coming from. To be complete, the image is displayed in a view object derived from CSrollview.
The scroll size is set as:
void CCreateGratingsView::OnInitialUpdate()
{
    CScrollView::OnInitialUpdate();
    SetScrollSizes (MM_TEXT, sizeTotal);
}
 
Please help. Thanks in advance,
-Danny
Posted 18-Feb-13 0:23am
Comments
Chris Reynolds (UK) at 18-Feb-13 8:32am
   
I've no idea but it isn't something daft where a rectangle is sized have a top left of (0,0) and a bottom right of (1024, 768) rather than a width of 1024 and height of 768 as the former would give you a bonus pixel. Without more of your code it is difficult to tell, but that sort of thing has caught me before.
Manfred R. Bihy at 18-Feb-13 10:23am
   
That's what I just thought too. If it is exactly one row and one column then it sounds like the usual off by one error here! :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 265
1 _Amy 235
2 Peter Leow 205
3 Andreas Gieriet 180
4 Shmuel Zang 120
0 OriginalGriff 7,540
1 Sergey Alexandrovich Kryukov 6,412
2 Maciej Los 3,849
3 Peter Leow 3,653
4 CHill60 2,712


Advertise | Privacy | Mobile
Web02 | 2.8.140721.1 | Last Updated 18 Feb 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100