I am having problems creating a window inside a thread. The thread is launched with a funtion from the main application. the LaunchThread() is in a DLL, the DLL also has a function for registering the window using RegisterWindow(), the WndProc and the ThreadProc are also in the DLL.
The thread is created using CreateThread and the ThreadProc calls CreateWindow to create the window, this window will be a user interface for operations that do not interfere with the main application, the window will be launching other threads and such threads will using functions defined in the DLL.
The only connection in between the main application and the DLL is the LaunchThread() function.
//-- Sample code
//-------main application
HANDLE hThread = LaunchThread();
// DLL
HANDLE DLLEXPORT LaunchThread()
{
// Create the theard
}
VOID ThreadProc(LPVOID lParam)
{
// Create the window using CreateWindow
// Message loop in here
}
2006-06-13
17:16:58
·
1 answers
·
asked by
gravit9
2