窗体右上角的关闭按钮失效

//#include "stdafx.h"
#define _WIN32_WINNT 0x0500
#include <Windows.h>
#include <stdio.h>
#include <windows.h>
extern "C" WINBASEAPI HWND WINAPI GetConsoleWindow ();



void main()
{
DeleteMenu(GetSystemMenu(GetConsoleWindow(), FALSE), SC_CLOSE, MF_BYCOMMAND);
DrawMenuBar(GetConsoleWindow());
printf("Now you cannot close this window...\n");
system("pause");
}

posted @ 2012-09-17 14:22  Elite_Y  阅读(519)  评论(0编辑  收藏  举报