📄 pfwindriverdialog.cpp
字号:
///////////////////////////////////////////////////////////////////////////////////////////////////// PowerFish///////////////////////////////////////////////////////////////////////////////////////////////////// copyright (c) Camilla Berglund (camilla@uds.se)// this source code is licensed under the GNU GPL// see http://www.gnu.org/copyleft/gpl.html for details///////////////////////////////////////////////////////////////////////////////////////////////////#define PFBASE_LAZY#include <PfBase.h>#include <windows.h>#include <PfWinDialog.h>#include "PfWinDriverDialog.h"#include "resource.h"///////////////////////////////////////////////////////////////////////////////////////////////////// PfWinDriverDialog constructors -----------------------------------------------------------------PfWinDriverDialog::PfWinDriverDialog(const char* szFolderName): PfWinDialog(IDD_DRIVER_DIALOG){ m_FolderName = szFolderName;}PfWinDriverDialog::~PfWinDriverDialog(void){}// PfWinDriverDialog event handlers ---------------------------------------------------------------bool PfWinDriverDialog::OnInitialize(void){ if (!PfWinDialog::OnInitialize()) return false; if (!PfSearchPathForFiles(m_FolderName, "*.drv", m_Files)) return false; unsigned int nDrivers = 0; for (PfFileItem* pFileItem = m_Files.GetFirstItem(); pFileItem; pFileItem = pFileItem->GetNext()) { PfObjPtr<PfModule> pModule = PfLoadNativeModule(pFileItem->m_Path); if (!pModule) continue; if (SendMessage(IDC_DRIVER_COMBODRIVERS, CB_ADDSTRING, 0, (LPARAM) (const char*) pModule->GetName()) != CB_ERR) nDrivers++; } if (!nDrivers) return false; SendMessage(IDC_DRIVER_COMBODRIVERS, CB_SETCURSEL, 0, 0); return true;}bool PfWinDriverDialog::OnOK(void){ int iIndex = SendMessage(IDC_DRIVER_COMBODRIVERS, CB_GETCURSEL, 0, 0); if (iIndex == CB_ERR) return false; PfFileInfo* pFileInfo = m_Files.GetItemAt(iIndex); if (!pFileInfo) return false; m_PathName = pFileInfo->m_Path; return PfWinDialog::OnOK();}bool PfWinDriverDialog::OnCancel(void){ return PfWinDialog::OnCancel();}///////////////////////////////////////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -