pexplorer.cpp

来自「sybain下的手机编程源码,类似windows下的资源管理器」· C++ 代码 · 共 62 行

CPP
62
字号
// PExplorer.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "PExplorer.h"
#include "ui/zWinFrame.h"

#include "common/zRegister.h"

int WINAPI WinMain(	HINSTANCE hInstance,
					HINSTANCE hPrevInstance,
					LPTSTR    lpCmdLine,
					int       nCmdShow)
{
	zRegister reg;
	reg.Open(HKEY_CLASSES_ROOT,_T(""));
	reg.EnumKey();
	reg.Close();

	return 0;

	TCHAR	szTitle[] = _T("PExplorer");					
	TCHAR	szWindowClass[] = _T("zWinFrameClass");		

	//判断是否有正在运行的程序
	HWND hWnd = FindWindow(szWindowClass, szTitle);	
	if (hWnd) 
	{
		SetForegroundWindow((HWND)((ULONG) hWnd | 0x00000001));
		return 0;
	} 

//	SIPINFO si = {0};
//	si.cbSize = sizeof(si);
//	SHSipInfo(SPI_GETSIPINFO, 0, &si, 0);
		
	//Consider the menu at the bottom, please.
//	int iDelta = (si.fdwFlags & SIPF_ON) ? 0 : MENU_HEIGHT;
//	int cx = si.rcVisibleDesktop.right - si.rcVisibleDesktop.left;
//	int cy = si.rcVisibleDesktop.bottom - si.rcVisibleDesktop.top - iDelta;

	//建立新的窗口
	zWinFrame win;
		int screen_w = ::GetSystemMetrics(SM_CXSCREEN);
		int screen_h = ::GetSystemMetrics(SM_CYSCREEN);

		DWORD	dwExtStyle	= 0;
		DWORD	dwStyle		= WS_VISIBLE;//WS_POPUP | WS_VISIBLE | WS_BORDER ;//| WS_CAPTION | DS_CENTER | DS_3DLOOK;
		int		x	= 0;
		int		y	= 0;
		int		w	= screen_w;
		int		h	= screen_h;
		HWND	Parent		= ::GetActiveWindow();
		HMENU	hMenu		= NULL;
		HINSTANCE	hInst	= hInstance;//(HINSTANCE)::GetCurrentProcess();

	win.CreateEx(dwExtStyle,szWindowClass,szTitle,dwStyle,x,y,w,h,Parent,hMenu,hInst);
	win.ShowWindow(nCmdShow);
	win.UpdateWindow();
	return win.MessageLoop();
}

⌨️ 快捷键说明

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