|
DavidCrow wrote: For example, code 5 from the computer in a Chevrolet may indicate an error in the oxygen sensing unit, while code 5 from the computer in a Dodge may indicate an error in the transmission.
Oh, US are great!
The 'computer' of my car has just a boolean return value: the fuel warning light...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
thanks alot...i understand now...
vikas da
|
|
|
|
|
Hi,
I was wondering how can i determine if there a registry key is valid or not.
|
|
|
|
|
Well, that largely depends on your definition of "valid".
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Thats fair enough.If i want to access the registry key value then it should allow me to access it.
Something which registry cleaner software uses to determine whether to delete the registry key or not.
|
|
|
|
|
gayatri.neelema wrote: Something which registry cleaner software uses to determine whether to delete the registry key or not.
Keys and values are deleted based on a set of rules. And a rule used for one key may not be valid for some other key. Some keys/values may refer to file system paths. If the specified path does not exist, then the key/value may be invalid. Other keys/values refer to GUIDs that may not exist. If a key/value does not refer to anything or just has a value (e.g., 17), can it be deleted? Only the author of such knows for sure.
"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
|
|
|
|
|
hey thanks for your reply.
But even rules cannot be formed just like tat.
I was curious to know if there were any such algorithm .so that i can use it.
|
|
|
|
|
Well, there's no such thing called "registry cleaning" and most of those software are nothing more than a pile of crap.
As David clearly stated, how could anyone else other than the author (the app who wrote the key and values) possibly know that the key is "invalid" or "unwanted"? And there is no such algorithm available which decides this. If you need one, you must think of all the possibilities and devise your own algorithm.
A slight mistake that a registry cleaning software can cause devastating results. May be on operating systems like Win95 or 98, you could possibly get a very marginal benefit by deleting the registry keys that are unused. But with more recent versions, the OS is smart enough and you will almost get NO benefit just be deleting some registry keys that aren't used. If you have a different opinion (with some kind of proof or benchmarking tests done), I'll be interested in hearing from you.
After all, if you don't know much about how and what kind of cleaning operations should be performed on the registry, you must not be writing such a software.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
While it's not an answer to your question, take a look at this article. It shows how to remove registry entries that are known to be bad. That should clue you in as to why you can't just willy nilly remove registry entries without knowing what they are for.
"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
|
|
|
|
|
i think thats a useful ans.
thanks for your help.
|
|
|
|
|
I have created a SDI application with CFormView in VS 2005, vc++, MFC. I placed listctrl, a group box, and a couple of buttons and textboxes in the group box. I am setting the list ctrl and group box posisions at runtime using SetWindowPos(). The list control and the group box sets as per my x,y values. But the control which i have palced in the group box are not set with the group box. They are there, where i have placed them statically. I want all the control placed in the group box to be set as i change the pos of the group box. Is it possible. If yes where am i doing wrong.
Thank you.
Saadhinchaali
|
|
|
|
|
A groupbox is just a control like any other (with a big hole in it). Just because you place controls inside of it in the dialog editor it won't be the parent of those controls. So as far as i know you can't move the controls visibly inside the gorup box by just moving the group box itself, you have to move the controls individually inside the group box. You could try doing 4 things i think:
1. Move the controls individually - not too nice but works
2. Put the controls which are inside of the groupbox on some custom-made panel and move that one around, so you only have to move the groupbox and the panel representing its inside. - a bit complicated, not too nice, but works
3. Put the groupbox and the controls visually inside it onto a panel (like a child dialog for exmaple) and move that one around - a bit less complicated than 2. but still not nice
4. Write some helper class that walks thorough the controls which are inside the gorup box and moves them around, maybe a class inherited from the groupbox class. - I'd chose this one, you are still moving around the controls individually but you get a reusable way to do so. You would need for example an array into which you'd place the controls that need to be moved simulteniously, you could also make a method for it that collects the controls inside the group box by checking their positions.
I hope this all helps,
good luck.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Thank you.
I just tried to place a tab control and put some controls on it. Even the tab control is not controling the controls. When i am moving the tabcontrol the controls placed on it are not moving. I tried cut paste on tab control also.
Can u help me in this!
Saadhinchaali
|
|
|
|
|
The tab control is the same as the group box regarding this issue. If you want to change tabs you will either have to write yourself your own tabpage-changing mechanism or look for one, i am sure there are such already written and useable solutions for that here (or just use google).
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
I want to make a screen capturing application which captures and stores in JPG or GIF format and not in Bitmap format.
I have examples from codeproject but all of them are using Bitmap b'coz of which when i save themin a bitmap file for sending to the server the file size if too much.
Thanks & Regards.
Dhiraj Kumar Saini
|
|
|
|
|
You can convert the bitmap to a JPG and then...
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
If you can provide some code or example as to how ro convert it would of great help.
|
|
|
|
|
If you are using MFC, you could use CImage::Save() with ImageFormatJPEG or ImageFormatGIF as the guidFileType field.
|
|
|
|
|
Rajesh R Subramanian wrote: If you are using MFC
Hey man, you're using your superpowers.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Well, my CPMRU is fully charged.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
|
I am able to save it in JPG format but the size of the file is somewhere around 150KB. Is there any way I can Optimize the size to somewhere below 100KB as it needs to be sent to the server for real time monitoring.
Thanks In Advance
|
|
|
|
|
Use GDI+ to save to JPG. Once you have a HBITMAP containing the screenshot do Something like this (can't remember the correct objects/methods now so you will have to look them up, but it generally goes something like this):
Gdiplus::Bitmap Img;
Img.Attach(hbitmap_screenshot);
Img.Save(path_to_save_to, Gdiplus::ImageFormatJPEG);
Img.Detach();
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Thanks Its Working
|
|
|
|
|
you can use CxImage class.CxImage is a C++ class to load, save, display, transform BMP, JPEG, GIF, PNG, TIFF, MNG, ICO, PCX, TGA, WMF, WBMP, JBG, J2K images
|
|
|
|