//设置窗口置顶
LPWSTR* szArgList = NULL;
int nArgs = 0;
szArgList = CommandLineToArgvW(GetCommandLineW(), &nArgs);
if (nArgs > 1)
{
for (int i = 0; i < nArgs; i++)
{
CString arg = szArgList[i];
}
}
::SetWindowPos(this->GetSafeHwnd(),HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
this->CenterWindow();
//添加定时器
SetTimer(1, 5000, NULL);MFC 如何获取命令行参数
最新推荐文章于 2022-10-28 16:00:27 发布
本文介绍了一段实现窗口置顶功能的代码,并展示了如何为窗口添加定时器。通过解析命令行参数来处理额外的功能需求。

430

被折叠的 条评论
为什么被折叠?



