|
This must be a .Net or VS7 thing as VS6 has no CRegKey class with such a constructor or a SetStringValue() method. Yes?
BTW, the use of new and delete here is unnecessary. This will work just fine:
CRegKey rc(HKEY_LOCAL_MACHINE);
rc.Open(HKEY_LOCAL_MACHINE, "Path\\to\\key");
rc.SetStringValue("Name", "CMS Document and Media Server");
rc.Close(); assuming the original problem goes away.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I found the problem. It appears to be a bug or undocumented feature.
I actually have 200+ registry entries that were being written. It turns out that I had two that were writing out the exact same name and value in the same key, before my CRegKey was closed and written to disk. Apparently, that caused some sort of undefined behavior. Go figure!
In terms of new/delete, yeah, force of habit.
Thanks.
--Kaleb
|
|
|
|
|
I need the MainFrame to display just a minimize button ,
I thought this shld be done in the PreCreateWindow Call
But how do i set the styles ?
cs.style = WS_OVERLAPPED | WS_SYSMENU | WS_BORDER;
cs.style&=WS_MAXIMIZEBOX ;
// what is the ID for the CLOSE button ?
Please help
Thanks
|
|
|
|
|
// first, add the Minimize style ..
cs.style = WS_OVERLAPPED | WS_SYSMENU | WS_BORDER | WS_MINIMIZEBOX;
// .. then disable the Maximize style, DON'T forget the '~' operator!
cs.style &= ~WS_MAXIMIZEBOX ;
// Disable the Close button,
//do it somewhere in OnInitialUpdate of the main view
HMENU hSysMenu = ::GetSystemMenu(AfxGetMainWnd()->m_hWnd, FALSE);
::EnableMenuItem (hSysMenu, SC_CLOSE, MF_BYCOMMAND | MF_GRAYED);
|
|
|
|
|
Thanks , Sorry about forgetting the ~ for the MAXIMIZEBOX
your solution kinda solves what I need , but is there a way where I can eliminate the Maximize and the Close buttons from being even shown . They seemed to be grayed right at the moment !
There ware people who are smart but cant get the job done , and there are people who arent smart but get the Job done. We dont need both types of people !
|
|
|
|
|
One solution is SC_CLOSE. Also, in your code, negate WS_MAXIMIZEBOX.
cs.style &= ~WS_MAXIMIZEBOX;
Kuphryn
|
|
|
|
|
Using stroul gives me a wrong result. I had an _int64 value which I put into a string as a hex value and now I want to get it back again. I did:
unsigned __int64 alg_mask = strtoul (alg_str, (char **) NULL, 0);
which is not giving me back the right value I suppose because its string-to-long. How can I get this value out?
thanks,
sb
I put it in as
alg_str 0xf00000000
and my stroul gives me:
alg_mask 4294967295 which is FFFFFFFF
when actually I should be getting 64424509440.
|
|
|
|
|
Try using _strtoi64 or _wcstoi64
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Thanks. Will check it out.
sb
|
|
|
|
|
I'm on win2k and I do have stdlib included but I get strtoi64 is undeclared identifier. Another odd thing is that it didnt come up in the help....instead I found it at the microsoft site. Its vc6.
thanks.
sb
|
|
|
|
|
ns wrote:
strtoul (alg_str, (char **) NULL, 0);
strtoul (alg_str, (char **) NULL, 16);
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Ah Thanks! I will try it!
sb
|
|
|
|
|
I wantto create a project to fill a text box of any given site Eg. Google's search text box. so tell me how can i create this, if possible please send a sample programm to me by mail.
Anurag
anu
|
|
|
|
|
Anurag Khare wrote:
I wantto create a project to fill a text box of any given site
I'm unclear as to what you want in the text box.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
( one of those friday "Duh" question ... )
I have a populated tree control, items are inserted in each sub-tree as they are read from the "dataset"; and are not sorted alphabetically.
I want to sort the items, so I use CTreeCtrl::SortChildren ( or the other one with the user defined sort callback ); which is working fine.
The question really, is, Can I "unsort" the items without reloading the tree ( or subtree ) ?
I would say no at first, but we never know ...
Thanks.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Is it possible to check if you are about to download something from the internet?
|
|
|
|
|
Check here, here, and here.
It's possible that no ones knows a solution to your problem (at least on this board).
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Is there an easy way to compare two unicode strings that isn't case sensative. That is "fIlEnAmE" and "FiLeNaMe" should be considered the same?
My program presents writes a level 3 ISO9660 file system. Windows is unable to deal with this correctly. (I seem to be the only one actually writing level 3 ISO9660) Thus I need to read it myself. This works just fine in normal ISO9660, but as soon as I add joliet extentions I have to change to unicode, and there I am case preserving. (as joliet requires) However windows is not case sensative, and there I'm not sure what to do.
The easy solution is to convert to ASCII, which is easy to convert to upper case, but that won't work for anything other than latin derived languages (I wouldn't be surprized if some of them had special case that didn't work), with unicode I'm already close to supporting other languages correctly, I'd like to go the rest of the way if I can.
Thus the question, can I access whatever function windows uses to convert case, in unicode?
|
|
|
|
|
I ran into something liek this for some code I had to write for my project, the VCF.
int Win32LocalePeer::collateCaseInsensitive( const UnicodeString& s1, const UnicodeString& s2 )
{
int result = 0;
if ( System::isUnicodeEnabled() ) {
result = ::CompareStringW( lcid_, NORM_IGNORECASE, s1.c_str(), s1.size(), s2.c_str(), s2.size() );
}
else {
AnsiString tmp1 = s1;
AnsiString tmp2 = s2;
result = ::CompareStringA( lcid_, NORM_IGNORECASE, tmp1.c_str(), tmp1.size(), tmp2.c_str(), tmp2.size() );
}
return result;
}
DOn't know if this is exactly what you want but here's hoping!
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
lcid_ is a member value that is a valid LCID for the locale you want.
UnicodeString is just a wrapper around std::basic_string<wchar_t>.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
Thank you. I knew there had to be an easy way, but I didn't find it when I searched. (I didn't search the right places to find it)
I don't know that it works, but if it doesn't the bugs are mine now...
|
|
|
|
|
Hi
Just a quickie - how secure is sending a file over a named pipe? I'm not bothered that fussed about delivery guarantee, but want to be sure nobody else can intercept the message on the way, or modify it before it gets there.
Hope this makes sense.
Regards
Malc
The sooner you fall behind, the longer you have to catch up
|
|
|
|
|
I say no. Messages can be intercepted. For secure data transfer, check out socket using SSL.
Kuphryn
|
|
|
|
|
How can I empy all information that I have in my List controll?
This is what I have try to to.
i=m_List.GetCount();
for(int l=0; l
|
|
|
|
|