|
Hi,
I have to take a shot from a small Web Camera.
What should i use.
- Video for Windows
- Can i use DirectX
- or something else
Regards
Sameer
|
|
|
|
|
DirectShow, in DirectX
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Hi,
call back function is said to be called by Operation system only. I want to make a call back funtion and control the time and place it is called. Can I make it?
Would you please append an example ?
Thank you.
Best regard.
I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
Best regard.
I confess that I am a stubborn guy, but why not put things thoroughly, logically and systematically clean. One concrete prolem is worth a thousand unapplied abstractions.
|
|
|
|
|
Ok... Ive bean experimenting with classes "saying that i do not know anything (at all) about classes, its bean a confusing process"
When i try to learn somthing I usually pinpoint the thing that i need to learn and start experimenting with it... "i do look through the MSDN a bunch and the help tutorial that VC++ 6.0 came with but if your unsuccesfull try the forums ."
My question is... to be responded by tutorial link or whatever...
How do you use a class... why do you use them... What does Publuc do... What does private do... Do classes require any header files?
Right now im doing somthing like:
class monster;
{
//somthing here
}
my idealistic ideal is that i could use classes "which i think i read that they are, basically a single block of info that you make, that you can duplicate and use kindof however you want" To make all the monsters in my text game "just to learn how to use the class function" and then just recal certain things from the class...
But as you know,... thats an ideal and i still dont know exactly why you use classes "i think i might be totally off" but thats the path of learning.
Thanks for the help
~SilverShalkin
ps... this in win32 app con. "last forum asked me to specify what i was working in... there you go"
|
|
|
|
|
SilverShalkin wrote:
Ok... Ive bean experimenting with classes "saying that i do not know anything (at all) about classes, its bean a confusing process"
I'm eating jelly beans right now - Harry Potter ones.
SilverShalkin wrote:
How do you use a class...
A class is an encapsulation of an idea. For example, a CString, a std::string, a std::vector, a CWnd are all classes, and they all encapsulate a concept. I'll pick on CString for the sake of the rest of this reply. CString is a collection of data members and functions that together give me a string as an object, and allow me to pass it around and operate on/with it.
SilverShalkin wrote:
why do you use them...
One major thing C++ has over C is that C++ does not turn a project into a million functions all visible to one another. A class is used so that publically an interface is provided to do what the class is designed for, and the messy details are hidden and dealt with by the class.
SilverShalkin wrote:
What does Publuc do...
It means when I go CString s; the function or variable in question can be called, for example, s.Format("%d", 6);
SilverShalkin wrote:
What does private do...
It means I can't call/access the method/variable. Typically this means a function does something internal, and variables are generally private so they can be exposed through methods that filter what a person is trying to set a value to, if they are allowed to at all.
SilverShalkin wrote:
Do classes require any header files?
A class consists of a header file, and optionally a cpp file ( because it can all go in the header ). If you're using precompiled headers ( and with VC you usually are ) then std.afx needs to be the first file included in the .cpp file, followed by the .h file. So if I have a class called MyClass, the first two lines in the .cpp file are likely to be
#include "stdafx.h"
#include "myclass.h"
SilverShalkin wrote:
my idealistic ideal is that i could use classes "which i think i read that they are, basically a single block of info that you make, that you can duplicate and use kindof however you want"
If it's a representation of a block of data, you should use a struct. The only difference is that a struct has public members by default, a class has private, but a struct says to me a block of data, a class says implimentation of an idea.
SilverShalkin wrote:
To make all the monsters in my text game "just to learn how to use the class function" and then just recal certain things from the class...
One possible design is that am onster has methods that move it, and make it do certain things. Then a monster is an object that knows how to behave.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Can I just say again that it scares the hell out of me that someone who doesn't know ( in this case ) what a class is, is talking about writing a game engine ? You're setting yourself up to fail, or in the least write something truly awful, when you set out to write something well and truly beyond your skills. You need to forget about windows, forget about games and sit down and learn these total basics which you lack. Write console programs until you understand C++ to the point of being able to write classes, a class structure that uses inheritance, and the standard iostreams and STL to at least a basic degree before you even think about windows or game programming.
That is not to say you suck, it's more that like a lot of people, you're so eager to get the end result that you're not putting the time you need into the basics. I keep hoping for your sake that this particular light will come on, but the number of failed game engines in existance proves to me that this is not guarenteed to happen. Whatever happens, I'm always happy to answer your questions, but this is the best piece of advice you've got to date ( although I don't think it's the first time I have given it ).
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Christian Graus wrote:
That is not to say you suck
ROTFLMAO!!!
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Well, I'm trying hard to get him to take the point - he is out of his league and should take the time to learn this stuff before thinking he can design and write a game engine.
But it *is* kinda funny.....
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Oh... If you've got a couple of spare minutes, I'd love it if you could explain to me what a class is.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Jon Hulatt wrote:
Oh... If you've got a couple of spare minutes, I'd love it if you could explain to me what a class is.
Apparently something you should have attended more regularly if you went to Uni, otherwise something you should take up in the evening to help you understand how to program....
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Wow. That helps. Now, tell me what is a pointer? how can i use them in my program?
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
Jon Hulatt wrote:
Wow. That helps. Now, tell me what is a pointer? how can i use them in my program?
Here's a pointer - move to VB.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Christian Graus wrote:
You need to forget about windows, forget about games and sit down and learn these total basics which you lack.
Thanks... "Writting games is the only thing i know how to do... so weather it is a small stupid game... which ive bean doing "Stupid text(Just text)((Only only, text)" "no graphics what so ever..." (i think you get it)
Im trying to learn the basics, thats why im working on text rpg instead of tetris clone. I want to know C++ to the fullest, so much that i can think of somthing to program and almost instintly think up the structure of that program. I am the most dedicated learner that "I" have ever seen. "I just dont know where to start."
"I do know what a pointer is... kindof... it points to the address of somthing, you use "&" with it...
I know of allot of things... but i dont know why they are used... or, what the can do to make my program run more efficiently.
I need a project, somthing that i can do and learn the things i need to...
so, till i find one, or till someone gives me one "learning purposes only" Im going to be cruising the books and taking note on whatever i can to program better.
Thanks, "It scares the hell out of me to "
~SilverShalkin
|
|
|
|
|
SilverShalkin wrote:
Writting games is the only thing i know how to do
Bull. You mean 'writing games is all I want to do'. Game programming is a superset of common programming skills. If you cannot write a calculator ( my suggested first C++ task ) then you cannot write a game. Period.
SilverShalkin wrote:
Im trying to learn the basics, thats why im working on text rpg instead of tetris clone.
An rpg is *not* the basics. This is what I'm trying to get you to understand.
SilverShalkin wrote:
I want to know C++ to the fullest, so much that i can think of somthing to program and almost instintly think up the structure of that program.
*grin* if you manage that you'll be beating everyone here, but I understand what you mean. Do you own 'the C++ programming language' by Bjarne Stroustrup ? You should get it if you don't.
SilverShalkin wrote:
I am the most dedicated learner that "I" have ever seen. "I just dont know where to start."
Write a calculator program. Make a base class called calculation that defines what a calculation does, then define derived classes that do individual calculations such as add. No program would ever do this for a calculator, but the simplicity of the task will let you focus on the details required to make the classes behave properly. Then have a pointer to the base class in your main app, so you can learn more about pointers and so on. Use dynamic_cast to find out if the pointer you have is the type you want or not. Again, this example is designed to teach you a lot of stuff, not to be practical. I'd be glad to help you.
SilverShalkin wrote:
I know of allot of things... but i dont know why they are used... or, what the can do to make my program run more efficiently.
Which gets back to me saying focus on the basics for a bit.
SilverShalkin wrote:
so, till i find one, or till someone gives me one "learning purposes only" Im going to be cruising the books and taking note on whatever i can to program better.
Stroustrups book is also full of examples and exercises.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Christian Graus wrote:
SilverShalkin wrote:
Writting games is the only thing i know how to do
Bull. You mean 'writing games is all I want to do'
"its all that i have the heart to program" (learning quickly though, calculater program may help more )
Christian Graus wrote:
Do you own 'the C++ programming language' by Bjarne Stroustrup ? You should get it if you don't.
this is a book right? or is it the actual programming language? "just wondering" ill go and check it out.
thanks for the help
~SilverShalkin
|
|
|
|
|
SilverShalkin wrote:
"its all that i have the heart to program" (learning quickly though, calculater program may help more )
Exactly. The point is not to love what you're doing, but to do things that will equip you to do what you love.
SilverShalkin wrote:
this is a book right? or is it the actual programming language? "just wondering" ill go and check it out.
It's a book - get the third edition, which is the current one.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002
|
|
|
|
|
Christian, I am not sure if you are aware but a text RPG is actually a console program not windows, usually in a text rpg they will give you a story then ask you a question and you reply by typing "turn east" or another sort of function.
|
|
|
|
|
Whoops just to let you know that was me... i thought was logged in
|
|
|
|
|
You should take a course in Object Oriented Analysis & Design (or at least read a book on the subject). This will give you the basics of OOP and will likely answer many of your current (and future!) questions.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
How can I copy selecting text from any application to my application by hotkey
|
|
|
|
|
Author
Addition info: my application store in system tray I want to copy selecting text from any application to Clipboard by hotkey
then I will get data from Clipboard later.
Thank you so much
|
|
|
|
|
meta wrote:
Author
Addition info: my application store in system tray I want to copy selecting text from any application to Clipboard by hotkey
then I will get data from Clipboard later.
I believe you'll need to use a global keyboard hook. I dont know much about doing that, but there are a few articles here on CP explaining how to do it.
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
Here's how:- Register yourself as a clipboard viewer by calling
SetClipboardViewer() .
- Handle the
ON_WM_DRAWCLIPBOARD message. Here, you can get at the clipboard's data by calling OpenClipboard() , GetClipboardData (CF_TEXT) (assuming you're interested in text content), and finally CloseClipboard() . Be sure to cascade this message to the next viewer.
- You should also handle
WM_CHANGECBCHAIN . See the various articles in the Clipboard section for more info.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Additon info: that hotkeys isn't ^C (control c) ,so I do registerhotkey and do myfunction to restore from system tray but after that what should I do for copy that selecting text to my app.
thank a lot
|
|
|
|
|
How can I copy selecting text from any application to my application by hotkey ?
Thank you so much
|
|
|
|
|