Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Dialog Window

rtsmith
Beginner
545 Views
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?
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
545 Views
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
0 Kudos
rtsmith
Beginner
545 Views
(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?
0 Kudos
Reply