#define BUTTON_01 1
case WM_CREATE:
{
/*Button01*/
/*Button01-End*/
}
break;
LPCWSTR button01_ID = L"BUTTON";
LPCWSTR button01_text = L"Verify";
HWND button01 = CreateWindowEx(NULL, button01_ID, button01_text, BS_DEFPUSHBUTTON | WS_VISIBLE | WS_BORDER | WS_CHILD, 100, 50, 70, 30, hwnd, (HMENU)BUTTON_01, NULL, NULL);
case WM_COMMAN
{
switch (wParam)
{
}
}
break;
case BUTTON_01:
break;
void checkIfComputerIsOpened()
{
LPCWSTR Computer = L"Computador";
HWND computer = FindWindow(NULL, Computer);
if (computer == NULL)
{
LPCWSTR ComputerError = L"Computer is not opened!";
LPCWSTR ComputerError_Caption = L"Error";
MessageBox(NULL, ComputerError, ComputerError_Caption, MB_OK | MB_ICONERROR);
}
else
{
LPCWSTR ComputerError = L"Computer is opened!";
LPCWSTR ComputerError_Caption = L"Congrats";
MessageBox(NULL, ComputerError, ComputerError_Caption, MB_OK | MB_ICONINFORMATION);
}
}
case BUTTON_01:
checkIfComputerIsOpened();
break;
#define BUTTON_01 1
case WM_CREATE:
{
/*Button01*/
/*Button01-End*/
}
break;
LPCWSTR button01_ID = L"BUTTON";
LPCWSTR button01_text = L"Verify";
HWND button01 = CreateWindowEx(NULL, button01_ID, button01_text, BS_DEFPUSHBUTTON | WS_VISIBLE | WS_BORDER | WS_CHILD, 100, 50, 70, 30, hwnd, (HMENU)BUTTON_01, NULL, NULL);
case WM_COMMAN
{
switch (wParam)
{
}
}
break;
case BUTTON_01:
break;
void checkIfComputerIsOpened()
{
LPCWSTR Computer = L"Computador";
HWND computer = FindWindow(NULL, Computer);
if (computer == NULL)
{
LPCWSTR ComputerError = L"Computer is not opened!";
LPCWSTR ComputerError_Caption = L"Error";
MessageBox(NULL, ComputerError, ComputerError_Caption, MB_OK | MB_ICONERROR);
}
else
{
LPCWSTR ComputerError = L"Computer is opened!";
LPCWSTR ComputerError_Caption = L"Congrats";
MessageBox(NULL, ComputerError, ComputerError_Caption, MB_OK | MB_ICONINFORMATION);
}
}
case BUTTON_01:
checkIfComputerIsOpened();
break;
Copyright © 2024, NextGenUpdate.
All Rights Reserved.