|
hi.
firstly i want to say very very thank you. actually i want to do all the work in C .can it is be possible that without writting shell extension which you have provide me i can do all that job?
|
|
|
|
|
AFAIK writing the shell extension is by far the simplest way to do it. Michael's articles are really good stuff, have a look at them.
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 understand what you want to say. but my problem is that i want an exe file that can do all those job.
|
|
|
|
|
ravi 12 wrote: Is it possible to find out file location using C language...
What file?
"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 DavidCrow,
actually there is a order.docx file in my PC.I have placed it in D:\important\order.docx location. I want to know that can i find out it location using C Language?
|
|
|
|
|
ravi 12 wrote: I have placed it in D:\important\order.docx location. I want to know that can i find out it location using C Language?
This makes absolutely no sense. If you already know the location of the file, what's the problem?
If the file's path & name are being passed to your program (via a command-line argument), you have access to that using __argv . With that, you can then use _splitpath() to extract the various pieces. Also have a look at PathRemoveFileSpec() .
"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 DavidCrow,
actually this programming is a part of my project.so don't be confuse.I am now telling you about my project.Actually i have a C program which can read/write a file of extension .docx.means that c program can read/write the *.docx.so first i have to give input to that program .i mean that i have to give name and location of the *.docx file.So for its input i want that when i simply one click on any *.docx file it would be input for that program.Its my project.now i am thinking that when i simply one click on any *.docx file i would be able to know its location by C programming. I think that it should be now clear to you that what i want to ask you...
|
|
|
|
|
ravi 12 wrote: so first i have to give input to that program .i mean that i have to give name and location of the *.docx file.
Where? How?
ravi 12 wrote: ...when i simply one click on any *.docx file...
From where? Windows Explorer?
ravi 12 wrote: ...i would be able to know its location by C programming.
Do you have a WinMain() function?
"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 DavidCrow,
That *.docx file can be anywhere in my computer.So i want when i would be that location and if i simply one click by mouse, the C program which i mention early starts read it contain.Don't be confuse.
Suppose that file is in D:\files\my.docx location I want to do is that when i click on my.docx file that C program starts reading its contain.If it is in another location the same case would be happaned there.
Ya i have winmain() function and i also include windows.h #include<windows.h>.but further programming related to mouse , i don't know .So please tell me that part of program in detail.please
|
|
|
|
|
I told you before: create a file association in explorer. Name your program as the handler for .docx files. Then double clicking will load your program with the filename as an argument, just like clicking a Word-document start Word with the document opened
Rozis
|
|
|
|
|
Hi Rozis,
Thanks for your suggestion...
|
|
|
|
|
Alright, you asked for it!!!
You ave to traverse the file system, looking for the file you're after. (Recursion is the most oft used approach)
You'll need the functions FindFirstFile and FindNextFile.
'All' you have to do is start out in the root directory of any drive and do a FindFirstFile Followed by a FindNextFile (looking for *.*)
until you have retrieved all of the filenames in the current directory, or found your target.
Then, you have to check the file attributes to determine which files are plain files and which files are actually directories.
You must then remember a list of those directories, and one by one scan the contents of each of them.
Simply repeat these steps for all files on a drive, or until the file is found.
Here. This'll list the contents of D:\ (without traversing any directories)
#define UNICODE 1
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
int main()
{
WIN32_FIND_DATA foundFile;
HANDLE firstFile;
WCHAR* searchString = L"D:\*.*";
firstFile = FindFirstFile(searchString, &foundFile);
do {
printf("%S\n", foundFile.cFileName);
} while (FindNextFile(firstFile, &foundFile));
return 0;
}
|
|
|
|
|
Hi,
I want to know about mouse programming.Actually i want to do is that there is a *.docx file in my computer(windows-XP)and i have a c program which can read the content of *.docx file.so first i have to give input(the location of the *.docx file) to that C program then it can read the content of that *.docx file.I want that when i click on *.docx file then it will be input for that C program.I want to ask you also that can i find file location by using mouse programming?So how can i do this???
|
|
|
|
|
May I ask you politely to avoid shouting?
ravi 12 wrote: Hi,
I want to know about mouse programming.Actually i want to do is that there is a *.docx file in my computer(windows-XP)and i have a c program which can read the content of *.docx file.so first i have to give input(the location of the *.docx file) to that C program then it can read the content of that *.docx file.I want that when i click on *.docx file then it will be input for that C program.
I strongly suggest you to read articles in this series [^].
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]
|
|
|
|
|
Why do you write in BOLD and what is "mouse programming"?
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
Please don't keep repeating your question, i think you are posting it at least the third time. You already got an answer from 3 different people (file assiciations), if this does not give you the solution you are looking for you should try asking differently, preferably giving more detail about what exactly you wish to do. Also mentioning that file associations is not what you want could help avoid getting this same answer over and over again. Good luck...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
thanks for your reply. i cannot continue with my code for the reason that i dont have enough knowledge on it. My code is successful if i will not use radio button in getting the reasult but when i used a radion button to connect to the command button i cannot successfully link to it coz i dont know the code on how to do it. I just need a sample code for my reference...can u send sample code to connect the radio button to a command button please...?
Neil
|
|
|
|
|
I believe we had given a solution for this.
do you want to pass the value that is assigned to the radio button to the command button?
if that is the case create an event for the radio button and inside the function assign a value(say .10 which is 10%) to a global variable. Then use this global variable in command button.
Hope this helps you.
|
|
|
|
|
i will try sir but if still i cannot please dont stop helping me...
thanks a lot.
neil
|
|
|
|
|
Hi all,
I am making an application using vc++, when the process complete I need to boot the machine and at booting time it ask for disk check for FAT32 volume. I dont want that user will see this check disk black screen. So I am trying to check the disk with my code before machine boot.
Is there any win32API or any utility that checks disk so that I can implement it in to my code?
I dont want to use Chkdsk Method of the Win32_LogicalDisk Class.
One more option that I have to execute command chkdsk command on command prompt. But I am looking for any better option.
Thanks
Regards
M Chauhan
|
|
|
|
|
Do u want to check the disk before system login, right?
Величие не Бога может быть недооценена.
|
|
|
|
|
Yes.
I want to do the same thing with my code (at running stage of machine) that OS do itself at booting time.
|
|
|
|
|
There's a reason the OS does this at boot time - when the OS is fully running, the disk is potentially changing all the time, invalidating the check. And what if there's a problem in a loaded file?
Why is the OS doing this all the time? Mine doesn't! And which OS...
Iain.
I have now moved to Sweden for love (awwww).
If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need cotract work done, give me a job! http://cv.imcsoft.co.uk/[ ^]
|
|
|
|
|
assume table [User] has 2 fields: [ID] and [Name],
User ID in records are:
0,
1,
2,
5,
6,
12,
...
The minimum ID allowed for adding a new user is 3 now.
How to get the minimum ID by SQL?
|
|
|
|
|
May be you can move your post to General Database forum[^] where it is more likely to get answered.
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|