|
You actually think you'll get any more answers if you ask the same question multiple times? Wrong. The more times you ask the same question, the more annoying you'll be percieved.
Disregarding the fact that your both ignorant and annoying, what you say you want to do can't be done. Period.
If you want a "restartable" machine, use something like VMWare.
No please stop asking this question.
|
|
|
|
|
I remember to have once seen an ad for some piece of hardware doing this: It basically was a modified HD-adapter which was before booting cloned a hidden partition onto the work partition. So you had the same setup at every boot.
Great for schools or public computers.
Hope this helps, and you can stop to repeat your postings.
Please do not ask me for a website or more special info, as I do not know any more.
My opinions may have changed, but not the fact that I am right.
|
|
|
|
|
can anyone help me in putting something to the subject and body of your default mailer. i.e. suppose I have Microsoft outlook and if I want to send a mail through my program I will do it thru ShellExecute..but is there any way likt this only..to write the data into subject and body of new mail message..like send this to a friend and you want the stuff wrote but not the email id. For email Id you will write mailto:email and this will do the work will open a new mail message with the mail id. How to write subject and body of this mail..not into to: field...any help and pointers are surely appreciated..any opinions..please..
thanks in advance..
Himanshu
|
|
|
|
|
Already tried DDE ?
~RaGE();
|
|
|
|
|
thanks rage..but can you give some example..so that I can understand better..
thanks a lot..
Himanshu
|
|
|
|
|
Well, you can surely send DDE orders to the Outlook App. DDE are orders like "File""Open" and so on. If you do not want to automate your Outlook, you could use something like "New Mail","tab","tab",put your object text in clipboard,"Paste",put your msg in clipboard,"tab","Paste".
Look ata DDE in the MSDn, and in the CWinApp API.
~RaGE();
|
|
|
|
|
Hello all,
Does anyone of you know of a simple class to encrypt my password before I write it to a file? And of course decrypt it again so I can use it
I had a look at the 2 articles in system/cryptography, but they don't fit my needs.
I also looked at an app using crypto++[^], but that seemed like a bit of overkill too.
So basically I'm looking for a simple class that encrypts/decrypts my password using whatever algorithm (MD5, PKI, ...). Or any pointers how I can start my own class.
tia
Wim
|
|
|
|
|
Wim Jans wrote:
Does anyone of you know of a simple class to encrypt my password before I write it to a file? And of course decrypt it again so I can use it
Cryptography isn't simple. Period.
If you had a look at some real cryptography but you deemed it "a bit of overkill", perhaps what you want isn't anything cryptographically safe? What about xor'ing the password with some known value and the just hash it? Maybe even a plain SHA or even a CRC32 could be fine...
|
|
|
|
|
Hi Mike,
Thanks for the answer. I will have a look at the CRC32 or SHA stuff.
With 'a bit of overkill' I meant that they offer a wealth of encryption algorithms in one library, while I just needed one.
So it would be nice of one had a class with only eg. a MD5 algorithm in it.
Thanks again
Wim
|
|
|
|
|
If you want to decrypt your password again, you can't use SHA (Secure Hash Algorithm) or MD5 (Message Digest 5) because they are hashing-algorithms. Hashing algorithms are one-way-functions. That means that one direction is (very) easy to do ("encrypt") but the other ("decrypt") is nealy impossible. Look up for a definition of hashing algorithms in the internet and you wil see you can't use them.
What you want is an encryption/decryption algorithm like RSA, DES, AES and so on. Some of them are built in to the CryptoAPI integrated in Windows.
--
karl
|
|
|
|
|
Search your MSDN Library!
There is good examples there in how you encrypt/decrypt.
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Hy.
I'm developing a plugin based application.
My problem is that i need to define some dialogs in the plugins that later i can use from the main application to configure each plugin (something like Winamp3's Config Dialog).
If i export pointers to CPropertyPage's from the plugins and use the AddPage of the CPropertySheet in the main app, everything works well, but if i export pointers to CDialog and try to position such a dialog in another dialog created by the main application, it gives me some errors at run time.
Anybody has a clue on how to create the dialogs in the plugins so i can still handle the controls from that dialog in the plugin but still be able to position it in another dialog in the main application ???
|
|
|
|
|
Are the plug-ins being dynamically linked or statically linked to?
If dynamically (i.e. LoadLibrary) then when the dialog is created (Create/DoModal()), you need to make sure that the resources of the DLL are setup as the default at that time.
Take a look at the AFX_MANAGE_STATE() macro or the AfxSetResourceHandle() commands which will allow you to change to the correct resources when the dialog is created from its resources.
Also, you may be interested in my plug-in article thats listed in the Projects/Libraries section here at CP.
Roger Allen
Sonork 100.10016
WHats brown and sticky?
A stick or some smelly stuff!
|
|
|
|
|
Hy.
The plugins are dinamically created (i load them with LoadLibrary) and all the plugins are MFC Extension DLL.
I found another way, it's working perfectly, i use a component named : EzOptionsDlg wich uses CPropertyPages, exactly what worked for me. (you can find it here at C.P. http://www.codeproject.com/dialog/ezoptionsdlg.asp.
My only problem with this is that i have to make shure each plugin uses different resource numbers ore the wrong dialogs will appear.
Anyway, i solved the problem, i wanted to make something similar to this.
Thanx for the help.
|
|
|
|
|
Hi,
do you now some good starting place for this?
Thanks
Bunburry
|
|
|
|
|
Bunburry wrote:
do you now some good starting place for this?
This place perhaps? (next time you should considering to do your own googling)
|
|
|
|
|
Hi,
I have a listbox on a skinned window using MFC. There are no problems with it on 98SE/Me/2000/XP but when I use the first release of 98 the list box does not show yet everything in the CListCtl class returns success when creating the window, adding colums and items.
does anybody know why?
Thannks
Ceri
|
|
|
|
|
I have brought up this question before but havn´t solved it yet
The question is:
Does someone know how to convert from a bitmap to a DIB and use the function StretchDIBBits() and implementet it in the article PrintingTricksAndTips in the printing section.
plese help.
-Tom
|
|
|
|
|
Sure, but I'm at loss why anyone would want to use the slowest GDI function available - StretchDIBBits - when there are alternatives. Any particular reason for this masochism you'd like to share with us?
|
|
|
|
|
It may be slow, but its guaranteed to work on printers compared to BitBlt() etc. So its the way to go when printing.
Roger Allen
Sonork 100.10016
WHats brown and sticky?
A stick or some smelly stuff!
|
|
|
|
|
Tom,
I think you need it for a bitmap loaded from a file from as mentioned in a previous post. This does it from the resources, but if you can load the bitmap from a file, the rest of the technisue should be the same:
CBitmap bitmap;
bitmap.LoadBitmap(ID_BITMAP);
HANDLE hDib ;
hDib = ImageToDIB(&bitmap, iImage, this) ;
BITMAPINFOHEADER *pBMI ;
pBMI = (BITMAPINFOHEADER*)GlobalLock(hDib) ;
int nColors = 0;
if (pBMI->biBitCount <= 8)
{
nColors = (1 << pBMI->biBitCount);
}
::StretchDIBits(printer_dc,
0,
0,
pBMI->biWidth,
pBMI->biHeight,
0,
0,
pBMI->biWidth,
pBMI->biHeight,
(LPBYTE)pBMI + (pBMI->biSize + nColors * sizeof(RGBQUAD)),
(BITMAPINFO*)pBMI,
DIB_RGB_COLORS,
SRCCOPY);
GlobalUnlock(hDib) ;
GlobalFree(hDib) ;
Roger Allen
Sonork 100.10016
WHats brown and sticky?
A stick or some smelly stuff!
|
|
|
|
|
Thanks a lot Roger!!
A have tested the code and with a minor adjustment I got it to work, I changed the line: hDib = ImageToDIB(&bitmap, iImage, this); to hDib = DDBToDIB(bitmap, BI_RGB,NULL);. One problem is that I don´t think the printer shows the picture in it´s correct size. If I open the picture in a paint program it says that the picture is 2cm wide but on the paper is only about 0,5cm. I have sent the application to a testperson who also will test the printing, and i´m waiting for his comment.
Thanks one more time
-Tom
|
|
|
|
|
Already posted it yesterday, but did not find a right answer
So, basically, I have a dialog (MFC) which i want to reuse three times as a Propertypage, only difference will be the Caption. SetWindowText is not working to set the caption (crashes the app since the propertypage still has not been created through Cpropertysheet.DoModal()), doing the SetWindowText in the OnInitDialog from the Propertypage has no effect (but does not crash).
Any idea ?
~RaGE();
|
|
|
|
|
Hello,
did you try changing the parameters of the PROPSHEETPAGE struct? Every propertypage contains a member variable of that type, called m_psp. Before adding the page to it's corresponding sheet, you can add PSP_USETITLE to the dwFlags member of m_psp. Afterwards assign your title to the lpszTitle variable.
|
|
|
|
|
Yep, forgot this one, I've already tried that without result. Anyway , thank you for your answer.
~RaGE();
|
|
|
|