C Language Basic Grammar details of the folder deformation

Source: Internet
Author: User

First, let's take a look at these two graphs, as shown in Figure 1.

A second ago:

After one second:

What do you think? Folder into the Recycle Bin! Don't believe it? Double-click into the try, inside really is the Recycle Bin Oh. It's amazing! Read this article, you can not only change the folder for the Recycle Bin, you can turn it into a variety of strange things!

Let's first explain the rationale: In Windows Explorer, the properties of a folder are defined in Desktop.ini and Folder.htt, and under Windows 9X, we can build a Desktop.ini in a folder and enter the following code:

[. ShellClassInfo]

CLISD={645FF040-5081-101B-9F08-00AA002F954E}

The folder becomes a recycle Bin, but it is invalidated in Windows xp/2003. It doesn't matter, another way: we to the folder press F2, changed to "XXX." {645ff040-5081-101b-9f08-00aa002f954e} "(do not quote), also distorted it?! This actually changes the properties of the folder, the effect is the same. Through the data know, this is actually using Microsoft's Active Desktop technology. Let's take a look at how to implement it programmatically.

System environment: Windows Server 2003 Enterprice eidtion

Development tools: VC + + 6.0

This procedure is written with the SDK, this article is also for the dishes like me to see, now a lot of learning to program the dishes are like to use the RAD tools such as VB or a boring into MFC, so that the N-year has not known what is the Windows message loop, The most common API function calls, such as sendmessage,findwindows, are "tricks." I do not despise the meaning, is not to say that the call on everyone after this programming, after all, with the SDK development is too slow, I just think to be in the Windows programming to get a great progress, learning Win32 SDK programming should not be omitted, if only click to handle events, Without knowing what the IDE is doing, it will hinder your progress!

The following is a brief description of the program flow:

WinMain function, the entry of the program:

int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE ,hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
{
if (-1 == DialogBox(hInstance, MAKEINTRESOURCE(IDD_MAIN), NULL, Main_Proc))
{
MessageBox(NULL, "加载对话框出错!" , "", MB_OK);
// MessageBox函数,弹出一个预定义消息框,第一个参数是窗体句柄,第2个参数是消息正文,第三个参数是标题,最后是消息框类型,这里是指有一个确定按钮的消息框.
}
return 0;
}

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.