Курсовая работа: Розвиток сучасних структур програмного забезпечення
szRecvBuff[ret] = '\0';
if(strcmp(szRecvBuff,"monitorpoweroff")==0)
PostMessage(HWND_BROADCAST,WM_SYSCOMMAND,SC_MONITORPOWER,2l);
if(strcmp(szRecvBuff,"monitorpoweron")==0)
PostMessage(HWND_BROADCAST,WM_SYSCOMMAND,SC_MONITORPOWER,-1);
if(strcmp(szRecvBuff,"lockworkstation")==0)
LockWorkStation();
if(strcmp(szRecvBuff,"logoff")==0)
WindowsExit(EWX_LOGOFF | EWX_FORCE);
if(strcmp(szRecvBuff,"reboot")==0)
WindowsExit(EWX_REBOOT | EWX_FORCE);
if(strcmp(szRecvBuff,"poweroff")==0)
WindowsExit(EWX_POWEROFF | EWX_FORCE);
if(strcmp(szRecvBuff,"minimizewindow")==0)
CloseWindow(GetForegroundWindow());
if(strcmp(szRecvBuff,"hidewindow")==0)
ShowWindow(GetForegroundWindow(),SW_HIDE);
if(strcmp(szRecvBuff,"lockwindow")==0)
EnableWindow(GetForegroundWindow(),FALSE);
if(strcmp(szRecvBuff,"opencdrom")==0)
OpenCDROM();
if(strcmp(szRecvBuff,"closecdrom")==0)
CloseCDROM();
if(strcmp(szRecvBuff,"swaplefttoright")==0)
SwapMouseButton(TRUE);
if(strcmp(szRecvBuff,"swaptonormal")==0)
SwapMouseButton(FALSE);
if(strcmp(szRecvBuff,"messagebox")==0)
MessageBox(NULL,"Не чекали, а я тут є =)","Привіт!",MB_OK);