Visual Studio中的代码块中是否有类似于编译器标志的模拟物? [英] Is there an analog to Compiler Flags from Code Blocks in Visual Studio?

查看:67
本文介绍了Visual Studio中的代码块中是否有类似于编译器标志的模拟物?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始创建键盘记录程序的课程,遇到的第一个功能是使控制台消失的东西:

I have just started a course on the creation of keylogger and the first function I encountered was something to make the console disappear:

#include <iostream>
#include <windows.h>

using namespace std;

int main() {
    MSG Msg;

    while (GetMessage(&Msg, NULL, 0, 0)) {
        TranslateMessage(&Msg);
        DispatchMessage(&Msg);
    }
}

讲师正在使用代码块,并说我们会需要在代码块的控制台标志菜单中添加控制台标志 -mwindows,但我在Visual Studio中找不到控制台标志或其他选项都没有成功。

The instructor is using Code Blocks and said that we will need to add a console flag "-mwindows" to the menu of console flags in Code Blocks, but I was not successful in finding neither the "console flag" nor an alternative option in Visual Studio.

推荐答案

我一直在研究更多内容,并在这里找到了答案

I have been digging around a little more, and found an answer here.

由于添加标志的目的是使该选项停止控制台的出现,因此该解决方案就足够了。

Since the purpose of the addition of the flag was to enable the option to stop the console from appearing, this solution is sufficient.

这篇关于Visual Studio中的代码块中是否有类似于编译器标志的模拟物?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆