- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using the following lines, to show, or hide a dialog ite. For some Dialogs it works, for some not.
But no idea why. Should I use additionally a SendMessage to the item to update the drawing, or what ?
subroutine Show_Dialog_object(dlg,h_id,show)
use dflogm
use dfwinty
use user32
! input variables
TYPE (dialog) dlg ! the owner dialog
integer h_id ! object id
logical show ! TRUE.. show, FALSE.. hide
logical retlog
integer hwnd
hwnd = GetDlgItem( dlg%hwnd, h_id) ! 1341
if (show) then
retlog = ShowWindow(hwnd, SW_SHOW) ! Makes visible
else
retlog = ShowWindow(hwnd, SW_HIDE) ! Makes in-visible
endif
return
end subroutine Show_Dialog_object
But no idea why. Should I use additionally a SendMessage to the item to update the drawing, or what ?
subroutine Show_Dialog_object(dlg,h_id,show)
use dflogm
use dfwinty
use user32
! input variables
TYPE (dialog) dlg ! the owner dialog
integer h_id ! object id
logical show ! TRUE.. show, FALSE.. hide
logical retlog
integer hwnd
hwnd = GetDlgItem( dlg%hwnd, h_id) ! 1341
if (show) then
retlog = ShowWindow(hwnd, SW_SHOW) ! Makes visible
else
retlog = ShowWindow(hwnd, SW_HIDE) ! Makes in-visible
endif
return
end subroutine Show_Dialog_object
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jaeger0
I'm using the following lines, to show, or hide a dialog ite. For some Dialogs it works, for some not.
But no idea why. Should I use additionally a SendMessage to the item to update the drawing, or what ?
subroutine Show_Dialog_object(dlg,h_id,show)
hwnd = GetDlgItem( dlg%hwnd, h_id) ! 1341
if (show) then
retlog = ShowWindow(hwnd, SW_SHOW) ! Makes visible
else
retlog = ShowWindow(hwnd, SW_HIDE) ! Makes in-visible
endif
But no idea why. Should I use additionally a SendMessage to the item to update the drawing, or what ?
subroutine Show_Dialog_object(dlg,h_id,show)
hwnd = GetDlgItem( dlg%hwnd, h_id) ! 1341
if (show) then
retlog = ShowWindow(hwnd, SW_SHOW) ! Makes visible
else
retlog = ShowWindow(hwnd, SW_HIDE) ! Makes in-visible
endif
No, that will always work, as long as the dialog is alive, i.e. Dlg%hwnd is a valid handle. That will be the case only after (or during) DlgModal or DlgModeless, but not before. If you need initialization, write a DLG_INIT callback and call this from there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Jugoslav Dujic
No, that will always work, as long as the dialog is alive, i.e. Dlg%hwnd is a valid handle. That will be the case only after (or during) DlgModal or DlgModeless, but not before. If you need initialization, write a DLG_INIT callback and call this from there.
ok, the Dialog is initialized, and I call the show_Dialog_oobject during an update routine.
I found out GetDlgItem returns 0 for hwnd, this may be the reason. Is there another way to get hwnd ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jaeger0
ok, the Dialog is initialized, and I call the show_Dialog_oobject during an update routine.
I found out GetDlgItem returns 0 for hwnd, this may be the reason. Is there another way to get hwnd ?
I use this module only for one Dialog, and the IFLOGM for the remaining, maybe this molules are making problems, if I use both
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - jaeger0
Now I found out, that the problem comes by using the XFLOGM instead IFLOGM,
I use this module only for one Dialog, and the IFLOGM for the remaining, maybe this molules are making problems, if I use both
I use this module only for one Dialog, and the IFLOGM for the remaining, maybe this molules are making problems, if I use both
Yes, mixing them is problematic at best. You may mix them, I guess (never tried), but you have to be careful that they're used both for its own set of dialogs.

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