c++ - FindWindow does not find the a window -


hey guys i've plan make simple trainer console c++ first step i've got problem findwindow()

#include <stdio.h> #include <cstdlib> #include <windows.h> #include <winuser.h> #include <conio.h>  lpctstr windowname = "mozilla firefox"; hwnd find = findwindow(null,windowname); int main(){     if(find)     {         printf("found\n");         getch();     }     else{         printf("not found");         getch();     } } 

the above code use try whether command findwindow() when execute output show

not found

i've replaced character set on property project

use unicode character set

to

use multi-byte character set

and

lpctstr

to

lpcstr

or

lpcwstr

but result same, hope can me.

 hwnd find = ::findwindowex(0, 0, "mozillauiwindowclass", 0); 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -