Screen Mate Toy: how would I go about this?
Hello Everyone!
I want to make a ''screen mate'' toy, not unlike that esheep thing, or the felix the cat thingy.
Before I start, can you answer a few different questions?
Will GDI be good enough or will I have to use Direct X? Will using GDI flicker a great deal?
How do I create a window without borders?
Is this project really ambitious? I mean, at the moment I envisage just having a character move around an animate, and hopefully interact with other windows, falling on them etc.
One last question, will it be possible to interact with icons?
I want to make icons shake, I was planning on creating other windows over the top of them, with their image blitted into the window, then boving that image... is this easyily done in terms of interregoating windows and finding out where icons are on the desktop?
Sorry for so many questions here, but I am a complete beginner.
graeme@todayguide.com
quote: Original post by graeme
Will GDI be good enough or will I have to use Direct X? Will using GDI flicker a great deal?
Depends on how much animation you''ll have and your frame rate. If you''re looking at <25 fps, GDI will be fine.
quote: How do I create a window without borders?
Use CreateWindowEx. One of either the dwExStyle or dwStyle flags is a _NOBORDER.
quote: Is this project really ambitious?
Yes and no. If you''re not a novice, not too ambitious. If you are a complete newbie (which I doubt from the level of your discourse), yes.
quote: One last question, will it be possible to interact with icons?
I want to make icons shake, I was planning on creating other windows over the top of them, with their image blitted into the window, then boving that image... is this easyily done in terms of interregoating windows and finding out where icons are on the desktop?
You can grab part of a window''s image and manipulate it as you see fit. You could also query the desktop to find out what items are on it and then look their files up in the registry... The first option''s probably easier, though.
[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!
Screen mate applications normally use the REGION or CRgn (MFC Class) to create transparent regions. Check out this site for an example screen mate application.
http://www.codeproject.com/dialog/screenmate.asp
If not, my email id is arunvb@yahoo.com. Send me your email id and I will send you my source code of a small screen mate app I wrote as an exercise after I attended the screenmate lecture in XGDC 2001.
Arun
http://www.codeproject.com/dialog/screenmate.asp
If not, my email id is arunvb@yahoo.com. Send me your email id and I will send you my source code of a small screen mate app I wrote as an exercise after I attended the screenmate lecture in XGDC 2001.
Arun
This is really helpful, thanks both of you!
Olusayi, you mentioned the flag _NOBORDER that can be set when making the window with CreateWindowEx, neither WS_EX_NOBORDER nor WS_NOBORDER worked. I had a look on MSDN at the flags for create window and the extended version but couldn''t find it anywhere!
Olusayi, you mentioned the flag _NOBORDER that can be set when making the window with CreateWindowEx, neither WS_EX_NOBORDER nor WS_NOBORDER worked. I had a look on MSDN at the flags for create window and the extended version but couldn''t find it anywhere!
Yippeee!
After another bottle of wine and much internet searching I got it, it''s WS_POPUP I needed!
Thanks again for your help ''though you too! I think that, as this is my first attempt at making anything with c++ I shall be posting more questions soon! At the moment though I am happy enough watching my borderless window scroll across the screen, blitting the background into itself invisably! I would wake up my girlfriend to allow her to share in my success, but since, on the one hand, there is no visible effect on screen, and on the other it is 4 am she wouldn''t be very impressed.
After another bottle of wine and much internet searching I got it, it''s WS_POPUP I needed!
Thanks again for your help ''though you too! I think that, as this is my first attempt at making anything with c++ I shall be posting more questions soon! At the moment though I am happy enough watching my borderless window scroll across the screen, blitting the background into itself invisably! I would wake up my girlfriend to allow her to share in my success, but since, on the one hand, there is no visible effect on screen, and on the other it is 4 am she wouldn''t be very impressed.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement