• Welcome to Valhalla Legends Archive.
 

Starting C++. Again.

Started by Joe[x86], August 23, 2005, 10:25 PM

Previous topic - Next topic

Joe[x86]

Yeah, I downloaded Dev-C++ yesterday, and messed arround with it for a while. Anyhow, I need some help. Can anyone show me how to (or link me to a tutorial that explains how to)..

- Create a richtextbox, and recieve its events.
- Create a textbox, and recieve its events.
- Create a CSocket.

Thanks to everyone who posts here, and has supported me this far.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

UserLoser.

Win32 API Functions: CreateWindow(Ex), SetWindowLong (possibly)
Callback functions:  WindowProc
CSocket: ?? What's CSocket?

Btw, these are not just C++ specific

Joe[x86]

Well, theres a CSocket class module that a ton of battle.net bots (and other things) use. Its basically the Winsock control, except its not a control, its a class that you use WithEvents. Anyhow, I figured it was ported from C++, so I could reference that class to have a VB-ish Winsock control instead of C++ type blocked socket.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

R.a.B.B.i.T

#include <winsock2.h>

Read some tutorials, kthx?

K

Quote from: Joex86] link=topic=12601.msg125177#msg125177 date=1124863810]
Well, theres a CSocket class module that a ton of battle.net bots (and other things) use. Its basically the Winsock control, except its not a control, its a class that you use WithEvents. Anyhow, I figured it was ported from C++, so I could reference that class to have a VB-ish Winsock control instead of C++ type blocked socket.

Uh, nah. It's probably just another wrapper for the standard berkley sockets functions  + winsock initialization code.

Check out this website. It's got a good overview of creating and using a socket.

Yegg

You could always switch to wxDec-C++ and use wxWidgets instead. wxWidgets is much easier to use while also supporting all major platforms.

MyndFyre

There's a CSocket class, but it's part of MFC.

Window events (any GUI widget you create in Windows is generally a Window) that you would use for a textbox or whatnot will be handled by your WndProc function.  This function is specified when (I believe) you register your window subclass at creation time, prior to displaying it (at the very start of your application).  These are handled through Windows Messages, also called "Notifications" in MSDN documentation.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Joe[x86]

I think I'll download VC++ off Limewire and go watch TV for a few hours.
Quote from: brew on April 25, 2007, 07:33 PM
that made me feel like a total idiot. this entire thing was useless.

MyndFyre

Personally, instead of pirating software, I would just go with wxSocketBase in the wxWidgets library.
QuoteEvery generation of humans believed it had all the answers it needed, except for a few mysteries they assumed would be solved at any moment. And they all believed their ancestors were simplistic and deluded. What are the odds that you are the first generation of humans who will understand reality?

After 3 years, it's on the horizon.  The new JinxBot, and BN#, the managed Battle.net Client library.

Quote from: chyea on January 16, 2009, 05:05 PM
You've just located global warming.

Mangix

Quote from: Joex86] link=topic=12601.msg125302#msg125302 date=1124926605]
I think I'll download VC++ off Limewire and go watch TV for a few hours.
or instead of getting that garbage, get the free VC++ 2005 Beta 2 from microsoft. it's a way shorter download

Yegg

That beta takes a long time to install (not that it matters in the end). But if I remember correctly it expires in 30 days?

Warrior

Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?

Mangix

#12
Quote from: Yegg on August 25, 2005, 10:17 AM
That beta takes a long time to install (not that it matters in the end). But if I remember correctly it expires in 30 days?

yes but getting a cdkey for it is free as well

@warrior:VC++ 6.0 is bigger garbage

edit:Visual Studio 6.0 takes even longer to install

Blaze

Quote
Mitosis: Haha, Im great arent I!
hismajesty[yL]: No

Warrior

2003 IDE is nicer, that or use gcc wussies.
Quote from: effect on March 09, 2006, 11:52 PM
Islam is a steaming pile of fucking dog shit. Everything about it is flawed, anybody who believes in it is a terrorist, if you disagree with me, then im sorry your wrong.

Quote from: Rule on May 07, 2006, 01:30 PM
Why don't you stop being American and start acting like a decent human?