|
| Gonen (47) | |
| Hey. How can I check if the user entered into a folder (C:\Program Files for example)? Thanks for the answers! | |
Last edited on | |
| kikolani (18) | |
I think that if you have a string likechar filename[200];in which you keep the path of the folder the user is currently into. Then you can just compare the strings using a code like: int result = strcmp(filename,"C:\Program Files");If this function returns 0(result becomes 0), means you successfully compared the strings and user has entered "C:\Program Files". If function returns a positive or negative value, then the user is not in this directory. | |
| Gonen (47) | |
| Yeah, but my question is how do I get the path of the folder the user is currently into... | |
| Zaita (2112) | |
| You've not given us enough information. Do you just want to monitor the file system and have the Operating System notify your application when the user enters a specific folder? Or do you wanna test which folder your application was run from? http://www.cplusplus.com/forum/articles/1295/ | |
| Gonen (47) | |
| Yes , I want the Operating System notify my application when the user enters a specific folder. | |
| Zaita (2112) | |
| Then your best bet is to try a Win32 or Windows forum on how to hook into Explorer callbacks. | |
This topic is archived - New replies not allowed.
