Previously wrote an article "VC + + using CImage in memory JPEG conversion BMP picture", through the CImage realized in memory JPEG to BMP.Since JPEG can be transferred to BMP, that CImage also supports BMP-to-JPEG, in contrast to the previous article, which relies on the CImage load function, BMP-to-JPEG is implemented by the Save function:The use of the IStream interface is also a function overload, specifically refer to msdn:http://msdn.microsoft.c
This paper mainly discusses the implementation of Chinese URL decoding, not detailed URL coding, UTF-8 encoding. To learn more about the codec problem, please refer to the relevant informationURL encoding: Hexadecimal of the ASCII code of the real character. Just a slight change, need to add "%" in front. For example "\", its ASCII code is 92,92 hexadecimal is 5c, so "\" URL encoding is%5c.UTF-8 encoding is a variable-length character encoding of Unicode, created by Ken Thompson in 1992. It is n
VC + + Adjust the size of the control based on the dialog box size1. Add the member variable CRect m_rect in the dialog class to save the size before the size of the dialog box changes;2. In the OnInitDialog () function of the dialog box, get the size of the dialog box when it was created: GetClientRect (m_rect);3. Add the following code to the Wm_size response function OnSize ():1:private:CRect M_rect;2:getclientrect (m_rect);3:void Cbuttondlg::modif
Original URL: http://shijuanfeng.blogbus.com/logs/100675115.htmlThe first method: Define a File class object to manipulateCFile Tempfile;Tempfile.remove (specify file name);The second method: Use the system function DeleteFile (LPCSTR filename) to delete the file _rmdir (), delete the directory deletedirectory (Stempdir); Delete directory removedirectory (stempdir);Eg:deletefile (char *tempfilename);Note: To empty the file but keep the directory: System ("Del C:\temp"); All files in C:\temp are
Deployment in Visual C + +1, recommended practice, the use of the corresponding Vcredist.exe. Vcredist.exe installs the run-time library under the System folder.But this method has a small problem, in some versions of Windows, if there is no patch kb2999226 installed,Vcredist.exe will fail to install.2. Redistributable merge module (. msm file). Have not been used.3, local deployment. The runtime DLLs that are about to be relied on are put together with the EXE. DLLs that need to be included:A,
This article mainly introduces the VC in the use of SendMessage custom message functions of the relevant information, the need for friends can refer to the
The basic structure of the SendMessage is as follows:
?
1 2 3 4 5 6
SendMessage (HWND hwnd,//Message delivery target window or thread handle.) UINT MSG,//message categories (This can be some system messages, also can be their own definition, described below,) WPARAM WPARAM,//Para
Reference article: http://www.codefans.net/articles/1863.shtml SOURCE Download: Http://pan.baidu.com/s/1sjt0jEH VC + + make floating mouse prompts, when the mouse cursor on a program control, to know the function of the control, the best way is to pop up a prompt box to display this information. This example is to show how to make a floating mouse hint. Compile and run this sample program as shown in. When the mouse cursor is placed on a control, a pr
VC game to solve the shortest path algorithm in the source code, this example is the auto path-finding demonstration, the basket point is the starting point, the red dot is the end, press the OK key to start. Source enthusiasts note: After compiling, please copy the exe file from the debug directory to the project root directory, if it will be wrong. authoring, Programming: Tong MingProgram Order:Initialize the queue, the pending node into the queue,
1, search to see if the system has Vshelp.dll files, not to the site to download a2, if the three-bit operating system directly to the downloaded files on the C:\Windows\System32if - bit operating system is placed on the C:\Windows\SysWOW643. Click Start Input:level Regsvr32 C:\Windows\System32\Vshelp.dll- Regsvr32 C:\Windows\sysWOW64\Vshelp.dll4, Congratulations, registration success! You can Press F1 to display the help document directly in vc+
Add Method. You can continue to add multiple methods ...
5, the implementation method (in fact, the component is only to make the declaration of methods, the customer calls to implement these methods). When implemented, select the component/class, press the right button, and select Implement Connection in the pop-up menu ....
will produce cproxy_xxxevent classes, which have the implementation of the fire function, are automatically generated.
6. Complete the other interface functions of the com
(dispparams, 0, sizeof dispparams);
Dispparams.cargs = ArraySize;
Dispparams.rgvarg = new Variant[dispparams.cargs]; for (int i = 0; i
When actually used, it is possible to first access (Navigate) a page. Then, in VC inside the page for some JS call, and retrieve the results. It is possible that this JS call function is not in this page. It is generally possible to call an eval (some JS statements) in the form of a function that is not in
We often encounter the need to build multiple threads so that we can execute multiple events at the same time. This is our VC development in a foundation, although I have used many times, but also will often forget. This time write down, as a note, for everyone to learn to provide convenience.In VC, nothing more than creating threads and writing thread functionsOne, the conventional method: pure use platfor
1. IntroductionAccess to Oracle databases under Windows can be accessed using ADO,ADO.NET,OLEDB,ODBC, Cross-platform Occi, which is the fastest, and Oracle-supplied OCCI is most complete for Oracle support.2. Install Occi SDKThe OCCI SDK is included with Oracle clients and can be found in the following locations: Header: C:\oracle\ora92\oci\include library file: C:\oracle\ora92\oci\lib\msvc recommended to install Oracle Instant Client (Instant Client), it also contains a OCCI SDK. Header file: I
This article mainly combines with MSDN on several official documents about WinSocket, creates a simple VC + + Socket Sample program, demonstrates a basic CS model. Reference links are as follows:
Msdn:windows Socket 2 Getting Started with WinSocket
Other Blog: VC network programming C + + Socket
First, c/s--client and server
In network programming, the most common is the C/S model, which has one (or more)
This article describes the VC + + implementation view content saved as a picture of the method. Share to everyone for your reference, specific as follows:
In a single document application, we often need to save content in view as a picture file in a variety of formats for printing. At first glance, may not know where to start, in fact, the main is to use the bitmap save method, such as:
HDC HMEMDC =:: CreateCompatibleDC (HDC);
Hbitmap hbmp =:
This article is an example of how VC determines whether a process has admin permission. Yes, returns True, otherwise false. Share to everyone for your reference. The implementation methods are as follows:
Copy Code code as follows:
Static BOOL isadmin (void)
{
HANDLE Haccesstoken;
BYTE infobuffer[1024];
Ptoken_groups ptggroups;
DWORD dwinfobuffersize;
Psid psidadministrators;
Sid_identifier_authority siantauthority = security_nt_au
This article describes the VC through the system snapshot to achieve process management methods, share for everyone to reference. The implementation methods are as follows:
First, the introduction
Each application instance will produce a process under the current system after running, and most applications will have a visual interface, and the user can close the program with the Close button on the title bar. But there are a number of programs runni
This article illustrates the difference between SendMessage and PostMessage in VC. Share to everyone for your reference. The specific analysis is as follows:
1, first of all, the difference between the meaning of the return value , we first look at the MSDN statement:
Copy Code code as follows:
LRESULT SendMessage (HWND hwnd,
UINT MSG,
WPARAM WPARAM,
LPARAM LPARAM);
Copy Code code as follows:
BOOL PostMessage (
This paper collects and summarizes the VC in the dialog box commonly used in some of the skills for VC development due to a certain reference value.
1. How to modify the background color of the dialog box:
In the OnPaint () function of the dialog box, add the following statement:
CRect rect;
GetClientRect (rect); Calculates the size of the dialog box
DC. Fillsolidrect (rect,rgb (192,248,202));
In VC + + program design, combobox control is more common form element control, and for beginners, master the various usages of ComboBox is particularly important, this article will summarize some practical ComboBox control usage, for everyone's reference.
Add/Remove combo box content:
1. It is generally added in the Data tab of the ComboBox control properties, one line representing a row in the ComboBox Drop-down list, and CTRL + ENTER for the newl
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.