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.
Win32 API Functions: CreateWindow(Ex), SetWindowLong (possibly)
Callback functions: WindowProc
CSocket: ?? What's CSocket?
Btw, these are not just C++ specific
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.
#include <winsock2.h>
Read some tutorials, kthx?
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 (http://www.hal-pc.org/~johnnie2/winsock.html) website. It's got a good overview of creating and using a socket.
You could always switch to wxDec-C++ and use wxWidgets instead. wxWidgets is much easier to use while also supporting all major platforms.
There's a CSocket (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/_MFC_CSocket.asp) 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.
I think I'll download VC++ off Limewire and go watch TV for a few hours.
Personally, instead of pirating software, I would just go with wxSocketBase (http://www.wxwidgets.org/manuals/2.6.1/wx_wxsocketbase.html#wxsocketbase) in the wxWidgets library.
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
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?
2005 is garbage.
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
2003 IDE is nicer, that or use gcc wussies.
I personally love my gcc :)
why would you need an IDE for writting C++ anyways?
just download the Visual C++ 2003 Toolkit and compile it with the compiler. it's not hard
....Mangix...just shutup. Please.
You'd need an IDE to keep large programs organized if your aim isn't at a low level but at a user level of programming.
IDE's also tend to offer optimizations to the exe and offer handy things such as syntax highlighting/
Quote from: Warrior on August 27, 2005, 04:13 PM
....Mangix...just shutup. Please.
You'd need an IDE to keep large programs organized if your aim isn't at a low level but at a user level of programming.
IDE's also tend to offer optimizations to the exe and offer handy things such as syntax highlighting/
I dunno, I have worked on some large collaborative projects without using an IDE. Just a makefile, emacs, a terminal, and cvs.
I don't quite understand how "IDE's also tend to offer optimizations to the exe" when that seems like the compiler's job?
Quote from: Warrior on August 27, 2005, 04:13 PMYou'd need an IDE to keep large programs organized if your aim isn't at a low level but at a user level of programming.
IDE's also tend to offer optimizations to the exe and offer handy things such as syntax highlighting/
Perhaps you're confused on terminology. Large programs can be easily maintained without an IDE. IDEs do not offer optimizations on anything; though some IDEs do wrap compilers that can do very good optimizations. Syntax highlighting is also commonly available outside an IDE. The only reason I can see that you'd want an IDE is so that if your editor crashes, it takes everything else down with it. :)
Quote from: Warrior on August 27, 2005, 04:13 PM
IDE's also tend to offer optimizations to the exe and offer handy things such as syntax highlighting/
...lmao. how do IDEs optimize the exe? do they hack the compiler and make it l33t?
as for syntax highlightning, Notepad2 is always the best
Quote from: Mangix on August 27, 2005, 05:31 PM
...lmao. how do IDEs optimize the exe? do they hack the compiler and make it l33t?
as for syntax highlightning, Notepad2 is always the best
@1st comment: It could use an optimizing switch on the compiler, that it chose is best suited for your code. *shrug*
@2nd comment: :)
an optimizing switch huh? i dont think you would need an IDE to do that though
It was a made up example... and now that I think about it, it was stupid.
I personally like ide's for thier features, such as function completion and managability.
@Joe: Before bothering on adding objects such as RichTextBox's, I'd suggest learning how to make a basic 'form'. If you had done that already you'd realise how the objects get handling.
As for CSocket, wasn't it developed in VB6 as a result of many Winsock API tutorials.. turning into an API equivalent of Winsock.ocx?
Yes, CSocket is a api version of winsock.ocx
Quote from: Kp on August 27, 2005, 04:29 PM
Quote from: Warrior on August 27, 2005, 04:13 PMYou'd need an IDE to keep large programs organized if your aim isn't at a low level but at a user level of programming.
IDE's also tend to offer optimizations to the exe and offer handy things such as syntax highlighting/
Perhaps you're confused on terminology. Large programs can be easily maintained without an IDE. IDEs do not offer optimizations on anything; though some IDEs do wrap compilers that can do very good optimizations. Syntax highlighting is also commonly available outside an IDE. The only reason I can see that you'd want an IDE is so that if your editor crashes, it takes everything else down with it. :)
Well, I personally don't feel like writing a makefile with all of the command line arguments and find it easier to maintain large products which are made for a single platform at a user level inside an IDE since like you said all of the options wrap around arguments applicable to the compiler it'self
Now, it's probably my fault for not explaining deeper what I was talking about.
Emacs..*shudder*. I'd rather use something where I don't have to use all 10 fingers to perform a command.
I can also see the advantage of keeping a CVS and maybe you're used to your method of doing things, what I said was merely personal
preference and was providing my opinion on a comment made.
I hope I cleared most of everything up in this response.
Quote from: Warrior on August 28, 2005, 12:39 PMI hope I cleared most of everything up in this response.
You did, but some of your remarks lead me to believe you're trying to take a brute force approach when working without an IDE. There are better ways to do makefile-driven development. :)
Quote from: Warrior on August 28, 2005, 12:39 PMWell, I personally don't feel like writing a makefile with all of the command line arguments and find it easier to maintain large products which are made for a single platform at a user level inside an IDE since like you said all of the options wrap around arguments applicable to the compiler it'self
Most modern make utilities support several features to make this much less painful. You can use make variables (http://www.gnu.org/software/make/manual/html_node/make_8.html#SEC9) to remember common settings. Traditionally, the variable CFLAGS holds all the options which you wish to pass to your C compiler. CXXFLAGS holds options specific to invocations of your C++ compiler. Make also supports including other Makefiles (http://www.gnu.org/software/make/manual/html_node/make_15.html#SEC16), so you could have a Makefile of environment-wide settings that all your projects include. Implicit rules (http://www.gnu.org/software/make/manual/html_node/make_99.html#SEC103) allow you to write a few definitions for files (e.g. build .c files this way, .cc files that way, and .l files with flex (http://www.gnu.org/software/flex/flex.html)), and then not worry about it anymore. If you're clever, you can put the implicit rules in your environment-wide makefile, and use make variables in the implicit rules so that individual projects can specify different settings. For example:
# In environment.mak
# Default projects are built without optimization
CFLAGS=-O0
%.o :: %.c
$(CC) -c $(CFLAGS) $< -o $@
# In per-project Makefile
# Use a different gcc version for this project
CC=gcc-3.4.2
# Optimize and don't generate debugging information
CFLAGS=-O2 -g0
Quote from: Warrior on August 28, 2005, 12:39 PMEmacs..*shudder*. I'd rather use something where I don't have to use all 10 fingers to perform a command.
No contest there. Vim (http://www.vim.org/) is much better than emacs. :)
Quote from: Warrior on August 28, 2005, 12:39 PMI can also see the advantage of keeping a CVS and maybe you're used to your method of doing things
Versioning systems are nice for large projects (even when used with an IDE), but Subversion (http://subversion.tigris.org/) is a much better choice than CVS (http://www.nongnu.org/cvs/).
I'm realatively new to Makefile's that's why maybe I tend to pick the more "new user friendly" approach to things.
I knew about makefile's being able to include others (that's the only way I can see to compile everything in different directories by using $@ and $v and calling the next directories makefile respectively but outputting all object files into the same directory for easy linking)
Quote from: Warrior on August 25, 2005, 11:48 AM
2003 IDE is nicer, that or use gcc wussies.
can the 2003 IDE do this?
http://img180.imageshack.us/img180/8716/vc20059rp.jpg
MVC++ 6 can do that...
Quote from: Mangix on September 01, 2005, 07:28 PM
Quote from: Warrior on August 25, 2005, 11:48 AM
2003 IDE is nicer, that or use gcc wussies.
can the 2003 IDE do this?
http://img180.imageshack.us/img180/8716/vc20059rp.jpg
Yes, during debugging. It's called the "call stack" window.
Sure why not?
hrm
/me tinkers with his VC++
edit: w00t "[me]" tags w00t