Показать сообщение отдельно

  #2  
Старый 30.01.2010, 17:16
RDL_Rider
Познающий
Регистрация: 21.06.2009
Сообщений: 81
Провел на форуме:
77148

Репутация: 5
По умолчанию

может лучше через WinExec("App Name", SW_HIDE) ?
ну а если настаиваешь на
Код:
BOOL WINAPI CreateProcess(    
__in_opt     LPCTSTR lpApplicationName,    
__inout_opt  LPTSTR lpCommandLine,   
 __in_opt    LPSECURITY_ATTRIBUTESlpProcessAttributes,    
__in_opt     LPSECURITY_ATTRIBUTES lpThreadAttributes,    
__in         BOOL bInheritHandles,   
 __in         DWORD dwCreationFlags,   
 __in_opt     LPVOID lpEnvironment,   
 __in_opt     LPCTSTR lpCurrentDirectory,    
__in         LPSTARTUPINFO lpStartupInfo,    
__out        LPPROCESS_INFORMATION lpProcessInformation  );
то присмотрись к структуре
Код:
typedef struct _STARTUPINFO {    
DWORD  cb;    
LPTSTR lpReserved;    
LPTSTR lpDesktop;    
LPTSTR lpTitle;    
DWORD  dwX;    
DWORD  dwY;    
DWORD  dwXSize;    
DWORD  dwYSize;    
DWORD  dwXCountChars;    
DWORD  dwYCountChars;    
DWORD  dwFillAttribute;    
DWORD  dwFlags;    
WORD   wShowWindow;    
WORD   cbReserved2;    
LPBYTE lpReserved2;    
HANDLE hStdInput;    
HANDLE hStdOutput;    
HANDLE hStdError;  } 
STARTUPINFO, *LPSTARTUPINFO;
а именно к параметру wShowWindow
Цитата:
wShowWindow If dwFlags specifies STARTF_USESHOWWINDOW, this member can be any of the values that can be specified in the nCmdShow parameter for the ShowWindow function, except for SW_SHOWDEFAULT. Otherwise, this member is ignored. For GUI processes, the first time ShowWindow is called, its nCmdShow parameter is ignored wShowWindow specifies the default value. In subsequent calls to ShowWindow, the wShowWindow member is used if the nCmdShow parameter of ShowWindow is set to SW_SHOWDEFAULT.
то есть если в запускаемой проге функция ShowWindow вызывается более одного раза с ShowCmd != SW_SHOWDEFAULT, то нифига не сработает. Проверь прогу, которую запускаешь.

Последний раз редактировалось RDL_Rider; 30.01.2010 в 17:22..