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

📄 win32mainwnd.cpp

📁 windows mobile上很好用的音频播放器希望大家会喜欢
💻 CPP
字号:
#include "GSPlayer2.h"
#include "Win32MainWnd.h"
#include "Win32Options.h"

CWin32MainWnd::CWin32MainWnd()
{
}

CWin32MainWnd::~CWin32MainWnd()
{
}

COptions* CWin32MainWnd::GetOptionsClass()
{
	return new CWin32Options();
}

void CWin32MainWnd::OnCreate(HWND hWnd)
{
	CMainWnd::OnCreate(hWnd);

	// 摟柧壔偡傞
	SetWindowLong(m_hWnd, GWL_EXSTYLE, GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
	BOOL (WINAPI *pSetLayeredWindowAttributes)(HWND, COLORREF, BYTE bAlpha, DWORD);
	pSetLayeredWindowAttributes = NULL;
	HINSTANCE hInstDll = (HINSTANCE)LoadLibrary(_T("user32.dll"));
	if (hInstDll) {
		(FARPROC&)pSetLayeredWindowAttributes = GetProcAddress(hInstDll, "SetLayeredWindowAttributes");
		if (pSetLayeredWindowAttributes)
			pSetLayeredWindowAttributes(m_hWnd, 0, ((CWin32Options*)m_pOptions)->m_nWndAlpha, LWA_ALPHA);
		FreeLibrary(hInstDll);
	}
}

void CWin32MainWnd::OnToolOption()
{
	CMainWnd::OnToolOption();

	// 摟柧壔偡傞
	BOOL (WINAPI *pSetLayeredWindowAttributes)(HWND, COLORREF, BYTE bAlpha, DWORD);
	pSetLayeredWindowAttributes = NULL;
	HINSTANCE hInstDll = (HINSTANCE)LoadLibrary(_T("user32.dll"));
	if (hInstDll) {
		(FARPROC&)pSetLayeredWindowAttributes = GetProcAddress(hInstDll, "SetLayeredWindowAttributes");
		if (pSetLayeredWindowAttributes)
			pSetLayeredWindowAttributes(m_hWnd, 0, ((CWin32Options*)m_pOptions)->m_nWndAlpha, LWA_ALPHA);
		FreeLibrary(hInstDll);
	}
}

⌨️ 快捷键说明

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