|
Thanks Michael, this solved my issue.
i mixed up the usage on "pointer-to-function" and "pointer-to-member"
|
|
|
|
|
hi,
where to find unicows.lib for download?
thanks
|
|
|
|
|
Grab a recent platform SDK (contains DLL and lib file), or google for it.
Your sincerity about keeping the soapbox organized and civilized is so obvious. I solute your effort.
-- Anonymous, 10/18/03
|
|
|
|
|
hi,
can somebody,please tell me how to change for example,scales or width of 2D bars for tihis activeX control within the code?
|
|
|
|
|
Is there a limit on the size a key value or registry tree can have? If so, what is the maximum? To be more precise, I would like to know which key type to use (REG_DWORD, REG_SZ, etc.) to store large binary values, say more than 20 MB in size.
|
|
|
|
|
No, do not use the registry to store that much data. Use a data file in the user's Application Data dir. In 9x a single value has a limit - either 32K or 64K, I forget which. In NT the size of the entire registry has a limit, which defaults to something less than 20 MB.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
#include "witty-quote.h"
|
|
|
|
|
Michael Dunn wrote:
In NT the size of the entire registry has a limit, which defaults to something less than 20 MB.
My Windows 2000 box is currently sitting at 40MB.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
as far as i know there is no "real" limit for the registry size on NT.. read the ReactOS source, to get information about that!
Don't try it, just do it!
|
|
|
|
|
dafunkt wrote:
to store large binary values, say more than 20 MB in size
Why not just store them as binaries in a folder location?? And then store the string of that folder in the registry???
:walks away shocked at the concept of storing multiple 20 meg binaries in the registry:
The kindest thing you can do for a stupid person, and for the gene pool, is to let him expire of his own dumb choices.
[Roger Wright on stupid people]
We're like private member functions
[John Theal on R&D]
We're figuring out the parent thing as we go though. Kinda like setting up Linux for the first time ya' know...
[Nitron]
|
|
|
|
|
Thank you for your help first. I'd like to get the application icon (small icon on title bar) of any application. I used the API function SendMessage with WM_GETICON message to the window of that application, some applications return the handle of its application icon (eg: Windows Explorer, ...), but some do not (eg: MS Outlook, NotePad,...). Please tell me other ways to do that. Thanks a lot.
chaunguyen
|
|
|
|
|
You could go about it laterally. Assuming WM_GETICON fails...
Get the file of the executable (GetModuleFileNameEx), and pick the first icon resource in it.
Iain.
|
|
|
|
|
Thanks Iain for your early help. Your solution works, but in some case it return an icon which is not the current application icon. Anyway, that's fine, thanks.
Chau Nguyen
|
|
|
|
|
Try using SHGetFileInfo .
Software Zen: delete this;
|
|
|
|
|
Thanks a lot, Gary. Your suggestion is great. It works.
chaunguyen
|
|
|
|
|
I'm building a mfc custom control, and it includes some custom messages that are sent out to a designated CWnd when some events are triggered. for now, i've defined them as something like
#define WM_BLAH_1 WM_USER+100
#define WM_BLAH_2 WM_USER+101
....
...
what's a recommended/proper way to define my own custom messages? I'm hoping to make this so that other people can use the control without worrying about custom window message colliding with other custom messages.
thanks in advance,
|
|
|
|
|
|
ok, so im trying to add / delete some registry data on the fly in my application... my add code is working perfectly.
however, my remove code compiles 0 errors, 0 warnings, but just doesnt delete the subkey / value i want it too.
i can see it there, i gave it the right name, it executes the code, and just doesnt delete the data.
um , please help ...
HKEY hKey;
LONG lnRes = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", 0L,
KEY_ALL_ACCESS,
&hKey
);
LPCTSTR keyname = "xlaunch";
RegDeleteKey(hKey, keyname);
RegCloseKey(hKey);
thanks
todo....
:: insert inspirational text here ::
|
|
|
|
|
Hmm, it would be helpful if you'd indicate what value RegDeleteKey() is returning. Also, are you ensuring that lnRes is ERROR_SUCCESS before attempting to use hKey ?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
yes, i made sure lnRes was ERROR_SUCCESS....,
i actually didnt catch a return from RegDeleteKey()
ill be messing w/ it some more tonight, and if I cant figure it out
ill be sure to include that in my next post.
todo....
:: insert inspirational text here ::
|
|
|
|
|
What operating system are you using? If I remember correctly deleting keys works differently in win9X than NT. Are their any values inside the key?
John
|
|
|
|
|
98SE at home, where im developing this app.
MSDN said...
Included in Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, and Windows 95, Windows Server 2003, Windows 2000 Server, and Windows NT Server.
??
todo....
:: insert inspirational text here ::
|
|
|
|
|
Yes, it is included in all operating systems but functions differently. I beleive it depends on if the Key has values. In one operating system it removes the whole tree in another it does not.
John
|
|
|
|
|
i browsed through it , i probably shouldve read better, i thought I could just specify a subkey to delete with an initialized key handle, but i see its not that easy
HKEY hKey;
LONG lnRes = RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", 0L,
KEY_ALL_ACCESS,
&hKey
);
LPCTSTR keyname = "xlaunch";
RegDeleteKey(hKey, keyname);
RegCloseKey(hKey);
xlaunch is my subkey, that i created beforehand in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
??
i may not even have the concepts right than, but i thought the hKey was the main key, xlaunch would be my subkey that hold the data.. ?
this is my first attempt at windows registry manipulation
todo....
:: insert inspirational text here ::
|
|
|
|
|
I believe there is a free class here that will delete the key correctly.
John
|
|
|
|
|
The implementation I have now is rather un-efficient, just wondering if you know of a better way?
1) Make copy of CString
2) Find all \'(escaped single quotes) and replace with placeholder *'s
3) In a while loop find existing single quotes and take note of start and finish indexes
4) each start and finish pair will be extracted and further analyzed
This is a quick and dirty approach but I like optimized. I Don't expect anyone to bother sitting and trying to optimize it for me, but if you've had experience in extracting strings from strings please show me how in some simple code
Thanks
I'm drinking triples, seeing double and acting single
|
|
|
|