|
I believed the reason for the "chinese" chars is because you have NOT established memory for the varable yet. Always, always zero out a varable before it is used: Example: CString str;(you've declared it and it resides in memory, but what is presently at that memory location?) just do this str = ""; or in Unicode: str = _T(""); Now that location is clean for str. I don't know anything about "Scintilla" I've always used the rich edit control methods. Codeproject has multiple examples that show how.
A C++ programming language novice, but striving to learn
|
|
|
|
|
Hi,
I need to use the following header file, in my
project: stdint.h . But, I've found several
of their versions online, and I am not sure which
one of them to use. I'd appreciate if someone
could provide me with a link to the real stdint.h
file.
Thanks!
|
|
|
|
|
Iwant to know how to distinguish between physical drive and logical drive
API like Getlogicaldrives and getdrivetype doesn't help me
how to know is this physical or virtual CDROM ?
nothing else
|
|
|
|
|
Hi,
I have a big problem. I am trying to use the simple method MoveFile but getting Error code 5: Access denied. I have Windows Vista and UAC enabled. If I right click on the app and select "Run as administrator" -> everything works fine.
My problem is, many users have normal accounts and don't run apps as an administrator. So my question is how can i implement the feature to move the file as a normal user?
Thanks.
bye,
gabbana
|
|
|
|
|
Where is the file being moved from/to? If it's the Program Files directory there's not much you can do about that.
Regards,
--Perspx
"I've got my kids brainwashed: You don't use Google, and you don't use an iPod." - Steve Ballmer
"Some people have told me they don't think a fat penguin really embodies the grace of Linux, which just tells me they have never seen an angry penguin charging at them in excess of 100mph." - Linus Torvalds
|
|
|
|
|
The files moving from C:\myfile.txt to C:\myapp\txt
So its my own directory...
|
|
|
|
|
If the file is set to "Read Only" this problem will occur. Vista is looking for permission to move that file, so something is telling Vista that it needs permission to move that file. Check the files property.
A C++ programming language novice, but striving to learn
|
|
|
|
|
i need help in converting a
"string" to "LPTSTR"
or "char *"
please help
|
|
|
|
|
|
Before you try to do some nasty casting or conversion in your code, I suggest that you take a look at this article[^]. Things will get much clearer afterwards
|
|
|
|
|
"before posting, answer this question.
are you asking about converting strings?
see this article..."
|
|
|
|
|
I think we should add that in the posting guidelines, yes
I don't know how many times I already linked to that article but it is a lot.
|
|
|
|
|
I am using tubo c explorer
I want to get a file name from file list box
like FileListBox1->FileName which is an
AnsiString and use it in create process
which needs lptstr.I also have to provide
the console exe and parameters.
I m new to c++ I used javascript before
please help.
|
|
|
|
|
Hi,
I am trying to open this key : "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MRxDAV\EncryptedDirectories"
I am getting error code '5' when I try to access this key which means 'Access Denied'. However I am able to access other subkey in same hierarchy eg. "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\MRxDAV\Security"
Can anybody tell how to avoid this '5' error or whats the cause of it ?
Also I am the admin on the machine on which I am scanning this regkey.
Thanks,
Supriya Tonape
|
|
|
|
|
You need to run your app with elevated privileges.
Right click your app and choose "Run as Administrator"
and it should work.
What does your RegOpenKeyEx() code look like? Are you
requesting more access rights than you need?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yes I am an Admin on the machine I am running this query/app..
Here is a code :
//Attempt to open the key on the target.
int retval = RegOpenKeyEx(
hkRegHive, // Hive of the RegKey
pszRegFullKeyPath, // Full path of the key excluding Hive name
0, // Reserved
KEY_READ | (Node32Bit ? KEY_WOW64_64KEY : 0), // Access rights to the key
&hkScanKey); // Handle to opened key
if(retval != NSCOK)
return FALSE;
Ouput : retval = 5
regards,
Supriya Tonape.
|
|
|
|
|
Supriya Tonape wrote: Yes I am an Admin on the machine I am running this query/
That doesn't matter on Vista. You still need to run the process with
elevated privileges to perform certain operations, even if you're an administrator.
Try KEY_QUERY_VALUE instead of KEY_READ. If that doesn't work then your
app requires elevated privileges (you can set this up in the app manifest to
force a UAC prompt).
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I am running this application on XP right now but yes includes Vista too though. I will try what you told. will get back to you.
Regards,
Supriya Tonape
|
|
|
|
|
nope KEY_QUERY_VALUE doesnt work.. i am not clear abt 2nd option you told..
|
|
|
|
|
You should be able to read that key.
What's the value of Node32Bit at the time of the call?
What are the permissions set on that key? You can view them in regedit.
Are you looking in your own registry or a registry on a remote machine?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I am taking break will reply you after some time. thx for the help!!! appreciate it. (for the time being resolved the prob though.)
|
|
|
|
|
No one cares. Read the site guidelines.
Blog link to be reinstated at a later date.
|
|
|
|
|
Hi,
can I derive a class from CButton and make it not take the focus? Would like to make it only accessible by mouse click, the button should not take the focus from the control which has it, no tab stop is needed. Thanks for help!
|
|
|
|
|
What if you create the button without the WS_TABSTOP style
(or using SetWindowLong() to remove the style)?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Mark, the button was created without: the resource file has NOT WS_TABSTOP .
|
|
|
|