|
Thanks for help..Maxwell Chen
One thinge more to ask is.. How to handle other Image format..such as JPG, Tiff, Gif etc...
I think article is based on Bmp only...What do u say...let me know if u have any idea...
Thanks for last reply..
sumit
---Sumit Kapoor---
|
|
|
|
|
No idea, sorry! I am not good in image processing. But there are some articles out there in CodeProject for various image helper classes such as CPictureEx or something. The way to go would be: using different routines to handle different file types in OnSave(), and storing the image (of certain file name extension) with a specific flag in database. For example:
TABLE ImageGallery
[BLOB] - [Type] - [Size]
{...image A...}, JPEG, 258368
{...image B...}, TIFF, 8942937
Maxwell Chen
|
|
|
|
|
Hi..
thanks again for reply...
Actully I want to save JPEG(I'm particular to JPEG Image Type..So I want help on saving/Loading JPEG Image)...
if U find any sample or code Then let me know..I'll be thnaks full to u..
i've added your e-mail in my yahoo messanger...
U can chat with me any time...
THanks again Bye..
--Sumit Kapoor---
|
|
|
|
|
Take in account that saving images to a database is a terrible principle! Not only the DB gets big in no time, but the process of setting and retrieving images from the database is very slow!
The best way is to store the images as files in the disk and then store the path in the database. Of course that can complicate your program, but if speed is a requirement, you should consider NOT saving them to the databse.
|
|
|
|
|
Miguel Lopes wrote:
The best way is to store the images as files in the disk and then store the path in the database. Of course that can complicate your program, but if speed is a requirement, you should consider NOT saving them to the databse.
I agree with it. This is a better approach! And I guess that Oracle database plays similar tricks with BLOBs.
Maxwell Chen
|
|
|
|
|
Sumit Kapoor wrote:
Actully I want to save JPEG(I'm particular to JPEG Image Type..So I want help on saving/Loading JPEG Image)...
Try CxImage[^]. It seems good!
Sumit Kapoor wrote:
i've added your e-mail in my yahoo messanger...
U can chat with me any time...
I don't use Yahoo messenger though. But do feel free to email me if any I could help. Remember to write the emails with a legitimate title, because of too many spams in Yahoo Mail.
Maxwell Chen
|
|
|
|
|
hi all !
Could anyone give me some pointers as to how to go about locking and/or hiding files/folders or drives like u have in several freeware/shareware apps in the market?
The functionality is basically this :
when a file is protected it cannot be accessed..when an attempt is made it asks for a pre set password.unless correct password is typed it denies access.
For hiding... when i a folder/drive/file is hidden the OS does not detect the presence of the file/folder or drive.
How can i go about this.I was thinking of hooking windows' findfirstfile ( ) but somehow it didn't work out.I saw other codes also but they either needed DDK or didn't work for NT based systems.
I need to have mine work for all windows systems...from 98 to 2003.
Thanks to the contributors in advance !
Regards
Kane
|
|
|
|
|
There are two ways to accomplish this
1.Hooking IAT
you can patch the import address tables to your own functions, good for educational use only
2.Hooking at kernel level
you will have to write a kernel level device driver, which will monitor all file movement, you will need DDK and a LOT of heart
device drivers in 9x are .VXD files which are written differently than a .Sys(NT based device driver) so in order to support 9x system you will have to write a VXD file you will need 9x DDK for that and EVEN MORE HEART
and starting with windows XP microsoft has added extra protection bit (also known as WP bit) to protect kernel level hooking (which suggest that they don't really like ppl hooking in to kernel)
hope it helped
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
hi !
yup...it does thanks. Well the app i am talking has nothing illegal about it so don't worry Could you point me to a decent article about IAT or maybe a snippet of code??it would be of gr8 help i read up Ivo Ivanovs API hooking revealed but it didn't have enough information on IAT .
thankx for the reply !
Kane
|
|
|
|
|
Hi,
How do I get the authentication mode of a DSN in VC++ code.
I am trying something like this.
rc = SQLGetInfo(aDatabase.m_hdbc, XXX,(SQLPOINTER)buffer, sizeof(buffer), &size);
XXX - something/ I dont' know.
Can anybody help me out for this.
Thanks,
Prashant
|
|
|
|
|
Hai,
I Need to how to insert a JPG image file in the picture control of the MFC in VC++...Its supporting only BMP files...
I also need to know how to fetch data from registry and display it in my application.The function REGQUERYVALUE() is used for that but, i dono how the function parameter works....
Kindly help
bye
|
|
|
|
|
For displaying jpg images in ur app search CP for CPicture it's a nice class to display jpg in ur application
For registry support also try searching for CRegistry here.
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
I have to make a program like NotePad on Visiual Studio .NET 2003 using C++,but the problem i have is how to make Multiple UNDO.
Live isn't ForEver - LIVE IT
|
|
|
|
|
To make undoes, two steps:
1) define the scope about what's been done and to undo / redo. For example:
struct StepX
{
long PosFrom;
long PosTo;
ColorRef Col;
long Stroke;
};
2) use any of 'container' approach to store the steps. For example:
std::stack<StepX> or something similar.
<b>Maxwell Chen</b>
|
|
|
|
|
Think about "commands"
for example, when typing text, you can make each character or word an "Insert Command", undoing this, will trigger another command, "Delete Text Command" and its undo command is the "Insert Text" ... you see the pattern ...
Each command must know the context and must be "self sufficiant" as much as possible, for example, "Insert Command" will have the text, and the position of insertion.
You need to implement a stack of commands ( written in the other answer ), on which you push and pop the commands.
From There, you can easilly implement the redo .
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
In some cases, multiple undo's are too complicated to make like the 2 previous messages said, expecially, when deleting part of some complex structure. If you're dealing with text, which doesnt grow enormously, you could also keep a copy in memory of previous operations. If you specify a, lets say, 10 maximum number of undo's and the text doesnt exceed 50k, that wouldnt be such a bad approach, although its pretty ugly
The method exposed before is much more neat and works for very large structure operations, but can also be difficult to implement.
|
|
|
|
|
Please tell me on, how do I change the caption (name) of dialog window at runtime. I thank in advance.
cheers
mughi
|
|
|
|
|
There is more than way to do that. The easyest one I think is SetWindowText(). Search the MSDN for this function, you'll find the details.
johnnyl
|
|
|
|
|
Thanks a lot. Got it working.
cheers
mughi
|
|
|
|
|
I build a dialog application using VC++, and I want to deal with the keyboard message. but the ON_KeyDown fuction can't work, it can't be called by framework at all. then I find that I can deal with keyboard message in the PreTranslateMessage function, but it just like odd. I think it must have a better method.
thanks
laia
|
|
|
|
|
KEYDOWN works with dialogs. You can try it with an epty dialog (no controls on it, not even OK and Cancel) and see the function gets called. But if you place any controls on the dialog the messege doesn't get sent to the dialog no more, it gets sent to a control on the dialog. That's why your function doesn't get called.
PreTranslateMessage works fine, I don't think it's odd. But if you find a better way please share .
johnnyl
|
|
|
|
|
HI.
I have captured an AVI file with Cam and TV tunner..
But AVI files take More Space on Harddisk.
Now Plz Tell me Which Format Take Low Space OnHardDisk
And Provide a Normal Result ( MAy be Not Much Fine
But Clearly I can See It hahaha).
HOw Can i Convert AVI file TO That Format PLz REply
thanx
|
|
|
|
|
Try to convert MPEG,
it provides highest compression ratio and best quality
|
|
|
|
|
hello everyboy!
I making an application in which i have to make image from some memory location of array. The image is not been loaded from any pyhsical file.
it is been placed in memory be some other application but i have the memory referance.
i do not know how can i make image of that memory and dispaly that on a form?
Please Help.
THANKS IN ADVANCE.
|
|
|
|
|
There is a useful class named CBitmap,
DWORD CBitmap::SetBitmapBits(DWORD dwCount, const void* lpBits);
This member function should be helpfull
|
|
|
|