问题
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);
}
}
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.
回答1:
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.
来源:https://stackoverflow.com/questions/62368356/is-there-an-analog-to-compiler-flags-from-code-blocks-in-visual-studio