• 12
• 12
• 9
• 10
• 13

# Calling a DLL to create a window and running the msg loop in VB

This topic is 4402 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

OK, I create a DLL that creates a simple window, and now I am calling it in VB. It works, but I would like to do the msg loop runs in VB instead of in DLL... that is, how could I use the DLL just to create the window and put the following code in VB?
while( msg.message!=WM_QUIT )
{
if( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) )
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
}


In other words, what I want is: 1) Use VB 2) Create an window by calling a DLL 3) Run the msg/window loop in VB Thanks in advance [/source]