|
i tested MoveFileEx function. it can not move directory in different drive, with LastError = 5
Zo.Naderi-Iran
|
|
|
|
|
That's 'access denied' maybe your application hasn't the rights to access the source/destination folder.
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]
|
|
|
|
|
no,
thank you.
i found my solution:
it is SHFiliOperation function.
Zo.Naderi-Iran
|
|
|
|
|
thank you all.
i found my solution:
it is SHFiliOperation function.
SHFILEOPSTRUCT SHDirOp;
ZeroMemory(&SHDirOp, sizeof(SHFILEOPSTRUCT));
SHDirOp.hwnd = NULL;
SHDirOp.wFunc = FO_COPY;
SHDirOp.pFrom = "D:\\SourceDir\0";
SHDirOp.pTo = "C:\\DesDir\0";
SHDirOp.fFlags = FOF_MULTIDESTFILES|FOF_NOCONFIRMMKDIR|FOF_NOCONFIRMATION;
if (SHFileOperation(&SHDirOp) == 0)
AfxMessagBo("success");
Zo.Naderi-Iran
|
|
|
|
|
Hello everyone.
My MFC application is developed in Vista, VS 2008.
But when I install it in XP and run it, there are no icons showing at all.
Tested in Win 7 and Vista-all working fine.
If anybody has any idea how to manage this problem, please, help.
Thanks.
|
|
|
|
|
Are you talking about icons in a compiled resource file? What size/color depth do your icons have?
|
|
|
|
|
Thank you for your reply!
Yes. In compiled resource.
I made a Setup file and installed it both in XP and 7.
As I said, in 7 it is working fine.
Icon size: 32x32
color depth: 4 bit.
It's a standard XP system icon. I have copied it from a XP machine.
|
|
|
|
|
HI,
I had opened an existing console project and i was unable to add a new file to source files folder. i got the following error.
Microsoft (R) Developer Studio has encountered a problem and needs to close. We are sorry for the inconvenience.
HOw to resolve this error.
kindly reply
thnks in adv.
|
|
|
|
|
Maybe you need to re-install Visual Studio.
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]
|
|
|
|
|
dear clarke,
i have done that exercise already.
do u hav any other sol.
thnks
|
|
|
|
|
danandu wrote: dear clarke,
I'm not Iain (nor Alfonso).
danandu wrote: do u hav any other sol.
Just a silly attempt: try to create, from scratch, a new console project and then add to it all the needed files.
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]
|
|
|
|
|
CPallini wrote: dear clarke,
You would't be related to the Griswold[^] family now. Would you?
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
"is an intensely proud, loyal, and lovable upper-middle class family man"
Uhm, maybe!
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]
|
|
|
|
|
Hi pallini,
im sorry for the addressing u wrongly,
i hv tried this also and got the same error.
hope we get the sol on this.
|
|
|
|
|
Oh don't worry, I was just kidding.
Are you able to create a fresh new project with just the old (working) source files?
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]
|
|
|
|
|
hi,
i hv told you already that i have done this exercise already.
if u have any new ideas kindly pass it on.
|
|
|
|
|
i want to write SQL predicate FREETEXT in String query in MFC, using CString.Formate function....i m un able to write predicate in it...
|
|
|
|
|
Hey Guys I am having some issues with some Char* output from a function I am trying to write. So I have a little program for example:
Foo(char* outPut)
{
outPut = "fooOutPut";
}
int main()
{
char[32] testString;
Foo(testString);
cout<
|
|
|
|
|
Hi,
output is a pointer, you make it point to a string literal ("fooOutput").
testString is not a pointer, it is a 32-character buffer; it can be used like a pointer, however it cannot be changed, it will always point to that buffer.
The solution to this discrepancy depends on what you want:
1. maybe you want Foo to stuff its data into whatever buffer you pass it; you then need strcpy() or something similar, not a simple assignment.
2. maybe you want main to hold a pointer, then you need to declare char* testString ; however that would still not be sufficient as the pointer gets passed by value, i.e. Foo can read it, but whatever it writes to the pointer won't alter the pointer in Main. To solve that, you either need an extra indirection (a second asterisk), or simply use the return value instead of a parameter.
|
|
|
|
|
Hi
I try reading file through windows programming in vc++. My code like
DWORD wmWritten;
char strVal[1024];
dir = CreateFile(textBuffer,GENERIC_READ|GENERIC_WRITE,FILE_SHARE_READ,NULL,OPEN_ALWAYS,FILE_ATTRIBUTE_NORMAL,NULL);
ReadFile(dir,strVal,1024,&wmWritten,NULL);
textBuffer is my input file.
i got all lines from text file. But want find some delimiter or i want return particular line text or (delimiter line text)
Please give idea or sample code
Regards,
M.Mathivanan
|
|
|
|
|
Hi,
you could scan the input, i.e. have a loop look at each of the characters in strVal after you filled it (make sure to use the return value of ReadFile as there may be less than 1024 characters read).
it would be easier to use some higher-level I/O functions. Assuming you want C code, you could use fopen(), fread(), or better yet fgetline(). Look them up in your C book and in MSDN.
And always check the return value you get from almost all Windows or C functions.
|
|
|
|
|
|
mathivanaan wrote: But want find some delimiter...
Have you tried strchr() ?
"One man's wage rise is another man's price increase." - Harold Wilson
"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
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Hello all,
VC6, MFC, XP
My application has a Formview based view with many static controls all over it. The CStatic controls are used in a similar fashion as CButtons are used: The user makes selections by pressing on them. I really do have my reasons for not using the CButton control, but even if I were to use it, I need to find a way to get notified when the 'button' is released.
When they are pressed, I do get the BN_CLICKED messages, but I can not find any messages (in WinUser.h) that could be returned when the buttons are released. Is there such a message? Any suggestions or tips to get or simulate this message would be appreciated and be a great help! I'm working with a timer based work around, however the application really needs to track exactly how long the button is down.
Best Regards,
Paul
|
|
|
|
|
I don't remember the details, however there is bound to be some mouse down and mouse up events.
|
|
|
|