|
Reposting may not help you. Rephrasing the query to something better may help you though...
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
|
Not unless you read the guidelines[^] and rephrase your query to be in accordance with it.
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
REPOST! Your question asked earlier was much clear.
Actual query:
vvlnkishore wrote:i am trying to embed mspaint into an mfc application. in that i wanted to load a bitmap image and when i click at a position in the image with a mouse i want to read the position coordinates. is it possible ? if so please help me
load your bitmap into a picture control or a static control and then handle the WM_LBUTTONDOWN message on that control.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
vvlnkishore wrote: but our people wanted it to be done just by mouse click using mspaint control. can you help me in this.
Running Mspaint.exe is easy enough, but how are you planning on getting your image to 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
|
|
|
|
|
i will call it using shellexecute & give the location of the image to be opened. then it will open. but i want some more from it. i want to extract pixel coordinates when i click at a point using mouse.
|
|
|
|
|
Why you want to call mspaint I think its better you write it yourself.
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
vvlnkishore wrote: but our people wanted it to be done just by mouse click
My reply[^] for your previous post.
vvlnkishore wrote: can you help me in this.
I fear I can't any more! Sorry boss!!
|
|
|
|
|
hi, I want find out all files of the dictonary to compare existing the specific file,I used WIN32_FIND_DATA about window API,as it:
<prex>
char path[MAXPATH];
GetCurrentDirectory(MAXPATH,path)
WIN32_FIND_DATA findFileData;
findFileData.dwFileAttributes=FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_READONLY;
HANDLE fHandle=FindFirstFile(path,&findFileData);
if(fHandle!=INVALID_HANDLE_VALUE){
do{
if(!strcmp(findFileData.cFileName,strFilename)){
if(DeleteFile(strFilename)){
MessageBox(NULL,"delete file success","UDatabase",MB_OK);
break;
}
}
}while(FindNextFile(fHandle,&findFileData));
FindClose(fHandle);
}
but it ocur exception :0xC0000005: Access violation writing location 0x00405f0c at if(fHandle!=INVALID_HANDLE_VALUE),can you help me please ,thank you !
david zhang
|
|
|
|
|
You can have a look here[^] and here[^]
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
yeah ,I will look it ,thank you very much
best wishes!
david zhang
|
|
|
|
|
I have checked your code, its fine and no access violation caused so far. By the way, At present your code does not check all the files available in the current directory, I changed the code like -
GetCurrentDirectory(MAX_PATH,path);
<font color='red'>strcat(path,_T("\\*.*"));</font>
WIN32_FIND_DATA findFileData;
findFileData.dwFileAttributes=FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_READONLY;
HANDLE fHandle=FindFirstFile(path,&findFileData);
Now it compares all available files with strFilename .
Just a suggestion...
|
|
|
|
|
The following may or may not address your issue, but here are some things I've noticed.
Firstly the following is pointless:
fresh888888 wrote: findFileData.dwFileAttributes=FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_READONLY;
The documentation for FindFirstFile[^] states that:
LPWIN32_FIND_DATA lpFindFileData is an out only parameter.- The search is performed strictly on the name of the file, not on any attributes such as a date or a file type (for other options, see FindFirstFileEx).
Secondly your pattern (the first parameter passed to FindFirstFile[^]) contains no wildcard. You probably mean something like this:
char path[MAXPATH];
GetCurrentDirectory(MAXPATH, path);
PathAppend(path, "*");
Steve
|
|
|
|
|
fresh888888 wrote: if(!strcmp(findFileData.cFileName,strFilename)){
strcmp() is not a boolean function, thus should not be treated like one.
"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 anshuman_,I have found result with the exception and known differently for between char* path="" to char path[255]="" ,thanks
<prex>
char * path="";
sprintf(path,"%s\\*",GetCurrentDirectory(MAXPATH,str));
it have error 0xC0000005: Access violation writing location
but it's right
char path[255]="";
sprintf(path,"%s\\*",GetCurrentDirectory
perfect...
char path[MAXPATH];
GetCurrentDirectory(MAXPATH,path)
WIN32_FIND_DATA findFileData;
char strFilename[255]="";
SYSTEMTIME stime;
GetLocalTime(&stime);
CString strTime="";
strTime.Format("%4d%02d%02d",stime.wYear,stime.wMonth,stime.wDay);
sprintf(strFilename,"%s\\report_invoice_%s%s.xls",path,dp->lineText,strTime);
HANDLE fHandle=FindFirstFile(strFilename,&findFileData);
if(fHandle!=INVALID_HANDLE_VALUE){
if(DeleteFile(strFilename)){
MessageBox(NULL,"删除文件成功","UDatabase",MB_OK);
}
FindClose(fHandle);
}
|
|
|
|
|
I confirmed that gps value changes in NMEAParserDemo Project
Did to do practice moving NMEAParserDemo Project's source to web project as it is
Value 'Ho' does not change.
I teach what did wrongly
NMEAParserDemo
web
|
|
|
|
|
rephrase or hire an interpreter.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
|
Yeah! I have just hired a detective who is helping me in figuring out where is this 'Ho' coming from.
I trust the detective as he is a direct descendant of the Sherlock Holmes dynasty...
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Hi to All,
Here I am getting an error. Breaking my head but not able to get it done. Please help me out with.
I know I have done some silly mistake,..But not able to view it
Mu code is...
char *a,*b,*temp;
a="aa";
b="bb";
while(*a!='\0')
{
*temp++ = *a++;
}
while(*b!='\0')
{
*temp++ = *b++;
}
*temp = '\0';
....
its showing error in the line...*temp++ = *a++;
Thanks in advance
|
|
|
|
|
What error do you get [Compile/RunTime]. Please provide the details
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
Thnaks for your reply
I am getting an runtime error...
(Unhandled exception...Access violation)
Thanks...(anyway,..My brothers name is Anshumaan)
-----------------------------
I am a beginner
|
|
|
|
|
Ah! that may be because temp is not initialized.
Initialize it!
And believe it or not, but my brothers name is HIMANGSHU
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
thanks a lot...
About the name..that's interesting...I feel somewhat to talk personal staff in this forum. Lets not violet the rules..hehe...Could you give me Gmail Id if you dont mind.We can talk in Gtalk .
Regards,
Himangshu
|
|
|
|
|
What error? I cannot see syntactic error there. Do you allocate memory for temp?
|
|
|
|