How to disable non-visible dialog items
-
Hello, I implemented an expandable/shrinkable dialog (with a "more >>"/"<< Less") button and that works well, except that the dialog items that are not visible can still be accessed and modified (by pressing the Tab key for instance). So I was thinking about simply disabling non-visible items. For that, I don't want to have to specify manually the item ids that need to be disabled when the dialog is shrunk. So I was thinking about going through all items of my dialog and checking whether they are contained in the visible area, then disable them if not visible. What function would I need to use for that? Is there something like: GetDlgItem(index)? Thank you
-
Hello, I implemented an expandable/shrinkable dialog (with a "more >>"/"<< Less") button and that works well, except that the dialog items that are not visible can still be accessed and modified (by pressing the Tab key for instance). So I was thinking about simply disabling non-visible items. For that, I don't want to have to specify manually the item ids that need to be disabled when the dialog is shrunk. So I was thinking about going through all items of my dialog and checking whether they are contained in the visible area, then disable them if not visible. What function would I need to use for that? Is there something like: GetDlgItem(index)? Thank you
use: GetWindow(..) with child and nex params. IsWindowVisible(...) and EnableWindow(...)
-
use: GetWindow(..) with child and nex params. IsWindowVisible(...) and EnableWindow(...)
Thank you for your reply. I tried it, but somehow I cannot loop through the elements (GetWindow never returns NULL with the GW_HWNDNEXT parameter). I however managed to get it right by using the EnumChildWindows function.