Re: Gtk windows problem!!



On Wed, 15 Feb 2006, ferri_marllo gva es wrote:

I've a big trouble...ok!I had a code of a program that was executed under MOS-DOS, and now,i made a windows aplication,using gtk+...but in the program i use the command SYSTEM and now it doesn't work!!

Example: strcpy(registro,"edit");
        strcat(registro,fichsal);
        system(registro);

Your question actually has not much to do with GTK, and a lot to do with your transition from MS-DOS to Windows. But a brief answer:

 system("edit ...");

is not going to do anything useful under Windows. To launch an editor from a Windows program you should either

* consult the win32 API (look for the CreateProcess function --
  google "createprocess msdn"); or

* if you prefer to do it from within GTK, look up the g_spawn_*
  family of functions in the glib documentation.

Allin Cottrell





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]