I'm Tired of NVIDIA Shadowplay—Here's What I Use For Clips Instead
NVIDIA Shadowplay may seem like the only application available for clipping gameplay, but there is a better solution.
NVIDIA Shadowplay may seem like the only application available for clipping gameplay, but there is a better solution.
Have you ever wondered what it would be like to switch back to light mode after several years in dark mode? I've been curious about this, and decided to go back to the light for a week—before promptly returning to the dark.
今日接到一个需求:要求我们的一个MFC窗口程序同时兼容命令行模式,也就是用命令行启动并传一个以上参数时,以命令行方式运行,并在命令行上打印运行结果。
visual studio的工程向导创建工程时就对命令行输出进行了规划:如果选择Console程序,工程的编译选项将会出现“/SUBSYSTEM:CONSOLE”,这样工程编译运行之后,stdin,stdout和stderr都指向窗口。但如果选择的是Windows工程,那么编译选项会变成“/SUBSYSTEM:WINDOWS”,就无法向窗口输出了。
解决方法是重定向输出
void EnablePrintfAtMFC() { if (AttachConsole(ATTACH_PARENT_PROCESS)) { FILE* pCout; freopen_s(&pCout, "CONOUT$", "w", stdout); std::cout.clear(); std::wcout.clear(); } }
这样,只要在输出到窗口前调用上面的EnablePrintfAtMFC();就能将字符串输出到窗口了。
注意两行clear不能省略,我第一次找到这个方法就是因为没clear而造成不能正常显示。
EnablePrintfAtMFC(); printf("Hello world!\n"); std::cout << "It works!" << endl;
但是,在我们的日文命令行下想输出日文还要注意一个转码的问题。
再封装一次就好。
void MyPrint(CString strOutput) { int nSjislen = WideCharToMultiByte(932, 0, strOutput.GetBuffer(0), -1, nullptr, 0, nullptr, nullptr); if (nSjislen >0) { CStringA strPrintA; char* pstr = strPrintA.GetBuffer(nSjislen); WideCharToMultiByte(932, 0, strOutput.GetBuffer(0), -1, pstr, nSjislen, nullptr, nullptr); printf(pstr); strPrintA.ReleaseBuffer(); } strOutput.ReleaseBuffer(); }
中文比日文稍微麻烦一点,有几种码,懒得查了,找到或者用GetConsoleCP()取一下,替换掉932就行。
While most of us buy graphics cards for gaming, there are graphics cards for other purposes as well. NVIDIA has its Quadro range, and AMD's serious range is sold as the Radeon PRO series. Intel has been in the graphics business for two generations now, and the company is finally branching out that second gen into other non-gaming applications.
PCIe Gen 5 SSDs are still a luxury more than an actual necessity, but it's good to see that they're becoming more commonplace and, therefore, have started to go down in price compared to the first batch. Crucial just launched some of the best ones we've seen yet, in case you're hunting down options for your next gaming PC.
Microsoft just released ‘Edit’ as a new command-line text editor, which will soon be a built-in Windows application. It’s inspired by the MS-DOS Edit program from the 1990s, and it’s already open-source software.
I'm personally a fan of the Zephyrus G14, but if 14 inches is a tad too small for you, the Zephyrus G16 line might be a better pick for you. Just like the Zephyrus G14 got a refresh, the G16 did too, and it's looking amazing.
Razer has announced its newest product in the Razer Blade Line. The Razer Blade 14 is a 14-inch gaming laptop is the slimmest laptop Razer has ever made.
Windows 11 has many frustrating and intrusive default settings, but the good news is that you don't need to put up with them. While I can't fit them into one guide, I can at least point you in the right direction. Change these right away to avoid the annoyances.
You know that feeling when you want to drop an emoji or GIF into a conversation, but you can't quite remember the keyboard shortcut? Microsoft hears that pain, which is why there’s a subtle but significant change brewing that should make it that much easier.
Right now, you can buy two years of Proton VPN’s premium plan for $81.36 on the official website. This comes out to $3.39 per month, and if you don't want to commit for that long, the 1-year plan is also on sale.
The ESR MagMouse has a magnetic dock so it can connect to the lid of a laptop (or under a desk) and is easier to carry around. That’s one clever feature, but it also has a built-in charging cable, is lightweight, and costs under $40. It isn't perfect, but overall it’s a great mouse.
Microsoft's Surface lineup has suffered another setback with the quiet discontinuation of the Surface Laptop Studio 2. While Microsoft has not officially declared the device dead, the company has told resellers that production has stopped.
You’ll soon be able to say “Hey, Copilot” to activate the Copilot chatbot on Windows computers. It’s another way Copilot is slowly replicating the Cortana virtual assistant from the early days of Windows 10.
Now is the time to get a dependable portable SSD with fast speeds. The SK hynix Beetle X31 1TB portable solid-state drive is back at its lowest price ever on Amazon, selling for $64.99. This is a big discount from its original price of $88.90 and follows a similar price drop that happened briefly last month.
Anyone looking for a high-quality display will be happy to hear about the current deal on LG’s 27-inch UltraGear OLED gaming monitor. The monitor is currently being offered for its lowest price ever at $799.99 on Amazon. This is a $200 drop from its regular $999.99 price.
Microsoft has changed its earlier decision about supporting Microsoft 365 apps on Windows 10. Originally, security updates for apps like Outlook, Teams, OneDrive, Word, and Excel were supposed to stop on October 14, 2025. Now, these updates will continue on Windows 10 for a few more years.
Building a new PC was once a moment of triumph. Now, it’s just the beginning, as you have to install apps, download large games, and tweak dozens of settings before it's fully set up. Let's take a look at how we got here and how things used to be.
Logitech's MX Master series of mice has become a common sight in YouTube videos or photographs of tech-savvy people's desk setups, but what makes this now-iconic mouse so special?