- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can create a dialog window in CVF fine but it is too large for some screens. I put on a vertical scroll bar with the dialog editor. I also set the "resize" option so that I can resize the frame (for small screens). BUT when I run the program on a small screen or resize the frame on any screen, I cannot scroll the panel in the window by moving the vertical slider. The slider just jumps back to the top and the frame stays in the same place. What else do I have to do in the dialog editor to allow the frame to scroll vertically?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it pure Win32 or DFLOGM? (Looks like the former.)
Contrary to what one might believe, scrollbars don't"stick" automatically when dragged by the user. You have to catch WM_HSCROLL and adjust scrollbar position accordingly. (If you're using DFLOGM, it does it for you, based on DLG_RANGEMIN/DLG_RANGEMAX settings). Also, you should catch WM_SIZE for the frame window to readjust its settings.
See XDblBuffer2sample on my home page to seethe principle -- pay attention to WM_*SCROLL and WM_SIZE blocks. In the sample, image is scrolled by means ofmonitorin scrollbaroffsets, but it's easilyapplied to caseof a modeless child dialog in the client area -- just use MoveWindow(hChildDialog, -iXScrollbarPos, -iYScrollbarPos, ...) instead.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
(This is the same as a previous query but is being sent again because of problems submitting queries)
I can create a dialog window in CVF fine but it is too large for some screens. I put on a vertical scroll bar with the dialog editor. I also set the "resize" option so that I can resize the frame (for small screens). BUT when I run the program on a small screen or resize the frame on any screen, I cannot scroll the panel in the window by moving the vertical slider. The slider just jumps back to the top and the frame stays in the same place. What else do I have to do in the dialog editor to allow the frame to scroll vertically?

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page