|
Hey,
I'm thinking about creating a little "game" that will produce a little character on your monitor, the character will walk around and do random little things, and interact with the cursor, and (hopefully) other windows. I'd like to make this character appear to be IN the computer, not an application or game. I'd like all other windows to be seen, and icons to be clickable, etc. For example:
I load up my game, and then decide to open winamp. Without having to minimize anything, or move any windows, I can just double click the winamp icon on my desktop. My character (still visible the whole time) keeps walking around or dancing, or whatever he wants to do the whole time.
I hope I've explained myself well enough.
Thanks in advance!
-Brian
-untwisted
www.uber-ware.com
brian@uber-ware.com
|
|
|
|
|
|
If I create a web service in C#, is it possible to consume it in normal C++ ? Is it going to be a nightmare ? I'm trying to decide on a home project and thinking of an app to use sourcesafe remotely, web service one end, C++ app the other ( so that the .NET framework is not needed remotely ).
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. - Nemanja Trifunovic
|
|
|
|
|
Christian Graus wrote:
If I create a web service in C#, is it possible to consume it in normal C++ ?
If by "normal C++" you mean VC 7.x, then yes. You need to use ATL Server like in this example.
Christian Graus wrote:
Is it going to be a nightmare ?
For development, no. For deployment - it requires MSXML which is a drag.
|
|
|
|
|
Cool - thank you. MSXML is a lot smaller than the .NET framework, and included in IE 5.5 ( from memory ), so that's still a lot easier in terms of deployment IMO. So that suits me just great.
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. - Nemanja Trifunovic
|
|
|
|
|
Not sure if this the answer you're looking for, but if the web service accepts HTTP GET requests, like CP's service, then you can call IXMLDOMDocument::load() and pass it the URL to the service, and let the XML parser do the rest. Check out my CP screen saver, which uses this method.
BTW MSXML comes with IE 5+, and is available as a redistributable for those poor people stuck on IE 4.
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
This example seems to write both server and client in ATL, is it possible to write the server in C#, or does that complicate things ?
Christian
NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma
Anonymous wrote:
OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window.
I think you are a good candidate for Visual Basic. - Nemanja Trifunovic
|
|
|
|
|
Christian Graus wrote:
is it possible to write the server in C#, or does that complicate things ?
Yes. In fact you can write the server in any programming language, as long as you have a valid SOAP library.
However, I've tried only the opposite combination: ATL server and C# client. It worked just fine, and I assume (but cannot guarantee) that your case will be fine too.
|
|
|
|
|
The web service will return an xml which you can "consume" in normal c++.
Jason Henderson My articles
"The best argument against democracy is a five-minute conversation with the average voter." - Winston Churchill
|
|
|
|
|
which function can capture mouse and cursor events of system?
is it possible to capture their shapes (i.e. Arrow or user icon of mouse, cursor shape in different edit)?
thx
includeh10
|
|
|
|
|
It sounds like you are needing a system-wide hook. See if SetWindowsHookEx() works.
|
|
|
|
|
Forgive me if I am using the wrong terminology.
By system tool bar I mean the bar that defaults to the top of each application. The bar that host the minimize, maximize and close buttons.
Two questions.
(1) what is this area of the screen correctly called? Is it the frame?
(2) Can you point me towards an article that would show me how to add a button to this bar?
thanks
|
|
|
|
|
McGahanFL wrote:
Can you point me towards an article that would show me how to add a button to this bar?
There actually is one here on CodeProject about that!
I don't remember where because it was like hell to find it when I was searching for it!
Happy searching! (if not somebody post the link)
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
Hi,
I have a DlgApp that launch other applications. When the user click on a button, a popup menu is created with some data that I have collected in my database. The user then need to select an item into the menu. The selected info is used as parameters to launch the other app.
This is my click button handler:
void CmyDlg::OnBnClickedBtnDbmanager()
{
CMenu myMenu;
CRect rect;
m_wndDBBtn.GetWindowRect(&rect);
monMenu.CreatePopupMenu();
monMenu.AppendMenu(MF_STRING, 0, "Name1");
monMenu.AppendMenu(MF_STRING, 0, "Name2");
monMenu.AppendMenu(MF_STRING, 0, "Name3");
monMenu.AppendMenu(MF_STRING, 0, "Name4");
myMenu.TrackPopupMenu(TPM_LEFTALIGN|TPM_LEFTBUTTON, rect.left+20, rect.top+20, AfxGetMainWnd());
}
I would like to know how I can get the index of the menu. For example, if I select name4 into the menu, I would like something to tell me that the fourth item is selected... After that, I can use GetMenuString() to retrieve my data and launch my other App.
As you can see, unstead of ID as second parameter into AppendMenu() I have 0. The reason of this is that I dont know how many info I will have to put into my menu, so i can't provide ID for each of them.
Any Ideas?
Everything's beautiful if you look at it long enough...
|
|
|
|
|
a) Specify the index as second parameter in AppendMenu
b) use TrackPopupmenuEx, and specify TPM_RETURNCMD in the flags.
The return value will contain the value passed as second parameter to AppendMenu
c) NEVER EVER use an User Interface String (such as the one displayed in the menu) directly for further processing. Don't do that. Never. it is not done.
"Der Geist des Kriegers ist erwacht / Ich hab die Macht" StS
sighist | Agile Programming | doxygen
|
|
|
|
|
MemLeak wrote:
I would like to know how I can get the index of the menu.
Assign the menu items unique IDs starting with 1 and incrementing. Add the TPM_RETURNCMD flag to TrackPopupMenu() and it will return the ID of the item the user selected, or 0 if he cancelled the menu.
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
Anyone know of a problem with the old fprintf function? I have been using it for years now and all of a sudden during some testing it has started to crash inside the call.
|
|
|
|
|
iltallman wrote:
I have been using it for years now and all of a sudden during some testing it has started to crash inside the call.
Could you be trying to reference a memory location that no longer exists?
-Nick Parker
|
|
|
|
|
No. I looked in the debugger at all the data and attributes - it all looked good with appropriate NULL ending strings
|
|
|
|
|
well -- fprintf works fine for me when I don't do something boneheaded.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Santa Cruz Networks / VidiTel / Reality Fusion (pick a name -- may change at any moment)
|
|
|
|
|
I had a case once, where I did something like this.
<br />
char *str = GetSomeInputString();<br />
fprintf( F, str );<br />
worked pretty well, but would crash once in awhile when someone put a %s.
changed it to:
fprintf( F, "%s", str );
all is well.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Santa Cruz Networks / VidiTel / Reality Fusion (pick a name -- may change at any moment)
|
|
|
|
|
fprintf has always worked well for me. Except when I did something boneheaded like you point out.
Sometimes I have done things like
int i = 8675309;<br />
char *str = GetSomeString()<br />
fprintf(F, "%s", i, str);
|
|
|
|
|
Robert Little wrote:
int i = 8675309;
Reminds me of a song!!
|
|
|
|
|
I've done that too.
None of us are exempted from bonehead mistakes..... I've certainly had my share, and unfortunately they seem to be the most difficult to track down...
It's my guess that the writer of this question made some boneheaded mistake....
Have fun!
P.S. I don't really consider fprintf to be old....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Santa Cruz Networks / VidiTel / Reality Fusion (pick a name -- may change at any moment)
|
|
|
|
|
A common problem with formatting is that the parameters don't match the formatting string, and VC++ doesn't do a check to see if they match.
Elaine
The tigress is here
|
|
|
|