encapsulated result is a set of development templates (or models) for programmers ). Programmers use different templates for different applications and purposes. For example, SDI application templates, MDI application templates, rule DLL application templates, extended DLL application templates, and OLE/ActiveX application templates. These templates all adopt the document-centric idea, and each template contains a group of specific classes. The comp
1. How to change the window icon?
Send the wm_section message to the window.
Example:
Hicon = afxgetapp ()-> loadicon (idi_icon );
Assert (hicon );
Afxgetmainwnd ()-> sendmessage (wm_section, true, (lparam) hicon );
2. How to change the default window style?
Reload cwnd: precreatewindow and modify the createstruct structure to specify the window style and other creation information.
Example: Delete "Max" button and set original window's position andsize
Bool cmainframe: precreatewindow (createst
checking to minimize or maximize the size of the window.Pbm_gettext copies text from a control (such as a button or editor Control) to a memory buffer.Pbm_gettextlength is used to determine the number of characters in a control.The horizontal scroll bar of the pbm_hscrollclipboard clipboard is used.Pbm_iconerasebkgnd: a minimal window needs to be duplicated.The pbm_initdialog dialog box will be displayed soon.Pbm_initmenu a menu will be displayed soon.Pbm_initmenupopup a pop-up window will be d
When I create a data center charging system, I will encounter the following problem: the label, text, commandbutton, and other controls cannot be added to the parent form.
That is because only controls with align or invisible (such as timer) can be directly placed on the primary form of MDI. Because MDI is the container of other child forms. If a button can be placed, the button will be covered when the sub
Browser Integration Teaching-add macro support to browser programs
This tutorial provides a method to add macro support to a browser program. You will see how to add macro support to the MFC program. This article also discusses how to expand the chtmlview function in vc6, how to implement the MDI structure browser, and how to analyze the DHTML document structure.
Click here to download the code of this Article
This article consists of the following pa
frame, the Form_mousemove event is changed to Frame_mousem Ove, or both are written.
Background settings
When we design software, the realization of the function is of course the first, but the Man-machine interface must not be neglected. Sometimes we want to add a more beautiful background to it, and it's on the screen all the time. We can keep a form from being released, but that's not good. The MDI form provided by VB (Multiple document interfac
maximize the size of the window.Pbm_gettext copies text from a control (such as a button or editor Control) to a memory buffer.Pbm_gettextlength is used to determine the number of characters in a control.The horizontal scroll bar of the pbm_hscrollclipboard clipboard is used.Pbm_iconerasebkgnd: a minimal window needs to be duplicated.The pbm_initdialog dialog box will be displayed soon.Pbm_initmenu a menu will be displayed soon.Pbm_initmenupopup a pop-up window will be displayed soon.A key on t
box will be displayed soon.Initmenu a menu will be displayed soonInitmenupopup a pop-up window will be displayed soonA key on the keydown keyboard is pressedA key on the keyup keyboard is released.Mdiactive an MDI subwindow (form) is activatedMdicascade reassembles all forms in overlapping formsMdicreate creates a formMdidestroy removes a form from the MDI frameworkMdigetactive gets the handle of the activ
(CTestBView ));
11) multiple document templates can also be added to a single document. However, multiple document templates are generally developed using the MDI method, which is very similar to the preceding view obtaining method, please refer to the following four sources (11, 12, 13, and 14) for details:Http://sanjianxia.myrice.com/vc/vc45.htm)You can use CWinApp: GetFirstDocTemplatePostion to obtain the location of the first document template re
released. To hide a form and make it visible, use the hide method.
If the form is a multi-Document Interface (MDI) parent form, the formclosing event of all MDI child forms will be triggered before the formclosing event of the MDI parent form is triggered. Similarly, before the formclosed event of the MDI parent form
Directory
1. How to set a from boundary
2. How to create a transparent from
3. How to set the position of the form on the screen
4. How to Make the minimization and maximization buttons unavailable
5. How to Make a form disappear
6. How to Make the form non-rectangular.
7. How to Make a form at the top of the screen.
8. How to display a model and a non-model form
9. How to create an MDI form
10. How to hide your form from the task bar.
11. How to Cr
I haven't used MFC for a long time, so I forget the complicated process of creating windows, documents, and views of the MFC framework.Next we will track an mfc mdi application for further study or study.Use Appwizard to create an MDI application. The application I created is called mditest. In this way, MFC generates the following classes:Class Name FunctionCmditestapp is derived from the cwinapp applicati
1. How to change the window icon?
Send the wm_section message to the window.
Example:
Hicon = afxgetapp ()-> loadicon (idi_icon );
Assert (hicon );
Afxgetmainwnd ()-> sendmessage (wm_section, true, (lparam) hicon );
2. How to change the default window style?
Reload cwnd: precreatewindow and modify the createstruct structure to specify the window style and other creation information.
Example: Delete "Max" button and set original window's position andsize
Bool cmainframe: precreatewindow (createst
(createstruct CS)
{
CS. Style = ~ Ws_maxinizemox;
CS. x = cs. Y = 0;
CS. Cx = getsystemmetrics (sm_cxscreen/2 );
CS. Cy = getsystemmetrics (sm_cyscreen/2 );
Return cmdiframewnd: precreatewindow (CS );
}
11. How to center the window display?
Easy, call function cwnd: center windows
Example (1): center window (); // relative to it's parent
// Relative to screen
Example (2): center window (cwnd: getdesktopwindow ());
// Relative to application's mainwindow
Afxgetmainwnd ()-> center window ();
12
-> showexception ( exception );}Return 0;}
Visual c ++ 6.0 add bitmap in the MDI main frame windowLiu Tao yesky
I want to add a color bitmap to the MDI program to beautify the interface during the development project. I have also tried several methods, but there are some minor problems, I have finally successfully implemented this function. I will introduce my implementation methods to you.
First, it is cl
run.Anchor is the anchoring meaning that sets the control's distance relative to the edge of a form (some) to remain unchanged,This allows the control to be resized dynamically as the form changes, and each control in the WinForms has that property."MDI Form"Several notable features of MDI" When you start an MDI application, the parent form is displayed first" p
Https://en.wikipedia.org/wiki/Single_document_interfaceHttps://msdn.microsoft.com/en-us/library/b2kye6c4.aspxSDI applications allow only one open document frame window at a time.It's made up to one or more independent windows, which appears separately on the Windows desktop.An example of this would is a simple text document (Notepad).MDI applications allow multiple document frame windows to is open in the same instance of a application.An
Form nesting
Experienced Visual Basic developers know the multi-Document Interface (MDI) ApplicationProgramIt can contain child forms, which are managed by the MDI parent form. But how do you implement nested forms without the MDI capability? For example, an MDI subform may also need to contain another form.
Som
In VB, the MDI (Multiple document interface, multi-window program) Form is defined: "The MDI form acts as a background window for a program that contains a form with the MDIChild property to True." In a VB program, there can be at most one MDI parent form and multiple MDI child forms, and the way to create an
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.