----赵大哥
为何要写这篇博客
纯WIN32API打造,自认为对底层的理解略有帮助,和大家分享成果和知识点。
已经实现功能有:打开、播放、关闭功能。
核心功能讲解:
1.WIN32打开文件对话框
BOOL OpenFileDlg(HWND hWnd, TCHAR* szFileSelect)
{
OPENFILENAME ofn;
ZeroMemory(&ofn, sizeof(OPENFILENAME));
//需要兼容UNICODE处理
ZeroMemory(szFileSelect, sizeof(TCHAR)*MAX_PATH_LEN);
ofn.Flags = OFN_EXPLORER;
ofn.hwndOwner = hWnd;
ofn.lpstrFile = szFileSelect;
ofn.lpstrFile[0] = '
{
OPENFILENAME ofn;
ZeroMemory(&ofn, sizeof(OPENFILENAME));
//需要兼容UNICODE处理
ZeroMemory(szFileSelect, sizeof(TCHAR)*MAX_PATH_LEN);
ofn.Flags = OFN_EXPLORER;
ofn.hwndOwner = hWnd;
ofn.lpstrFile = szFileSelect;
ofn.lpstrFile[0] = '