Archived

This topic is now archived and is closed to further replies.

ShellExecute

This topic is 6153 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

Recommended Posts

ok, this is realy silly but i'm only running on anoyance, for the past hour i've been trying to figure this out. ok here's the code to the program, all 18 lines of it, it's a simple program so i can do quick searches of google(i.e. progname Gamedev).
  #include // Header File For Windows #include // standard input/output int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { char buffer[256]; //buffer for URL #ifdef _DEBUG MessageBox(NULL, lpCmdLine, "URL search term", MB_OK); #endif sprintf(buffer, "http://www.google.com/search?hl=en&safe=off&q=%s", lpCmdLine); ShellExecute(NULL, "open", buffer, NULL, NULL, SW_SHOWNORMAL); return 0; } 
ok, MSVC++ 6.0 says lookup.cpp(15) : error C2065: 'ShellExecute' : undeclared identifier , but if i drop it into a NeHe project (i used it to link to a site of course) it works fine. It's in a blank win32 project, and when i copy/pasted all the NeHe winclass stuff into the project it wouldn't work (i even copy/pasted all the included libraries...) i'm sure there is a realy simple solution but it's beyond me at the moment, and when i search the MSN docs all i get is usage but it doesn't say to include and headers so i'm lost. edit - fixed some editing in the source block. edit - fixed some editing in the source block. ------------------------------------------------- Don't take life too seriously, you'll never get out of it alive. -Bugs Bunny Edited by - Authustian on July 18, 2001 4:23:00 AM Edited by - Authustian on July 18, 2001 4:30:15 AM

Share on other sites
It''s prototyped in ShellAPI.h. For future reference, don''t forget that Windows'' Find feature can find text in files...

Share on other sites
thank you, thank you, and thank you.

-------------------------------------------------
Don''t take life too seriously, you''''ll never get out of it alive. -Bugs Bunny

• 9
• 23
• 10
• 19