- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was wondering if there was a way to use a menu in a dialog box. Havetried everything so just looking for some help. Also when doing a windows app. can you display a dialog box as the main window?
thanks
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
See MenuDialog sample. Actually, that's even simpler if you don't use DFLOGM but straightforward API calls (DialogBox->DialogProc->WM_COMMAND), as there is no need for subclassing.
The dialog box can be main window. Actually, that's the simplest form of Windows application:
Code:
integer function WinMain(hInst, ...) !DEC$ATTRIBUTES... use dflogm include "resource.fd" ... b = DlgInit(IDD_WHATEVER, Dlg) b = DlgSet(...) iret = DlgModal(Dlg) call DlgUnInit(Dlg) WinMain = 0 end function WinMain
(CVF Application Wizard will generate a more complicated variant of the same -- I suggest keeping it simple as above).
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the great help it helped me get out of one problem but i have since ran into another problem. After updating the main dialog box i can not get a the updated information into a data structure because i have no way of knowing when the actual list box has been changed because it is done in a callback routine and you can not pass a data structure to the call back routine. If you could help me by telling me a way to get around getting other information into a call back routine that would be of great help
Thanks

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page