|
Sorry. I did it by mistake. I'll explain the problem for which I want the solution. I want to control the speed of the animation. I did this with the variable called "speedcntr"(extern defined in main.cpp). I use this variable to change the speed between way points. For this I call a function called "SetSpeed" which is defined in a file called Character.cpp from a file called "AI.cpp". It's working fine. In addition When the Charcters load initially they should be playing with a specific animation speed(Different for each Character). For this I've to change the value of this speedcntr variable before each character's load(with in the same scope). Is it possible or any other solution to my problem?
|
|
|
|
|
Hi,
It seems you want to store multiple values. Dont you think you can use arrays or some other data structure for this purpose.
Regards,
Sandip.
|
|
|
|
|
_AnShUmAn_ wrote: I want to know the reason of this being voted down... [Frown]
May be you want to edit your post now
Regards,
Sandip.
|
|
|
|
|
|
Hi Friend
I want to include Analog clock in C++6.0 MFC (dailog based application)
|
|
|
|
|
Why are you reposting when you got replies to your first post.
Regards,
Sandip.
|
|
|
|
|
What the hell ?
Instead of voting me down, you could have looked at the link I gave you. This was an article about an analog clock control. But maybe you are too lazy to read it ? Maybe you want that people do the job for you ?
Stop spamming the forums, you already got helpfull answers. If you can't manage to read or search an article, then go to rentatcoder.com and hire somebody to do the job for you.
|
|
|
|
|
Just a guess, but is "running" timedate.cpl an option?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Hi all,
I have a list control and a tree control together in a sdi application which is divided using splitter and both the controls are displayed in different views. When i click on parent in tree all its child are displayed in list control. Now, my problem is if i want to delete presently selected item how can i do it?? that is if selection is shown on tree then that item should be deleted and if selection is shown on list control then it should delete that item?
thanks in advance
|
|
|
|
|
You would need to get the selected item first, it could either be on the tree or in the list.
If it's in the tree use CTreeCtrl::GetSelectedItem. If this function returns null it means nothing was selected in the tree. on the other hand if CListCtrl::GetFirstSelectedItemPosition returns NULL it also means that nothing was selected in the list control. Since you now know that the item is selected in the tree/list you can delete that item.
Hope that deletion won't be a problem for you. It would only be of how to get the selected item from the list or the tree
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
No actually the problem is when i click on parent item it get selected and then i go and select list control item and then press delete....
now what happens is as i check that is any item is selected from tree control it returns that parent item now how can i do it?/
|
|
|
|
|
ok. in that case you can keep the index of clicked item stored in some member variable and use it while deleting
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I think u can try with this :-
try using GetCurSel() function.
use the Dlgitem's object & GetCurSel() to select the Currently selected one then delete it !!
Vickyy
|
|
|
|
|
Hi frinds
i am making a project(Library management system) in MFC Dialog based application and want to include analog clock in my projct.
Please help me in this regard
Ahsan Shah
Ahsan
|
|
|
|
|
Did you know that you can search on articles on CP ? This[^] is the first result to a search for 'Analog clock'.
|
|
|
|
|
you would need to create your own clock or need some third party control. See here[^] and here[^] for examples
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
i want to include analoge clock in c++6.0 in dialod Based application
|
|
|
|
|
Hi All
i want to make a backup file which is like this [code]Copy From System to USB or USB to Sustem[/code]. I am able to monitor a usb device. So plz help me
|
|
|
|
|
you can use file copying.
Here you can copy all files of USB to System and vice-versa.
so take a look for file copying.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
See my problem i don't want to write a file or folder in USB. I want to make a backup file means when some one copy a file or folder then it make a backup folder also.If you know something about it then plz tell me.how can i do becouse your first post is not use for me..
|
|
|
|
|
you already said that u able to USB monitoring.
i just want to told u that, create a logic when you monitor a USB and get any information or alert for copying data then you can also copy that data at temporary location.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
Hi, I'm trying to get into C++ and I was wondering about the class and method names.
I'm hailing from C#, where everything is written fully and all names are immediately comprehensible.
However, it seems in C++ mostly abbreviations are being used. Is there any good reason for this or is that just because C++ has been around since long before Intellisense, so it's just a matter of convenience?
Thanks.
|
|
|
|
|
ya! it's only a matter of convenience to avoid long variable names and distinguishing them from being local or member variables. for example there is oneHungarian Notation[^] that can be followed. If you feel that the people who follow you, should understand the code by just having a glimpse at it, it would be better to use a notation. on an ending note - > If you use your own:DOCUMENT IT VERY CAREFULLY.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
It's not specific to C++. Different projects use different naming conventions, so depending on whose code you look at it will vary greatly. It's really a matter of preference. The C++ standard library comes all in one single namespace called std that deals with basic stuff like string manipulation, lists etc., whereas the .NET API pretty much wraps the entire OS API. The C++ library can get away with much shorter names since its feature set is very limited and defined, whereas .NET needs means to organize all that stuff, and it does so by using tons of nested namespaces, which results in much longer symbol names overall.
I agree that most STL class names are not necessarily immediatly comprehensible and are thus not really a good example to follow in terms of naming conventions. Nor are the MFC, which were conceived before design patterns, templates, and namespaces had reached the real world, plus they are massively influenced by the Windows API naming conventions and are overall much closer to a C library than to a modern C++ library.
My advice is to be as verbose as you need to be but as short as you can be without sacrificing clarity. The time you save when you use cryptic abbreviations is far less than the time it is going to cost when someone has to fix a bug in that code, or even just understand what it does.
If you want an example of what readable C++ code with good coding conventions and modern design looks like, check out the open source FreeCloth project. Reading through that code really changed the way I had been thinking about a few things.
Hope this helps,
Peter
|
|
|
|