of field finds the corresponding server-side control. Next, the server looks at whether control implements the call to page raisepostbackevent, which is defined as follows:protected virtual void RaisePostBackEvent (IPostBackEventHandler sourcecontrol, String eventargument){ Sourcecontrol.raisepostbackevent (eventargument);}function to invoke the control within theprotected virtual void RaisePostBackEvent (String eventargument) Base. Validateevent (this. UniqueID, eventargument); I
() is the base camp of MFC message processing. All the messages in the MFC program start from here. After many path transformations, they go through the mountains and go straight to the Windows kernel, return to the MFC field, and find the final destination-message function address after many twists and turns. It can be said that there is no way to recover from problems.
The process of clicking an event with a button is as follows:CWinThread: PumpMessage-> CWnd: PretranslateMessage-> CWnd: audi
class of cwnd) can accept such messages.
The cwnd class can accept all messages, but the cve-target class can only accept the latter two messages.
Command message routing:Afxwndproc-> afxcallwandproc-> windowproc-> onwndmsg->. 1 onnotify (Notice cleared
Messages)-> on1_msg. 2 oncommand (command
Messages)
Tag menu-the one with check boxesImplementation Method:Add oncreate to corresponding functionGetmenu ()-> getsubmenu (0)-> checkmenuitem (ID _ key,
Class cmainpropertysheet: Public cproperty
{
};
Bool cmainpropertysheet: oncommand (wparam, lparam){// Todo: add your specialized code here and/or call the base class
If (loword (wparam) = idok){Int npageindex = getactiveindex ();If (0! = Npageindex){// Do somethingReturn true;}Else{Return false;}
}Return cpropertysheet: ncommand (wparam, lparam );}
Return false indicates automatic processing by the system.Return true is the response to us, an
:
BEGIN_MESSAGE_MAP(CCH_6_MENU1View, CView)//{{AFX_MSG_MAP(CCH_6_MENU1View)ON_COMMAND(IDM_TEST, OnTest)//}}AFX_MSG_MAP
3. added the message Response Function in the source file:
void CCH_6_MENU1View::OnTest() {// TODO: Add your command handler code hereMessageBox("View Test!");}
This is similar to the standard message response. However, the routing of command messages is a bit complicated:MFC replaces the window procedure function with the afxwndproc function, which calls the afxcallwndproc fu
I encountered this problem repeatedly and it was very difficult to query the information. I simply put it here for my friends to learn from.
Faq-it.org/apache/ ========================================================== ==========================================
Microsoft is so disgusting that it cannot easily add the right-click menu function item for formview or richeditctrl on dialog. After searching materials and using them, you need to use this method to achieve it:
Notes
1. The system c
window to the specified position
Showwindow (bool); display window to make it visible or invisible
Functions that implement the Message Processing Mechanism of MFC:
Virtual lresult windowproc (uint message, wparam, lparam); Window Process, virtual function
Virtual bool oncommand (wparam, lparam); process command messages
Message Processing functions:
Oncreate (lpcreatestruct); message processing function of the MFC window, called by the MFC framework
After submitting the page, keep the position of the scroll bar
You can add the maintainscrollpositiononpostback command to the page command.
2. When developing a web control, if the control must be placed in the form on the server side, you can use the page. verifyrenderinginserverform (Control) method to ensure it.
3. Use the resolveclienturl (string) method of the control class to convert The path like/ABC/AB. aspx is converted to the correct URL path, which is an internal method in. net1.0 a
each idc_mybutton:
# Define idc_mybutton (n) idc_mybutton0 + n
4. Generate a dialog box in the INI method of the window as follows:
N = 5; // custom quantity, which can be obtained by databases, configuration files, etc.Cbutton * p_mybut = new cbutton [N];Int I = 0;For (I = 0; I {Cstring SS;SS. Format ("I am the % d button", I + 1 );
P_mybut [I]. Create (SS, ws_child | ws_visible | bs_pushbutton ,/Crect (40,150 + I *, 50 + I * 40), this, idc_mybutton0 + I); // crect is responsible for the size
2012 All Rights Reserved
Hangzhou, China
I. Overview
The Java multi-server communication framework is a socket communication framework developed based on NiO. It enables communication between clients, servers, and servers. It is suitable for large chat servers and large game servers.This demoProgramA basic command line chat function is implemented to demonstrate the basic ability to send game commands or chat messages through socket.
Ii. Usage
1. RegistrationCommand Format: Reg user
66. the. You are working onAn instance started using the SPFILE. You want toMove the Flash Recovery area ofYourDatabase toA new location. You want the FlashbackLogFiles tobe storedinchThe new location. Given below is the steps toAccomplish the taskinchRandomOrder:1) Shut down the instance.2) Change the value ofThe Db_recovery_file_dest initialization parameter toa new value.3)ExecuteTheALTER DATABASEFLASHBACKOFFcommand.4) Start up the instance andMount theDatabase.5)ExecuteTheALTER DATABASEFLAS
Course: Http://www.jikexueyuan.com/course/715_3.html?ss=1Communicate between activity and service.The first use is to start the service to communicate. Note how to use intent to get EditText data and pass it to the service, and how the service is fetching the data.In the Mainactivity PrivateEditText Etdata; @Overrideprotected voidonCreate (Bundle savedinstancestate) {Super. OnCreate (savedinstancestate); Setcontentview (R.layout.activity_main); Etdata=(EditText) Findviewbyid (r.id.etdata)
HMENU Menu_list,menu_all; Point Point; HINSTANCE hinstance;The following code is placed under BOOL WINAPI dialogproc CaseWm_contextmenu:if(HWND) WParam = =GetDlgItem (Hwnd,idc_list_view)) {Menu_all=getsubmenu (Menu_list,0); GetCursorPos (point);//get the current coordinates of the mouse,TrackPopupMenu (Menu_all,tpm_leftbutton,point.x,point.y,0, Hwnd,null); } Break;//The following code is placed in the void OnCommand function
let our critical processes and a bunch of other processes squeeze together. ”。 The article mentions a tool under Linux, Taskset, which can set the CPU for a single process to run.At the same time, because of the recent data on Redis, Redis is a single-process model that, in order to take full advantage of multicore CPUs, often launches multiple instances on one server. To reduce the overhead of switching, it is necessary to specify the CPU on which each instance runs.The following describes the
the data and cache Directories)
Run this command to uninstall the installed APK, that is, remove the package of the current app from the device.-K means to keep the data domain cache directory.ADB bugreport-return all information from the deviceThat shoshould be added in a bug report.
You can use this command to output and display the debugging information (device information ).
ADB backup [-F -Write an archive of the device's data to If no-F option is supplied then the data is writtenTo "backu
();
} // Next page
If (this. Maid-1 ))
{
This. Maid + = 1;
This. datashow ();
} // The last page this. Maid-1 and then datashow ();
Custom Data paging-very important! (Improves performance efficiency)Each time this. datashow (); is used to extract all the data, which reduces the efficiency. The correct method is as follows: 1. Select "allow pagination", "allow custom pagination", and page size. 2. Add the navigation button to set the CommandName attribute, previous, next3, code: // record the
property and CommandName property of the button (OnCommand event CommandName property)Button executes the server event after the client event is executed------can add a bool return value to the client event, and if it returns false, the server side does not execute, and if true, the client executes.---------The DisplayMode property of the BulletedList control is set to LinkButton can be the onclick event---------The ValueChanged event of the HiddenFi
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.