0

I am using VC++ 2008, and i am trying to create a little software to search for a folder and explore it in a new window.(like I open/explore c: drive) I don't need to browse for the folder and open it from there.

I tried using 'ShellExecute' but didn't work.when i compile the code it gives me errors in 'shellapi.h'. What should I do?

I used the following

#include "shellapi.h"


int main(int argc, char* argv[])
{
ShellExecute(handle, "open","C:\\", NULL, NULL, SW_SHOWNORMAL);
return 0;
}

My problem is i have no idea how do that.
Please help

Edited by happygeek: fixed formatting

2
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by dirnthelord
0

As I told you in your other thread: when posting code, use CODE TAGS

If you want to use <shellapi.h> (not in quotes) you have to #include <windows.h> first.

Also 'handle' looks a bit undefined doesn't it?
How about changing it to NULL

0

As I told you in your other thread: when posting code, use CODE TAGS

If you want to use <shellapi.h> (not in quotes) you have to #include <windows.h> first.

Also 'handle' looks a bit undefined doesn't it?
How about changing it to NULL

Thanks man,It worked - I included windows.h and wola!
and I will remember to use code tags next time.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.