Software Archive
Read-only legacy content
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.
17060 Discussions

Dialog box generation at run time

alfredodell
Beginner
420 Views
I would like to generate a dialog box during program execution rather
than use the dialog editor method as is possible for menus.
I would expect that a call to DlgInit would be replaced by a series of calls
to set up the dialog structure for each control.
Is this possible?. Is it easy to do? If so how?
0 Kudos
1 Reply
Jugoslav_Dujic
Valued Contributor II
420 Views
Well, I wouldn't call it "easy to do". I think it's doable, but it's questionnable whether it's worth the effort. I use DFLOGM (ok, XFLOGM) for my main GUI project for some 40 dialogs, while some 5-6, where I need something special, are managed using Win32 API. DialogBox API and family (DialogProc, WM_COMMAND, GetDlgItem) is compatible with any kind of application. It's not that hard to program; I believe there are samples on CVF CD for dialog-based applications.

Besides, relatively simple stuff (such as variable but limited number of controls) can still be handled with DFLOGM so that you create a dialog resource with maximal number of controls, assign them subsequent ID numbers (say, from 1100 to 1100+n -- that's not mandatory, just for easier handling using DO-loops) and use ShowWindow/GetDlgItem and/or MoveWindow from the code to modify the number at run-time.

Jugoslav
0 Kudos
Reply