|
Ummmm - the vector hasn't been destructed when you call _CrtDumpMemoryLeaks...
Try this:
#include <iostream>
#include <tchar.h>
#include <vector>
int _tmain(int argc, _TCHAR* argv[])
{
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
{
vector<char *> vc;
vc.push_back("test");
}
_CrtDumpMemoryLeaks();
return 0;
}
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
Faster than a speeding bullet
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hello everybody. I am beginner on smartphone application with MFC. I need to change both text color of a tab control to white and also background of that tab control to black for smartphone application implemented with MFC. How can I do it? Thanks a lot for your help.
|
|
|
|
|
Hello All,
I have a query regarding File/Folder permissions.
I have a folder on which a particular user don’t have ‘MODIFY’ permission.
I want to read programmatically whether the particular user has the ‘MODIFY’ permission on that folder on not.
Currently I am using following code.
res = _waccess( L"E:\\3D Library\\Temp.txt”, 06 );
Temp.txt is a file in the Folder on which user dont have 'MODIFY' access rights.
This is returning the same value for all users irrespective of the MODIFY permission.
I wanted to use ‘GetFileAttributes(…)’ but I don’t understand how to use it to read ‘MODIFY’ permission.
My query is:
How read the ‘MODIFY’ permission?
Please help.
Thanks,
|
|
|
|
|
To query and set we can use
GetFileAttributes and SetFileAttributes respectively.
dwAttrs = GetFileAttributes(FileData.cFileName);
if (!(dwAttrs & FILE_ATTRIBUTE_READONLY))
{
SetFileAttributes(szNewPath,
dwAttrs | FILE_ATTRIBUTE_READONLY);
}
For user permission on particular folder try this
Check User’s Permissions On A File or Folder[^]
|
|
|
|
|
Thanks For the response.
I can check the read access using this method.
But I want to specifically check the "MODIFY' access.
Is there any way to check the "MODIFY" access.
Thanks...
|
|
|
|
|
if you want to check whether you have MODIFY permission on a folder then call GetFileAttributesEx API
check whether FILE_ATTRIBUTE_READONLY is not set, else you can write and delete, that means, you can modify.
|
|
|
|
|
This information is incorrect. A file can have the read-only attribute not set, but if write permission has been denied, you will not be able to modify it.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Attributes are not the same as permissions, so GetFileAttributes() is not going to do you any good. You'll need to query the file's ACL. Check out GetFileSD() , GetSecurityDescriptorDacl() , GetAclInformation() , and GetAce() .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
|
Hi,
I really think you should read the forum guidelines and understand how a query has to be send. There is nobody here that will do your work. People here will assist you in doing your task.
All the best
|
|
|
|
|
Hi all !
How do i remove (completely) the menu from an existing MFC SDI application ? (I need only the Toolbar)
Thanks,
Amit
|
|
|
|
|
As per the MSDN it should like below:-
BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
{
if( !CFrameWnd::PreCreateWindow(cs) )
return FALSE;
if(NULL != cs.hMenu )
{
::DestroyMenu(cs.hMenu); // delete menu if loaded
cs.hMenu = NULL; // no menu for this window
}
return TRUE;
}
|
|
|
|
|
Hi,
I am making my application unicode supporting one. i have an edit box which displays chinese characters etc., but not arabic characters...
why it is not showing arabic characters alone? does anyone have any idea about this?
Note: i have my editbox's default font as Arial Unicode MS.
Thanks,
Rakesh.
|
|
|
|
|
define _UNICODE.
wchar_t* p=L"Hello!".
|
|
|
|
|
What does it display instead of Arabic letters? Question marks or some garbage character?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi Rajesh,
it displays some junk characters... in my application, it was showing some vertical lines...
|
|
|
|
|
So, if it doesn't display question marks, it could be as simple as that the machine is not having the language pack installed. Have you tried Michael Schubert's suggestion? I didn't suggest it right away to ensure that you weren't seeing question marks instead.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
but one thing is confusing me alot rajesh...
i have two views for my application..say x and y.(different views)...x is created in runtime...i will create y.. based on y, x will be created actually....i get the inputs from xml file for x view..say font details, bgcolor details etc., i changed font to arial unicode ms everywhere but still its not showing arabic characters alone..
in y view, its showing arabic characters and in another view (x),its showing junk characters..
Thanks,
Rakesh.
|
|
|
|
|
Well, I'm not sure. I've never worked with Arabic characters, but have you checked if it's got anything to do with setting the "reading direct order"? (Arabic is right to left).
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
I think you have to install the language and font support in Windows:
Control Panel -> Regional and Language Options -> Languages -> Install files for complex script and right-to-left languages
|
|
|
|
|
i think your machine doesn't contains the Arabic font, please install and try.
|
|
|
|
|
wat is a clipping region?
|
|
|
|
|
See, for instance here.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|