English 中文(简体)
我如何在主机上展示陈词?
原标题:How do I display a CFormView in a mainframe?

我创建了一个SDI MFC的手表,但没有得到理论/观点的支持。 MFC模板给我一张带有空白窗口的照片(And a menu,等)。

我想在这个主要窗口上显示我的CFormView反对。 (根据在编目中作出的分类)

我如何这样做? 创造寡妇和窗户似乎都没有必要。 我发现,我所有的网页似乎都谈到我不喜欢的MDI和其他问题。

  • 这一观点永远不会改变。 它将有一个清单箱子控制,即所有。 我如何看到新的形式?

  • 此外,我如何找到一个有一对一的控制的浮动窗口? (DLG箱和DoModal(DLG)将不会在这里为我工作)。

问题回答
  • Give your CFormView the WS_CHILD style
  • Create it as a MODELESS dialog with the app window as the parent window
  • resize it to fit the parent s client area, or resize the parent to fit it.

The WS_CHILD style is not a default style for a dialog template, but you can add it. this will cause the dialog to show up inside the client area of the main frame window you when create it.

您也不妨在电传泵上添加“密码”的内容。 这需要TAB钥匙在诊断中处理。

Edit ---- I m not an MFC programmer, so I can only guess how you would go about this in MFC.

Presumably you still have dialog templates, so you would go into your .RC file and remove the WS_POPUP and add the WS_CHILD style to your template declaration. like this:

IDD_WHATEVER DIALOG DISCARDABLE  0, 0, 275, 217
STYLE DS_MODALFRAME | DS_3DLOOK | WS_CHILD | WS_VISIBLE
CAPTION "General"
FONT 8, "MS Sans Serif"
BEGIN
   // etc
END

Modeless dialogs are created in Win32 by using CreateDialog rather than DialogBox, in MFC by using Create() rather than DoModal().





相关问题
Undefined reference

I m getting this linker error. I know a way around it, but it s bugging me because another part of the project s linking fine and it s designed almost identically. First, I have namespace LCD. Then I ...

C++ Equivalent of Tidy

Is there an equivalent to tidy for HTML code for C++? I have searched on the internet, but I find nothing but C++ wrappers for tidy, etc... I think the keyword tidy is what has me hung up. I am ...

Template Classes in C++ ... a required skill set?

I m new to C++ and am wondering how much time I should invest in learning how to implement template classes. Are they widely used in industry, or is this something I should move through quickly?

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

typedef ing STL wstring

Why is it when i do the following i get errors when relating to with wchar_t? namespace Foo { typedef std::wstring String; } Now i declare all my strings as Foo::String through out the program, ...

C# Marshal / Pinvoke CBitmap?

I cannot figure out how to marshal a C++ CBitmap to a C# Bitmap or Image class. My import looks like this: [DllImport(@"test.dll", CharSet = CharSet.Unicode)] public static extern IntPtr ...

Window iconification status via Xlib

Is it possible to check with the means of pure X11/Xlib only whether the given window is iconified/minimized, and, if it is, how?

热门标签