WIN 32 Applications

WIN 32 Applications

How can I use scroll bar, combo box and list box in win 32 application with compaq visual fortran ?

I would like to thank for your attention.

Fau.

9 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

There is an example problem called whizzy that shows how to use dialog boxes. There are a couple other examples on dialogs. This came with your program disk. I bought a booked called, "Digital Visual Fortran Programmer's Guide" and chapter 11 shows how to use dialogs.

Myron

Note that the book you refer to is a printed form of the Programmer's Guide provided as on-disk documentation with Visual Fortran. There is also a new book "Compaq Visual Fortran: A Guide to Creating Windows Applications" by Norman Lawrence, which provides a lot more information on creating GUI applications using the Win32 API.

Steve

Steve - Intel Developer Support

Dear Steve,

Thank you very much for your attention. Recently, I have bought the book "Compaq Visual Fortran: A Guide to Creating Windows Applications" by Norman Lawrence. There are a lot of examples about WIN 32 application in this book, but there is no example how to use the scroll bar inside of the dialog box.

Best regards,

Fau.

You want to scroll the whole dialog box? You can't (not without a LOT of work, anyway.) That's not generally done in Windows.

Steve

Steve - Intel Developer Support

Actually, it's not that hard using a little trick. The trick is to design a borderless child dialog (similarly as with tabbed dialogs), while the main dialog contains only scrollbar (and perhaps OK/Cancel buttons). On main dialog's startup, set up scrollbar parameters and run child dialog as modeless, with main dialog as parent; in scrollbar's callback function, use MoveWindow or SetWindowPos to adjust position of the child dialog accordingly.

Jugoslav

Jugoslav
www.xeffort.com

I want to use the scrool bar control similar to the used in the examples TEMP and CELSICON. However, I want to use the scroll bar using the Win32 API.

Fau

First, note that DFLOGM is independent of project type -- it works in Win32 applications too.

But whatever handling method you choose (DFLOGM or pure API) my advice above still holds: design main dialog and child dialog. In main procedure, do DlgModal/DialogBox. In OnDlgInit/WM_INITDIALOG, create the child dialog using DlgModeless/CreateDialog. Handle scrollbar movements (in DFLOGM, it will be a callback routine; in API, catch WM_VSCROLL message). Query scrollbar position using DlgGet(DLG_POSITION)/LOWORD(wParam). Finally, move the child dialog using MoveWindow. {Obviously, the first items in pairs above refer to DFLOGM, the second ones to API}.

Jugoslav

Jugoslav
www.xeffort.com

Dear myron,

Thank you very much for your attention. I know the example WIZZY. The commands used for QuickWin application are different from the Fortran Windows Application. Recently, I have bought the book "Compaq Visual Fortran: A Guide to Creating Windows Applications" by Norman Lawrence. There are a lot of examples about WIN 32 application in this book, but there is no example that show me how can I use the scroll bar. There is example about list box and combo box. I have been able to use the list box and combo box, but I haven't been able to use scroll bar yet.

Best regards,

Fau.

Leave a Comment

Please sign in to add a comment. Not a member? Join today