Click here to Skip to main content
15,900,258 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson8-Feb-09 22:07
professionalStuart Dootson8-Feb-09 22:07 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John5029-Feb-09 3:05
John5029-Feb-09 3:05 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50210-Feb-09 7:00
John50210-Feb-09 7:00 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson10-Feb-09 8:17
professionalStuart Dootson10-Feb-09 8:17 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50210-Feb-09 20:45
John50210-Feb-09 20:45 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson10-Feb-09 21:01
professionalStuart Dootson10-Feb-09 21:01 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50211-Feb-09 1:56
John50211-Feb-09 1:56 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson11-Feb-09 2:12
professionalStuart Dootson11-Feb-09 2:12 
Hmmm - this worked fine for me:

  1. Create the check boxes in OnInitDialog:
    CRect rcCheck1(baseSize_);
    rcCheck1.bottom /= 2;
    CRect rcCheck2;
    rcCheck2.SubtractRect(baseSize_, rcCheck1);
    rcCheck1.left = rcCheck1.right - 100;
    rcCheck2.left = rcCheck2.right - 100;
    check1_.Create(_T("1"), WS_CHILD|WS_VISIBLE|BS_CHECKBOX, rcCheck1, this, 101);
    check2_.Create(_T("2"), WS_CHILD|WS_VISIBLE|BS_CHECKBOX, rcCheck2, this, 102);
    
  2. Draw the images 100 pixels narrower (as I've made the checkboxes 100 pixels wide). I added the following two lines in OnPaint right before the OffsetRect method calls to do that:
    rcImage1.right -=100;
    rcImage2.right -=100;
    


Oh, and check1_ and check2_ are members of the dialog class, of type CButton.

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50212-Feb-09 1:01
John50212-Feb-09 1:01 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson12-Feb-09 1:02
professionalStuart Dootson12-Feb-09 1:02 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50215-Feb-09 23:51
John50215-Feb-09 23:51 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson16-Feb-09 0:04
professionalStuart Dootson16-Feb-09 0:04 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50216-Feb-09 0:45
John50216-Feb-09 0:45 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson16-Feb-09 0:55
professionalStuart Dootson16-Feb-09 0:55 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50216-Feb-09 5:01
John50216-Feb-09 5:01 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson16-Feb-09 6:49
professionalStuart Dootson16-Feb-09 6:49 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50216-Feb-09 7:16
John50216-Feb-09 7:16 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson16-Feb-09 8:12
professionalStuart Dootson16-Feb-09 8:12 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50216-Feb-09 18:30
John50216-Feb-09 18:30 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson16-Feb-09 19:42
professionalStuart Dootson16-Feb-09 19:42 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50216-Feb-09 21:48
John50216-Feb-09 21:48 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50217-Feb-09 3:50
John50217-Feb-09 3:50 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50218-Feb-09 22:42
John50218-Feb-09 22:42 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
Stuart Dootson18-Feb-09 22:46
professionalStuart Dootson18-Feb-09 22:46 
GeneralRe: Need help on how to create image on child window and have to move along with vertical scroll bar to my dialog box Pin
John50219-Feb-09 1:23
John50219-Feb-09 1:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.