|
Is there any way to rename a regsitry key that already exists? The same way a user can do when he presses F2 while in the Registry Editor?
I could not find any Win32 API function that does this, nor an automation interface of regedit...
/=/=/=/=
Deus
/=/=/=/=
|
|
|
|
|
There is no such way. Regedit at first creates new key, copies all subkeys, and then deletes old key.
|
|
|
|
|
I find it hard to believe since it is done instantaneously - even if the renamed key contains a full hierarchy. Try it yourself: create some huge subtree and then rename its root key. You'll see that it happens immediately.
/=/=/=/=
Deus
/=/=/=/=
|
|
|
|
|
When I do that my program works very fast too )) ..And why you suppose it works slowly? Most of Registry is cached in memory therefore it's just memory copying.
But if you don't believe me, run Regmon and see for yourself
|
|
|
|
|
Hi all,
Has anybody had any problems using the SGI STL with VC6?
bibamus, edamus, cras moriemur [eat, drink, for tomorrow we die]
|
|
|
|
|
How do I creata an add-in for Visual Studio .NET in C++.
I mean I create a project(Other Projects/Extensibility Projects/Visual Studio .NET Add-in) and when I try to compile it, it says:
e:\trash\MyAddin1\stdafx.h(45) : error C3506: there is no typelib registered for LIBID '{AC0714F2-3D04-11D1-AE7D-00A0C90F26F4}'
e:\trash\MyAddin1\stdafx.h(45) : fatal error C1104: fatal error importing libid: 'AC0714F2-3D04-11D1-AE7D-00A0C90F26F4'
Can anyone help me ?
|
|
|
|
|
I want to use XML to transport some data across HTTP protocol. When text in some element contains US ASCI characters then all is OK. But when some language- specific characters appear i get error.
I want to encode contents of some elements (these that contain these unfortunate characters) to BASE.64.
when I do the following, I get error.
_variant_t var_val=GetSomeText_WithStrangeChars()
..check errorcodes...
pNewNodeOut->put_dataType(L"bin.base64");
..check errorcodes... //ok it works so far
pNewNodeOut->put_nodeTypedValue(var_val); //HERE CRASH
//It is here where HRESULT is E_FAIL
The first question is: What to do to avoid error, and
to sucessfully put value of _variant_t (containing BSTR)
into element whose type is set to bin.base64 ?
The last question is:
Shall I be able to automatically get the value of the
element without explicit converting it from BASE.64 ?
I mean : Shall MSXML parser do the conversion automatically for me when I will call nodeTypedValue property ?
Thanks
Michal Januszczyk
|
|
|
|
|
I'm sorry for the generalization, but I need help using the ShellExecute() function (to launch a .hlp file).
ShellExecute(
?,
"open",
"Helpfile.hlp",
NULL,
?, //dir
SW_SHOW
);
I put a '?' where I don't know what I should put
The first is the window handle thingy, I really don't want the opened file attached to anything, how do i do this?
The second ? is the directory... I have no idea what to set this too. If it's the programs current dir, how do i find that?
Thanks
|
|
|
|
|
Set NULL.
To know current dir - invoke GetModuleFileName()
|
|
|
|
|
briefcase wrote:
The first is the window handle thingy, I really don't want the opened file attached to anything, how do i do this?
Simply put NULL there!
It works just fine!
briefcase wrote:
The second ? is the directory... I have no idea what to set this too. If it's the programs current dir, how do i find that?
Simply put NULL there too!
Those aren't necessary when you do such a thing that you do!
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++!
|
|
|
|
|
hmm... alright, what am i doing wrong?
ShellExecute(
NULL,
"open",
"myhelp.hlp",
NULL,
NULL, //dir
SW_SHOW
);
myhelp.hlp exists in the same dir as the calling program.
|
|
|
|
|
that's right code. And what is happend then?
(Note that lpVerb can be setted to NULL too )
|
|
|
|
|
HWND(0) for the first argument - then any windows are parented by the desktop
NULL is usually fine for the directory parameter - it's the 'default directory' (i.e. if you were at the command prompt, it's what would be listed if you did 'dir .'), which is usually not needed if you've specified an absolute path (i.e. drive:\path...\filename.extension or \\server\path...\filename.extension for the file parameter). To get the current directory (if you need to), use the GetCurrentDirectory Win32 function.
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
How to get rid of ghost windows in XP? Thx
mIchAel Liu
|
|
|
|
|
Michael Liu wrote:
How to get rid of ghost windows in XP?
What's a ghost window?
If you continue to do the same things you always did, don't be surprised if you get the same results you always got.
|
|
|
|
|
Search back for one of the last previous times he asked this same question
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
benjymous wrote:
Search back for one of the last previous times he asked this same question
After searching his messages as you suggested, I came to this conclusion - sometimes there's a very good reason why a question goes unanswered on CP.
Thanks!
If you continue to do the same things you always did, don't be surprised if you get the same results you always got.
|
|
|
|
|
The problem is this ghost windows only happened in XP system, not Win2000&98/95. And began at Oct.2001, MSDN started to say something about the ghost window in its doc, but no more infomation to deal with ghost windows. (read the WM_PAINT in MSDN). Thanks
mIchAel Liu
|
|
|
|
|
Hi
I'd like to disable refresh (F5) command in CHTMLView and CDHtmlDialog application.
I created mixed class CDHtmlView wich is derived from CHTMLView and has event sinking from CDHtmlDialog.
I try to catch key down message in DHTML_EVENT_MAP:
DHTML_EVENT(DISPID_HTMLELEMENTEVENTS_ONKEYDOWN,NULL,OnAllKeyDown)
But the OnAllKeyDown function is never called.
How to disable page refresh ????
|
|
|
|
|
I found
DocHostUIHandler::TranslateAccelerator
and return S_OK
very simple ))
|
|
|
|
|
Isn't CAxWindow the ATL equivalent of CWnd? it's just in MFC I was able to call InvokeHelper, but in CAXWindow this isn't available to me.
Can anyone offer any advice?
|
|
|
|
|
When I call GetFileSize in debug mode it returns the correct value of 516. In realease mode it returns some HUGE value
DWORD numBlocks = GetFileSize(hOriginal, NULL)/64;
What could be the problem? I'm a bit stumped.
And when God, who created the entire universe with all of its glories, decides to deliver a message to humanity, He WILL NOT use, as His messenger, a person on cable TV with a bad hairstyle.
|
|
|
|
|
i'll guess that hOriginal is NULL
-c
Being just contaminates the void. --Robyn Hitchcock
|
|
|
|
|
Hmmm, why would it be NULL only in DEBUG mode though?
And when God, who created the entire universe with all of its glories, decides to deliver a message to humanity, He WILL NOT use, as His messenger, a person on cable TV with a bad hairstyle.
|
|
|
|
|
how are you setting hOriginal?
Being just contaminates the void. --Robyn Hitchcock
|
|
|
|