各位大侠是这么一回事。我的程序点击一菜单,执行一个功能,
在BEGIN_MESSAGE_MAP 中就有
ON_COMMAND(ID_OPERATION_GO, OnOperationGo)来执行OnOperationGo()。我需要实现命令行" MyTest.exe /go"
当知道有go参数时,它自动执行OnOperationGo() 函数.
请给俺指点迷津。
在BEGIN_MESSAGE_MAP 中就有
ON_COMMAND(ID_OPERATION_GO, OnOperationGo)来执行OnOperationGo()。我需要实现命令行" MyTest.exe /go"
当知道有go参数时,它自动执行OnOperationGo() 函数.
请给俺指点迷津。
The GetCommandLine function returns a pointer to the command-line string for the current process. LPTSTR GetCommandLine(VOID)
Parameters
This function has no parameters. Return Values
The return value is a pointer to the command-line string for the current process.
我试了几个,执行出错。估计是view、document、windows等对象都还未初始化完。
我猜想是发一个消息,但不知道菜单被点击后,是发什么样的消息。