我要作一个单文档程序,文件一打开直接显示出一个界面,很像对话框,或者说就是一个对话框,不过是没有标题栏这些东西,任何时候都显示。想问的是,是不是控件只能放在对话框上面,在文档的编辑区没法放置?我要做到上面的要求,是不是只能作一个对话框,去掉标题部分,程序一运行就打开这个对话框?
解决方案 »
- 关于WM_ERASEBKGND的问题
- 请教C++读文件的问题:定义了ifstream in,in.open(full_name.c_str()); 当full_name中有中文时,为什么总是打开失败
- debug版exe运行出错
- 新开VC 技术群 高手坐阵 欢迎VC高手加入
- ◆◆◆CSDN:为什么将2005年7月前的帖子都删除了???!!!◆◆◆
- 一道关于刷新的问题
- 不用信号量机制能否实现生产这消费问题
- CFileDialog::GetPathName()可以得到完整的路径名,可是,我要得到非完整的如何搞?
- 都是快捷方式搞的鬼!
- 再不同类里读写内存中数据的问题?
- 菜鸟问题,高手帮忙
- 各位高手哥哥,高分急求:在vc环境下调用API功能函数实现打开和关闭任何文件夹的完整类
我不知道理解对你的意思没有
具体例子可以看vckbase里面的例子
CButton *p;
p = new CButton;
p->Create(...);
可以在指定的地方创建控件MSDN里的内容和例子CButton::Create
BOOL Create( LPCTSTR lpszCaption, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID );Return ValueNonzero if successful; otherwise 0.ParameterslpszCaptionSpecifies the button control’s text.dwStyleSpecifies the button control’s style. Apply any combination of button styles to the button.rectSpecifies the button control’s size and position. It can be either a CRect object or a RECT structure.pParentWndSpecifies the button control’s parent window, usually a CDialog. It must not be NULL.nIDSpecifies the button control’s ID.ResYou construct a CButton object in two steps. First call the constructor, then call Create, which creates the Windows button control and attaches it to the CButton object.If the WS_VISIBLE style is given, Windows sends the button control all the messages required to activate and show the button.Apply the following window styles to a button control: WS_CHILD Always
WS_VISIBLE Usually
WS_DISABLED Rarely
WS_GROUP To group controls
WS_TABSTOP To include the button in the tabbing order
ExampleCButton myButton1, myButton2, myButton3, myButton4;// Create a push button.
myButton1.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,
CRect(10,10,100,30), pParentWnd, 1);// Create a radio button.
myButton2.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_RADIOBUTTON,
CRect(10,40,100,70), pParentWnd, 2);// Create an auto 3-state button.
myButton3.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_AUTO3STATE,
CRect(10,70,100,100), pParentWnd, 3);// Create an auto check box.
myButton4.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,
CRect(10,100,100,130), pParentWnd, 4);
也可以从cformview继承
想放到那儿就放到那儿
具体怎么继承呢?麻烦说的详细些,谢谢!