- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm using Visual Fortran 6.6 and I'm having the following problem.I have made a dialog with a tab control. I want to change between the fields of the child dialogs using the TAB button. I can't move between the buttons and fields in the child dialog. I have used the Dialogboxparam to create the main dialogbox with the tab control and createdialogparam to create child dialogboxes(with their style set to 'child'). I saw that Jugoslav has provided a solution to this problem using xflogm, but is there a solution to this when Dialogboxparam, and createdialogparam functions are used. Is'nt there some way by which the dialogproc of the childwindow in focus could be invoked when the 'TAB' key is clicked.
Thanks,
Archana
I'm using Visual Fortran 6.6 and I'm having the following problem.I have made a dialog with a tab control. I want to change between the fields of the child dialogs using the TAB button. I can't move between the buttons and fields in the child dialog. I have used the Dialogboxparam to create the main dialogbox with the tab control and createdialogparam to create child dialogboxes(with their style set to 'child'). I saw that Jugoslav has provided a solution to this problem using xflogm, but is there a solution to this when Dialogboxparam, and createdialogparam functions are used. Is'nt there some way by which the dialogproc of the childwindow in focus could be invoked when the 'TAB' key is clicked.
Thanks,
Archana
Link Copied
6 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The only trick is to use main dialog as parent to modeless child dialogs, not the tab control, i.e.
The only other concern is how to adjust the position of child dialogs correctly. Take a look on XFLOGM for that (search for TCM_ADJUSTRECT).
Jugoslav
CASE WM_INITDIALOG hChild(i) = CreateDialogParam(hInst,IDD_CHILD1,hWnd...)
The only other concern is how to adjust the position of child dialogs correctly. Take a look on XFLOGM for that (search for TCM_ADJUSTRECT).
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for the tip.I was able to center the modeless dialog boxes created using createdialog function. However I was not able to switch between controls in my dialog when tab key was pressed. The main dialogbox(that contains the tab control) receives a WM_NOTIFY(TCN_KEYDOWN)message when up arrow key is pressed. The tab stop option for the parent containing the tabbed control is set to false. What should be done to enable focus on each control within a child dialogbox when tab key is pressed.Thanks,
Archana.
Thanks for the tip.I was able to center the modeless dialog boxes created using createdialog function. However I was not able to switch between controls in my dialog when tab key was pressed. The main dialogbox(that contains the tab control) receives a WM_NOTIFY(TCN_KEYDOWN)message when up arrow key is pressed. The tab stop option for the parent containing the tabbed control is set to false. What should be done to enable focus on each control within a child dialogbox when tab key is pressed.Thanks,
Archana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Did you set "Control" (DS_CONTROL) style to child dialogs?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks,that was exactly the problem.The more style option 'Control' was not set for the child windows.
Archana
Archana
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there!
Im facing the same problem that almost everybody that wants to use tab controls and tab key together faces!
But i just couldnt achieve the spot... ive read that i must "link" the child windows to the main dialog and not to the "IDD_TAB"... but i dont know how to do that... i couldnt use "CreateDialogParam" (in which library is it?).
And when/where do i need to make this "link"? everytime, just once, in the "MyAppSub" subroutine...?
i couldt use TCM_ADJUSTRECT, and i dont know how to handle the messages like WM_INITDIALOG and so on...
any help will be excellent!
sorry for my ignorance! =)
Vinicius
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Vinicius,
We were talking about Win32-handled dialogs. You can't do it with DFLOGM... or maybe you can?
This might be possible if you manage to set up WS_EX_CONTROLPARENT extended style for the tab control. I'm not at my computer at the moment so I can't see whether it does exist on Tab's proparty page. In any case, it should be possible using
Also, IIRC, that same style should be set up for child dialogs, along with DS_CONTROL ("control"). Try both combinations & please let me know if it works.
Jugoslav
We were talking about Win32-handled dialogs. You can't do it with DFLOGM... or maybe you can?
This might be possible if you manage to set up WS_EX_CONTROLPARENT extended style for the tab control. I'm not at my computer at the moment so I can't see whether it does exist on Tab's proparty page. In any case, it should be possible using
integer:: hTab
hTab = GetDlgItem(Dlg%hWnd, IDC_TAB1)
iStyle = GetWindowLong(hTab, GWL_EXSTYLE)
ret = SetWindowLong(hTab, GWL_EXSTYLE, IOR(iStyle, WS_EX_CONTROLPARENT))
Also, IIRC, that same style should be set up for child dialogs, along with DS_CONTROL ("control"). Try both combinations & please let me know if it works.
Jugoslav
![](/skins/images/45C6C2D737ED71F4C51F0145C8CB1E9C/responsive_peak/images/icon_anonymous_message.png)
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