| 12-11-2007, 01:21 AM | #1 |
could i possible have the source code for a c++ app that creates a blank windows XP window that responds to text/mouse input and is NOT a dialog window. I would like this to be solely native C++ none of that .net or mfc or anything like that. just plain win32. Thanks in advance. (this will help me develop a window management system for my apps) |
| 12-11-2007, 08:58 PM | #2 |
Ok, if it has not been realized, there is a way of creating a window that is going to take an entire thread due to the message loop. I have read that there is such a thing as the normal window which is not a dialog window. This means that it can still handle events but the instantiation process does not enslave that thread. Does anybody know how to manually create a blank window in win32 that will raise the events of mouse/keyboard input and execute the neccessary methods (of course, there being empty methods that respond). I basically want to write my own class where executing the following is viable: Code:
...
void main(int argc, char* argv[])
{
Window mywnd;
mywnd.SetHandler(OnMouse, mouse_handler) //mouse_handler is enum
mywnd.Create("testwnd"); //title is passed
mywnd.SetLocation(25, 60); //location is set (x, y)
mywnd.SetSize(752, 234); //size is set (xlength, ylength)
HDC hdc = mywnd.GetDC();
...now i can do drawing which goes to a bitmap that is drawn at update...
//release the HDC
mywnd.Draw();
...
mywnd.Destroy();
}
... |
