Click to See Complete Forum and Search --> : Create a dummy form?
Spasm
March 9th, 2008, 10:56 PM
What is the simplest way to create a form? I want to use asynchronous sockets, which requires me to have a form for a message handler. My program is not going to have a GUI, and I just want to make a form that the user can't see so I can get those messages. Everything I find on google is a tutorial involving managed code, which I would prefer not to use.
wey97
March 12th, 2008, 11:04 AM
Technically, they're called Windows in WinAPI since you won't be using managed code (the .net framework refers to them as Forms)
Here's a good tutorial for creating windows in WinAPI.
http://winprog.org/tutorial/
Just don't make a call to ShowWindow and the Window won't be shown. Be sure to make a call to CloseWindow when you're program needs to exit or the form will stay open indefinitely.
Marc G
March 14th, 2008, 12:18 PM
You could create a message-only window, see http://msdn2.microsoft.com/en-us/library/ms632599(VS.85).aspx
wey97
March 14th, 2008, 12:22 PM
You could create a message-only window, see http://msdn2.microsoft.com/en-us/library/ms632599(VS.85).aspx (http://msdn2.microsoft.com/en-us/library/ms632599%28VS.85%29.aspx)
Interesting. I wasn't aware of the HWND_MESSAGE (#message_only) constant.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.