|
Ganesh_T wrote: BOOL chk=InternetGetConnectedState(&flags, NULL);
This function doesnot gurrantee internet state
|
|
|
|
|
Greetings,
I'm new to VC++ and the MFC (been programming text based games in C for 10 years) and I've decided to give VC++ a shot. I have worked with some DirectX 8 and 9 over the last few months (modifying what someone else wrote and using MSDN to understand it all). Anyways, what I'm trying to do is create an application that will do a couple things:
1.) Copy the pixel/bitmap information of the center of the screen (let's say 50x50 pixels)
2.) Draw a black box in the center of the screen (multiple of the above [1.5-4x])
3.) Scale the stored pixel/bitmap information to match the size of the box.
4.) Draw the new bitmap in the box.
Also, I'm wondering if it is possible to make this an overlay to some fullscreen application (for example a 3D game). The purpose of this application is to offer a "zoom" function in Blizzard's World of Warcraft MMORPG game. I have managed to hook DirectX and then modifying the Field of View (which works wonderfully), but I have come across a problem. Due to the nature of my code (hooking Dx9), the game thinks I'm using some type of cheat. Blizzard froze my account and after explaining what I was doing (and sending them my code), they unbanned me and told me I'd have to come up with a different method that did not involve attaching to WoW's process. The person I spoke with said that my little project was such a good idea that he'd pass it on to the dev-team. This is all fine and good, but I am now very curious as to how I can go about this independently of the game. Besides, I'm sure the dev-team won't have this feature in the game for quite some time (if they even consider it needed).
I figure the best approach would be using GDI/GDI+ for this, unless it is possible to do in DirectX or OpenGL without hooking WoW's process. I just have no idea where to start looking for information. Most of my searching has turned up articles on the inefficiency of GetPixel() and how using other GDI functions is much more efficient. Or I come across some pre-built application with no source code to learn from . On another note, I'm wondering if my overlay will "flicker" due to the fact the game is rendering constantly (90-100 frames per second) and my application will just render as fast as it can loop (without hording the CPU). I know that some applications can place overlays on games without a problem (such as xFire) and I wonder how.
Any ideas, snippets, or places of intrest to look?
Thanx so much,
Rapture2k4
|
|
|
|
|
I am new to DirectX, and very cofused by your question.
As I know, capturing screen is very easy in DirectX, then StrechBlt() the image captured to larger area - this is all you need to do.
I hope I understand your question correctly.
by the way, do you know how to capture screen faster in DirectX? - I mean, by what functions or packge (DirectShow, DirectDraw etc.)? My current program is about capture screen, I need to capture full screen in 50 ms, but I can not do it, I can not capture so fast.
A nice hyper tool for optimizing your Microsoft html-help contents.
A best image tool for Windows C++ programmers, don't miss it!.
Includeh10
|
|
|
|
|
Well, I dunno which method you use, but I found this one (I haven't tested it yet):
http://www.codeproject.com/dialog/screencap.asp#And%20The%20DirectX%20way%20of%20doing%20it%20:
I'm sure it is faster then 50ms.
|
|
|
|
|
I had downloaded all software before here, but none of them was faster than 50 ms.
I will test the one you suggested - I can not remember if I downloaded it before.
cheers.
A nice hyper tool for optimizing your Microsoft html-help contents.
A best image tool for Windows C++ programmers, don't miss it!.
Includeh10
|
|
|
|
|
i need to develop a GUI to mimic a water level measurent application as well as reading of lpt port
|
|
|
|
|
Then???
We Believe in Excellence
www.aqueelmirza.cjb.net
|
|
|
|
|
Aqueel wrote: Then???
Nothing
|
|
|
|
|
|
How to change Default color Buttons Without CBitmap
pls help me?
Fly Like An Eagle With MIGHTY POWER.
|
|
|
|
|
Hi satishvarma_e,
I suggestion you create derived class CButton and use event WM_DRAWITEM
|
|
|
|
|
Hi all,
I need to compare two string with case insensitve.
That means, "ABC"="abc"=AbC", and so on.
Does any one knows a eazy way to deal with it?
Thanks for your help.
Best regards,
|
|
|
|
|
stricmp
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
how is your string stored ? char* ( or equivalent ), CString or std::string ?
with char* : stricmp
with CString : CString::CompareNoCase
with std::string : I don't know
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
My string is stored as char*.
It seems that stricmp can only determine the compared value of two string, isn't it?
Moreover, if I decide to change the design and use Cstring, do I need to include any header file? Is there any limitation I shoud pay attention to?
Thanks for your help.
|
|
|
|
|
This is written in C, but should work just fine in C++.
/*************************************************************************************************/
#define TO_LOWER(letter) ((letter) >= 'A' && (letter) <= 'Z' ? (letter)+'a'-'A' : (letter))
bool string_cmp(const char *StringA, const char *StringB)
{
/* If either string is NULL, they don't match */
if (StringA == NULL || StringB == NULL)
return false;
for (; *StringA || *StringB; StringA++, StringB++)
{
if (TO_LOWER(*StringA) != TO_LOWER(*StringB))
return false;
}
return true;
}
/*************************************************************************************************/
Rapture2k4
-- modified at 6:56 Saturday 25th March, 2006
|
|
|
|
|
Helen Chang wrote: Moreover, if I decide to change the design and use Cstring, do I need to include any header file? Is there any limitation I shoud pay attention to?
if you are using Visual C++.net as your compiler then include atlstr.h for using CString in your project otherwise if you are using VS6 then you have to download WTL package for Cstring Class
|
|
|
|
|
I am using MDI application.
I have one integer variable in a document.
How to get the value of the value of variable in child frame.
Could any one let me know?
Nice talking to you.
If you judge people, you have no time to love them. -- Mother Teresa
|
|
|
|
|
From the MDI Frame call GetActiveFrame()
From the active frame call GetActiveDocument()
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
like RegisterHotKey a hotkey, if keydown the hotkey, system will send WM_HOTKEY to your window. not need wait the message or sign.
How to do?(or how let some windows respond the RegisterHotKey same hotkey?)
Thanks.
|
|
|
|
|
If you installed a keyboard hook, then you could have each of your windows 'subscribe' to your keyboard hook. When you saw a key come through, post the message to each of your subscribed windows. That way, a single keyboard event, normally only targeting a specific window, can appear in multiple windows.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
sorry for the request, it is too urgent for me, if anybody's got such template,could u just share with me as a example ... i would be appreciated
|
|
|
|
|
Build Catalog.
User Query Catalog.
User Select Video
if ( Video available )
- User Gets Video and give a deposit.
- Video is marked as beeing away.
- Goto "User Query Catalog"
else
- Warn the user.
- Ask if user wants to reserve the video
- Goto "User Query Catalog"
User Leaves the Store.
...
User returns the Video.
- Video marked as available
- if Video Late
keep deposit.
...
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Elementary, my dear Watson.
--
Rog
It's supposed to be hard, otherwise anybody could do it!
|
|
|
|
|
Actually my final project in that class in college went a step farther. Yes we had to do all that you did above (pretty much), but I also valued the number of rentals until replacement. Then you take your rented videos and sell them as used, but all the results are profit because you already went past your number of rentals to pay for the tape. The manager could select how much profit he had to achieve before moving the rentals to used sales (he might want to rent n number of times past breaking even point). Overhead for the store was distributed to the tape market and could be distributed linearly, or based on popularity or any percentage between the two.
It was a pretty cool project all together. Since it went well above the requirements of the final project (which was just rental sales, cashier type stuff -- even had to determine change to the customer)... well, I modified the terminal during the late night shift so I could up the baud rate on the terminal to well beyond the limited 9600 the other students had... also upped my priority for cpu time such that debugging and processing of the rental library went faster... though I did experiment with 4D data structures to store the data in, pretty fun assignment!
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|