|
I doubt it's a security issue, because it's about writing a key in HKEY_LOCAL_MACHINE/Software/Microsoft/Windows/Run - it's about a key that starts my application when Windows starts. Any suggestions how can I do this in other way?
|
|
|
|
|
WriteProfileString() is only used for per-user data such as options for the program. To write to any key in the registry, use the registry APIs or CRegKey in ATL.
--Mike--
"alyson hannigan is so cute it's crazy" -- Googlism
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Hello there,
I've some Binary and Text data in some files.
What's the best algorithm to encrypt them ?
Regards,
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Blowfish works for me. There are Dept. of Commerce restrictions that may apply to you if you develop software in the US for export.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I found these encryption algorithms for both text and binary files, all written in C. Hope it helps:
http://membres.lycos.fr/pc1
(Opens in new window).
Isaac Sasson,
Small time programmer - complainer at large!
Sonork ID 100.13704
|
|
|
|
|
Thanks for reply
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Best by what measure?
Are you looking for serious security?
(Get the password from outside source,
pass through one-way hash, and use as
the key for a symmetric cipher like
Blowfish?) or...
If the key is a part of your program
(i.e. encoded somewhere reachable),
and you just want a bit of obfuscation,
why not get a little benefit and just
compress the data using some fast alg
like LZSS?
|
|
|
|
|
Cool
Thanks alooot for reply !
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Can anyone tell me what includes are needed for TrackMouseEvent or even the GET_X_LPARAM macros to be recognized...I have included winuser/windows.h I have linked with user32.lib...I am stumped. I am missing some kind of update here? Using MS VC++ 6.0 under Windows XP.
|
|
|
|
|
_TrackMouseEvent is in commctrl.h
GET_X_LPARAM is in windowsx.h
The latest platform SDK is not even needed. That's the search results for an old VC6 install.
Back to real work : D-21.
|
|
|
|
|
How can I retrieve the resource of a entry in the string table. That is knowing the name, "IDS_STRING1" to retrieve the int value and thus to be able to retrieve the caption of the specific entry.
Spiros Prantalos
|
|
|
|
|
LoadString API function or CString::LoadString method if using MFC.
Pavel
Sonork 100.15206
|
|
|
|
|
Using that I have to provide the IDS_STRING1 which actually is the int value. What I am saying is to have the name on a string that is CString hhh = "IDS_STRING1" and with that to be able to find the caption of that the entry that has the same name in the string table
Spiros Prantalos
|
|
|
|
|
You can't do that directly. The compiler never sees "IDS_STRING1", only the number that it is #define d as.
You'll need to create a lookup table (using std::map for example) to convert from the string to the numerical equivalent.
--Mike--
"alyson hannigan is so cute it's crazy" -- Googlism
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I feel kind of stupid asking this question, but I couldn't find it at msdn, nor any other webpages. How can I set the drop down height of a comboboxex that is on a dialog? Thanks,
-Ken Mazaika
|
|
|
|
|
Not such a stupid question. You need to get the handle (HWND) of the dropdown list. AFAICR this is only available on one of the WM_CTLCOLORLISTOBX messages. Check the MSDN docs. Once you have the HWND resize as normal.
Note that if you create the dialog manually (ie. m_cmb.Create(...)) then the height specified is the height that will be used for the dropdown list.
HTH
Jerry
|
|
|
|
|
If you're doing this from the dialog editor...
Click on the down-arrow for your combo-box. The size frame with switch modes to show the height of the drop-down.
Brad Bruce
|
|
|
|
|
Exactly what I wanted; Thanks
-Ken Mazaikak
|
|
|
|
|
Hi all,
I just added a dialog box to my project in the resource editor. I also added a button to the dialog. When I right-click the button and select "add event handler", I get the following error message:
"An error has occured in the script on this page:
[...]\Vc7\VCWizards\CommandWiz\HTML\1033\default.htm
Line: 327
Char: 4
Error: Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.
Code: 0"
I think the actual code that it is failing on is the JScript that adds the project class names into the event handler wizard.
Any thoughts on what might be causing this?
All the best,
Rewbs.
|
|
|
|
|
still beginning here so beware
how do i create a HMENU from a resourse id so i can set it in a dynamically created dialog during PreCreateWindow()
HMENU gMen = MAKEINTRESOURCE(IDR_STICKY_MENU);
cs.hMenu = gMen;
doesn't work
and i can't find alot in MSDN, or is this a completely bad idea?
i know i'll have to handle the messages myself, that doesn't worry me to much, but then again, could be my next entry...
thanks for any help
shotgun
|
|
|
|
|
|
You have to load the menu using the LoadMenu function.
HMENU gMen = LoadMenu(hInstance, MAKEINTRESOURCE(IDR_STICKY_MENU));
cs.hMenu = gMen;
hInstance is the instance of the app-file which contains the menu resource.
-Dominik
|
|
|
|
|
|
NOTICE: In the following example, I had to use double angle brackets because single angle brackets were not showing up.
If I have the following piece of code, and I were to instantiate 'X' as X<<char*>>
template<<class t="">>
class X
{
...
const T m;
...
};
==============================
it would yield 'm' as
char *const m;
===============================
However, suppose I don't want to end up with 'm' as a constant pointer to a character object, but wanted 'm' to end up as a pointer to a constant object of type character. How would I instantiate 'X'?
NOTE: I DON'T want to declare 'm' as a pointer, e.g.
const T *m;
and then instantiate 'X' as X<<char>>
Thanks.
William
|
|
|
|
|
I'm thinking you want an array:
template<class T, int n>
class X
{
const T m_Array[n];
};
Thus X<char, 32> MyInstance; would give you const char m_Array[32] .
|
|
|
|