Click here to Skip to main content
11,635,788 members (76,274 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C++/MFC
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()
    SetScrollSizes (MM_TEXT, sizeTotal);

Please help. Thanks in advance,
Posted 18-Feb-13 0:23am
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 OriginalGriff 8,861
1 Sergey Alexandrovich Kryukov 8,459
2 Mika Wendelius 6,849
3 F-ES Sitecore 2,354
4 Suvendu Shekhar Giri 2,270

Advertise | Privacy | Mobile
Web04 | 2.8.150728.1 | Last Updated 18 Feb 2013
Copyright © CodeProject, 1999-2015
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