写在App类的Initinstance()函数里 HANDLE hMutex = ::CreateMutex(NULL,FALSE,"Small Tool"); if (GetLastError() == ERROR_ALREADY_EXISTS) { MessageBoxA(0,"Running...","Error",0); return FALSE; } else { }