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
Post a Comment