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.

Scrolling a dialog Window

Intel_C_Intel
Employee
781 Views

I've the following problem:
I have created a dialog in Visual Fortran. The size of the dialog is to big for some screens/resolutions. So I need a scroll bar. In the properties of the dialog I can add the scrollbar and it appears lateron, but nothing happens when I try to scroll, althouh the whole dialog is not
visible. I start my apllication with the following code:

qwi%h = 0
qwi%w = 0
qwi%x = 5000
qwi%y = 5000
qwi%type = QWIN$SET
status = SETWSIZEQQ(QWIN$FRAMEWINDOW, qwi)

Somewhere later I createthe dialog where I need to scroll:

bRet = DlgInit(PKEKKR, dlg)


I found some postings about the problem in this forum, but nothing helped up to now.

Can someone help, possibly with example code?

greetings and Thanks in advance

0 Kudos
5 Replies
hpb
Beginner
781 Views

Hello,

I'm new in working with visual fortran and dialog windows and also in this forum.

So I don't know now, if there is a solution for my problem (scrolling a dialog window) at all, or did noone had a similar problem in the past? Is additional information necessary?

Or did I violated some rules in this forum?

greetings and thanks in advance

hpb

0 Kudos
Steven_L_Intel1
Employee
781 Views
Your post was fine.

Two things. First, the code you show is for creating the QuickWin frame window. This has no connection with dialogs, which exist in their own window.

Second, and more important - dialog windows cannot scroll. That's just not part of the Windows design. You can't do it. Think about how to restructure your user interface to use smaller dialogs. Maybe a tab interface?
0 Kudos
jimdempseyatthecove
Honored Contributor III
781 Views

Although I program on Windows I am not a Windoz programmer so take my observations as-is.

I use Dialog Boxes (crudely) but I do know that dialog boxes have a title bar that can be clicked and dragged. I know that you can drag a dialog box sideways so most of it is off the screen. Same for down so most is below screen. I also know that the borders of a standard window has a click and drag edge function (dialog boxes are not resizable and do not have this feature).

I hypothsize that a window fora dialog box receives messages for the resize from border but those messages are NO-OP'd with lack of dispatch routine. It may be possible to filter the dialog box dispatch routineand insert message dispatch routines for resize and redirect to the reposition dispatch(as if mouse were clicked and dragged on the title bar). What this would provide is the ability to grab the title bar as well as any border and move the dialog box until the mouse cursor hits the screen edge..

e.g. grab the lower side of the dialog box then push the top part of the dialog box up past the top of the screen. This does mean that at least one vertical border of the dialog box needs to be accessible.

Also, as long as you are playing around potentially the keyboard could do similar things

e.g. Alt-RightArrow makes right edge of (in focus) dialog box left of right edge of screen
Alt-LeftArrow makes left edge of (in focus) dialog box right of left edge ofscreen
Alt-UpArrow makes top edge of (in focus) dialog box below top of screen
Alt-DownArrow makes botton edge of (in focus) dialog box above bottom of screen
Shift-XxxArrow does half screen shift of dialog box away from direction of arrow (i.e. view moves in direction of arrow as with Alt-XxxArrow)

Jim Dempsey

0 Kudos
jimdempseyatthecove
Honored Contributor III
781 Views

Or use scroll mouse wheel to scroll (move) dialog up/down on the screen past screen edge.

Jim

0 Kudos
Jugoslav_Dujic
Valued Contributor II
781 Views
Short answer: don't do that; instead, organize the information in a manner which would make the dialog smaller and more navigable (e.g. using tabs).

Long answer: see this old thread.
0 Kudos
Reply