How to get Active Application or File name?
-
Hi, I would like to find out which window is active (e.g. in taskbar we have several applications are running ADOBE, Winword, Excel.... and I am working on winword). I would like to know how to get the current application name or file name (e.g. test.doc). Pls suggest. Thanks
SNI
-
Hi, I would like to find out which window is active (e.g. in taskbar we have several applications are running ADOBE, Winword, Excel.... and I am working on winword). I would like to know how to get the current application name or file name (e.g. test.doc). Pls suggest. Thanks
SNI
You can use of EnumWindows for enumerates all windows and then you can use of IsWindowEnabled,Is it enable window or no.
Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )
-
You can use of EnumWindows for enumerates all windows and then you can use of IsWindowEnabled,Is it enable window or no.
Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )
-
thanks for this. Can you help me to find out file names (e.g. Two excel files are open Book1.xls and Book2.xls). How to get the name of file which is having focus. Thanks
SNI
HWND hWnd=GetActiveWindow(); char *s; GetWindowText(hWnd,s); Then compare s and file name to get focus window. strcmp(s,filename);
-
You can use of EnumWindows for enumerates all windows and then you can use of IsWindowEnabled,Is it enable window or no.
Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )
-
char Buffer[100]; HWND hwnd=::GetForegroundWindow() ; ::GetWindowText(hwnd,Buffer,sizeof(Buffer));
a beginner
Do I need to use it? :-D
Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )
-
Do I need to use it? :-D
Of one Essence is the human race thus has Creation put the base One Limb impacted is sufficient For all Others to feel the Mace (Saadi )