Hello ,
I am really new with windows programming. I have a complete c++ coding about simple scanner. I decided to choose WinAPI to create simple application. I have created a button 'scan' and when clicked it will open new window that display 'scanning files..' and start scanning. But when I write like this, I have to close the window then the scan() function can run. How can I make the 2 function run at the same time? I have tried THREAD and FUTURE but it does not work. Can anyone suggest another idea
Code:
case WM_CREATE:
{
CreateWindow(TEXT("button"), TEXT("Scan"),
WS_VISIBLE | WS_CHILD ,
75, 100, 110, 25,
hwnd1,(HMENU) 1, NULL, NULL);
break;
}
case WM_COMMAND:
{
if (LOWORD(wParam1) == 1)
{
int WINAPI Win2();
int window2 = Win2();
int scan();
int scanner = scan();
}
break;
}