TEXT() Working on codeblocks but not on visual studio

44 Views Asked by At

I have a function that needs to find the window handle by "FindWindow()", which use "LPCSTR" type as parameter, so I have to use "TEXT()" to convert the inputs(I don't really understand why, but I've tested on codeblocks, and it worked)

int sendString(char proc_class[], char proc_name[], char str_to_send[])
{
    HWND proc_handle = FindWindow(TEXT(proc_class), TEXT(proc_name));
    ...

It worked perfectly on codeblocks(with mingw), but its not working on VS

That's what VS is pointing:

"Expands to: Lproc_class

identifier "Lproc_class" is undefined"

0

There are 0 best solutions below