⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 register_ole.cpp

📁 图形软件,用QT编写的,可以用来学习软件的
💻 CPP
字号:
/**************************************************************************************************************************************************************                                                                           ****    equal III the graphic builder                                          ****                                                                           ****    Copyright (C) 2003 Oleksiy Pylypenko                                   ****                                                                           **** This file may be distributed and/or modified under the terms of the       **** GNU General Public License version 2 as published by the Free Software    **** Foundation and appearing in the file license included in the              **** packaging of this file.                                                   ****                                                                           **** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE   **** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ****                                                                           **** Contact earthman@inbox.ru if any conditions of this licensing are         **** not clear to you.                                                         ****                                                                           ****                                                                           ********************************************************************************* *****************************************************************************/#include <windows.h>#include <stdio.h>bool SetValue(HKEY key,char *name,char *value){	return RegSetValueA(key,name,REG_SZ,value,strlen(value))==ERROR_SUCCESS;}int RegisterOle(void){	char equal3path[MAX_PATH];	GetModuleFileNameA(0,equal3path,MAX_PATH);	SetValue(HKEY_CLASSES_ROOT,".eq3","Equal3.application");	char buf[MAX_PATH];	sprintf(buf,"%s",equal3path);	SetValue(HKEY_CLASSES_ROOT,"Equal3.application\\DefaultIcon",buf);	SetValue(HKEY_CLASSES_ROOT,".eq3\\DefaultIcon",buf);	sprintf(buf,"\"%s\" \"%%1\"",equal3path);	SetValue(HKEY_CLASSES_ROOT,"Equal3.application\\shell\\open\\command",buf);	SetValue(HKEY_CLASSES_ROOT,"Equal3.application\\shell\\edit\\command",buf);	return 0;}int RegisterOleVar = RegisterOle();

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -