- 博客(15)
- 资源 (19)
- 收藏
- 关注
原创 vc++ 写xml
#include "stdafx.h"#include #import named_guidsusing namespace std;using namespace MSXML;int _tmain(int argc, _TCHAR* argv[]){ ::OleInitialize(NULL); MSXML::IXMLDOMDocumentPtr pDoc; //xml文档
2012-03-06 16:08:34
1043
翻译 阻止IE弹出“在此页上的 ActiveX 控件和本页上的其他部份的交互可能不安全。你想允许这种交互吗?”对话框
//在包含DllRegisterServer和DllUnregisterServer函数的cpp文件中加入以下代码//加入一个新的头文件#include //以下GUID为为当前使用的组件的GUIDconst GUID CDECL CLSID_SafeItem ={ 0x6a3227ec, 0x9371, 0x4294, { 0x82, 0xee, 0x29, 0x9d, 0xd, 0x
2011-12-12 16:03:05
15160
原创 vc 系统托盘类
#pragma once// CSystemTray.h 头文件class CSystemTray : public CWnd{ DECLARE_DYNAMIC(CSystemTray)public: CSystemTray(); virtual ~CSystemTray();protected: DECLARE_MESSAGE_MAP()private: NOTIF
2011-12-08 18:53:38
4603
1
原创 根据进程名获取窗体名
#include #include #include #include using namespace std;DWORD GetProcessList( );BOOL CALLBACK EnumWindowsProc(HWND hWnd, LPARAM lParam){ DWORD proID = (DWORD)lParam; char buf[500] = {0
2011-11-29 09:04:15
1287
原创 dll中多线程使用回调函数
//dll头文件#include #include #include #define MYLIBAPI extern "C" __declspec(dllexport);typedef int (WINAPI *PFCALLBACK)(); MYLIBAPI voi
2011-10-19 11:46:02
4736
转载 个人标记
XP下获取右键系统菜单: http://explorer-popup-add-in.googlecode.com/svn-history/r4/trunk/ShellMenuDll/ShellContextMenu.cpphttp://explorer-popup-add-in.googlecode.com/svn-history/r4/trunk/ShellMenuDll/ShellCo
2011-09-23 15:12:13
842
原创 vc++获取char*中的数字,排序后输出
void MyOutPut(char *str){ char *temp = str; bool lastNum = false; int aggr[100] = {0}; int len = 0; int nIndex = 0; //获取所有的数字 while(
2011-09-20 11:19:01
793
原创 非hook获取桌面选中的图标
//获取系统桌面的句柄HWND hWndLV = ::GetTopWindow(::GetTopWindow(::FindWindow("ProgMan", NULL)));//保存桌面的进程IDDWORD dwProcessId; GetWindowThread
2011-09-01 10:15:00
1425
2
原创 DllMain函数的运用
#include #include #include #pragma comment(lib, "user32.lib")using namespace std;#pragma unmanagedHHOOK g_hKey = NULL;HINSTANCE h
2011-08-27 09:12:06
764
原创 c++ 获取系统服务
<br />#include "StdAfx.h"#include <windows.h>#include <iostream.h>void main(){ int menu = 0; while (cin >> menu) { if(menu == 1) { SC_HANDLE SCMan = OpenSCManager(NULL, NULL, SC_MANAGER_ALL_ACCESS); //打开系统服务控制器 if(SCMan == NULL)
2011-04-15 10:42:00
4992
原创 C++代码创建窗体
<br />#include <windows.h>HWND HMainwnd = NULL; //窗体句柄int run(); //消息循环函数bool InitWindowsApp(HINSTANCE instanceHandle, int show); //窗体初始化函数LRESULT CALLBACK WndProc(HWND wnd, UINT msg, WPARAM wp, LPARAM lp);//窗体处理回调函数//main函数int WINAPI WinMain(
2011-04-13 13:37:00
6621
1
原创 C 16进制去掉0x转换成字符串输出
<br />int main(){ long val = 0; long sum[20] = {0}; char buf[20] = {0}; int index = 0; scanf("%x", &val); while(val > 0) { sum[index] = val%16; val /= 16; index++; } int iCount = 0; while(index--) { if(sum[index] > 9)
2011-04-06 16:01:00
7040
原创 C++ 双向链表
// temp2.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include struct Node{ Node *m_last; //上一个节点 Node *m_next; //下一个节点 int m_data; //节点存储的值 void NodeAdd(Node **head, Node **end, int data); //添加一个节点 v
2011-04-06 09:25:00
458
原创 C++ 单向链表
#include "stdafx.h"struct Node{ Node *Next;//节点 int Data;//节点的值 Node* NodeAdd(Node *head, int data);//添加一个节点 Node* NodeErase(Node *head, int data);//删除指定值的节点 void display(Node *head);//顺序输出链表 void redisplay(Node *head);//倒序输出链表 Node* Node
2011-04-02 15:27:00
462
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人