user-0 提问: 如果才能隐藏控制台程序的右键菜单？

回复:
user: user-1
content: 引用 5 楼 u013491662 的回复:我写的代码目前有1087行 想改的话太麻烦！ 有没有什么方法可以禁用控制台程序的鼠标右键？ 2楼代码不行吗？

user: user-2
content: 引用 5 楼 u013491662 的回复:我写的代码目前有1087行 想改的话太麻烦！ 有没有什么方法可以禁用控制台程序的鼠标右键？    写到这个份上还不行,你短我吧,我帮你改!

user: user-0
content: 我写的代码目前有1087行 想改的话太麻烦！ 有没有什么方法可以禁用控制台程序的鼠标右键？

user: user-0
content: 感谢2楼和3楼的回复 可是我的程序是纯C语言的 如果才能隐藏纯C语言写的控制台程序的右键菜单？ 主函数是main  我用的编译器：VS2013

user: user-1
content: #pragma comment(lib,"user32") #pragma comment(lib,"gdi32") #include <windows.h> LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) {     PAINTSTRUCT ps;     HDC hdc;     HFONT hfont,ohfont;     RECT r;     COLORREF oc;      switch(message) {     case WM_CLOSE://按Alt+F4退出         PostQuitMessage(0);         break;     case WM_PAINT:         BeginPaint(hWnd, &ps);         hdc = ps.hdc; // the device context to draw in         GetClientRect(hWnd, &r); // Obtain the window's client rectangle         hfont = CreateFont(240, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "华文楷体");         ohfont=(HFONT)SelectObject(hdc,hfont);         oc=SetTextColor(hdc,0x00C080FF);         SetBkMode(hdc, TRANSPARENT);         TextOut(hdc,r.left+r.right/2-720, r.top+r.bottom/2-120,"最短画图程序",12);         SelectObject(hdc,ohfont);         SetTextColor(hdc,oc);         DeleteObject(hfont);         EndPaint(hWnd, &ps);         break;     default:         return DefWindowProc(hWnd, message, wParam, lParam);     }     return 0; } int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {     MSG msg             = {0};     WNDCLASS wc         = {0};     HBRUSH hbrh;     hbrh=CreateSolidBrush(0x00000000);     wc.lpfnWndProc      = WndProc;     wc.hInstance        = hInstance;     wc.hbrBackground    = hbrh;     wc.lpszClassName    = "minwindowsapp";     wc.hCursor          = LoadCursor(NULL,IDC_ARROW);     if( FAILED(RegisterClass(&wc)) ) return 1;      if(FAILED(CreateWindow(wc.lpszClassName,                         "Minimal Windows Application",                         WS_POPUP|WS_VISIBLE,                         0,                         0,                         GetSystemMetrics(SM_CXSCREEN),                         GetSystemMetrics(SM_CYSCREEN),                         0,                         0,                         hInstance,                         NULL)))         return 2;      while( GetMessage( &msg, NULL, 0, 0 ) > 0 ) {         DispatchMessage( &msg );     }     DeleteObject(hbrh);     return 0; }

user: user-2
content: vs2010测试通过   #include <Windows.h>  //BOOL ReadConsoleInput(   //  HANDLE hConsoleInput, //输入句柄   //  PINPUT_RECORD lpBuffer, //指向INPUT_RECORD结构体(数组)的指针   //  DWORD nLength, //上面那个结构体的大小   //  LPDWORD lpNumberOfEventsRead //实际读入输入内容的个数   //); VOID MouseEventProc(MOUSE_EVENT_RECORD mer) {     switch(mer.dwEventFlags)     {         case 0:              if(mer.dwButtonState == FROM_LEFT_1ST_BUTTON_PRESSED)             {                 printf("left button press \n");             }             else if(mer.dwButtonState == RIGHTMOST_BUTTON_PRESSED)             {                 printf("right button press \n");             }             break;     } }  int _tmain(int argc, _TCHAR* argv[]) { 	HANDLE _hIn = GetStdHandle(STD_INPUT_HANDLE);   	HANDLE _hOut = GetStdHandle(STD_OUTPUT_HANDLE);  	INPUT_RECORD _InRec[255]; 	DWORD _NumRead;  	BOOL bRet = true;  	while(true) 	{ 		bRet = ReadConsoleInput(_hIn,_InRec,1,&_NumRead); 		if(!bRet) 		{ 			break; 		}  		for(unsigned int i = 0; i < _NumRead; i ++) 		{ 			switch(_InRec[i].EventType) 			{ 			case MOUSE_EVENT: 				MouseEventProc(_InRec[i].Event.MouseEvent); 				break; 			} 		} 	} 	return 0; }

user: user-3
content: 你这是用什么写的？纯c++和winAPI吗？