Mypass2007 Posted May 5, 2008 Report Posted May 5, 2008 Dupa mari eforturi atat din partea mea cat si a unor baieti de treaba de pe site am ajuns la acest programel facut in Dev-C++: #include <windows.h>int main(){HWND Handle;ShellExecute(Handle,"open","http://www.google.com/",NULL,NULL,SW_SHOWDEFAULT);return 0;}Ar trebui sa deschida google.com. Cand il deschid pe PC-ul meu asta si face, DAR cand incerc sa il trimit unui preten ii deschide folderul D:\. DE CE nu-i deschide pagina de web? :?: Quote
SlicK Posted May 5, 2008 Report Posted May 5, 2008 #include <windows.h>int main(){HWND Handle=GetDesktopWindow();ShellExecute(Handle,"open","http://www.google.com/",NULL,NULL,SW_SHOWDEFAULT);return 0;} sau#include <windows.h>int main(){ShellExecute(NULL,"open","http://www.google.com/",NULL,NULL,SW_SHOWDEFAULT);return 0;}sau#include <windows.h>int main(){ShellExecute(HWND_DESKTOP,"open","http://www.google.com/",NULL,NULL,SW_SHOWDEFAULT);return 0;} Quote