Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

WIN 32 Applications

fau
Beginner
1,200 Views
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.
0 Kudos
8 Replies
myron_r
Beginner
1,200 Views
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
0 Kudos
Steven_L_Intel1
Employee
1,200 Views
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
0 Kudos
fau
Beginner
1,200 Views
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.
0 Kudos
fau
Beginner
1,200 Views
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.
0 Kudos
Steven_L_Intel1
Employee
1,200 Views
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
0 Kudos
Jugoslav_Dujic
Valued Contributor II
1,200 Views
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
0 Kudos
fau
Beginner
1,200 Views
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
0 Kudos
Jugoslav_Dujic
Valued Contributor II
1,200 Views
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
0 Kudos
Reply