- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'm trying to create a tab control in a Fortran Windows Application in CVF. Iused the following code inthe MainWndProc() function.
Code:
type (T_INITCOMMONCONTROLSEX) iccex
...
case(WM_CREATE)
iccex%dwSize = sizeof(iccex)
iccex%dwICC = ICC_TAB_CLASSES
call initCommonControlsEx(iccex)
hwndTab = CreateWindowEx(0, WC_TABCONTROL, ""C, &
ior(WS_CHILD, IOR(WS_VISIBLE,TCS_MULTILINE)), 0, 0, 0, 0, hwnd, &
IDC_TAB1, ghInstance, Null)
MainWndProc = 0
returnHowever I get the following error:
C:Documents and Settings
gawadeMy DocumentsoVF est1 est1.f90(187) : Error: This name does not have a type, and must have an explicit type. [WC_TABCONTROL] hwndTab = CreateWindowEx(0, WC_TABCONTROL, ""C, & ----------------------------------------------^ Error executing df.exe.
I then tried to use some other common control windows classes in CreateWindowEx, some of them work and others don't.
Is there some other way to insert a tab control in the main window? I want to make something that looks like the Properties window.
Thanks,
nandita
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
character(*), parameter:: WC_TABCONTROL = "systabcontrol32"C
unfortunately, for some reason, is not defined in CVF's DFWINTY.f90, but you can use the literal string instead.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I figured that out. For some reason it is defined as
character*15, parameter :: TAB_CLASS_NAME = "SysTabControl32"C
But I still could't see the tab control when i start the application.
But I still could't see the tab control when i start the application.
Finally I just inserted the tab control in a modeless dialog box that is created in WM_CREATE.
I don't like this too much. Is there a better way to do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In your posted code, Tab control's dimensions are zero -- does that explain why you don't see it :o) ? (Tip: you can use Spy++ application to examine hierarchy and properties of all windows in the system).
Otherwise, approaches with modeless child dialogs are frequently used for "property window" kinds of stuff, because they're simpler to design and maintain than a bunch of CreateWindows, but in your case you'd probably want the tab control as direct child of main window, and child dialogs as children of the tab control.
Jugoslav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
silly me
it works now...thanks so much!
nandita
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