As I'm noob, i want to ask all: How can I realise the treatment of a button, when in the application in that time works another function?
For example:
void Loop()
{
while (true);
}
static LRESULT CALLBACK MainDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
// checking the buttons
}
int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpszCmdLine, int nCmdShow)
{
Loop();
}
I want to check buttons state when Loop() executes:)
Please explaine me this moment.
Run the buttons checking routine in another thread.
To create and start a new thread look in the help for '_beginthread' function.
Quote from: frankie on May 04, 2007, 11:03:35 AM
Run the buttons checking routine in another thread.
To create and start a new thread look in the help for '_beginthread' function.
Thanks but which lib containes this macros/function? (I know the "process.h", but linker needs a lib-file:) )
Take a look in the PellesC help. It is part of C runtime. The help also give you reference for the win32 API native function.
Moreover you'll find how to create and run a new thread in my webserver code available in the user contribution section (http://www.smorgasbordet.com/forum/index.php?topic=726.0 (http://www.smorgasbordet.com/forum/index.php?topic=726.0))