Enum HWND C ++ Properties

I am trying to get properties from HWND. I use the information from Using window properties , but the example below does not work for me. I get an error while compiling my code.

argument of type "BOOL (__stdcall *) (HWND hwndSubclass, LPCSTR lpszString, HANDLE hData)" is incompatible with the parameter of type "PROPENUMPROCEXW"

Here is my callback function

BOOL CALLBACK PropEnumProcEx(HWND hwndSubclass, LPCSTR lpszString, HANDLE hData) {
    return TRUE;
}

and this is how i use it

EnumPropsEx(hwnd, PropEnumProcEx, NULL);

Does anyone have any suggestions on how this can be fixed?

+6
source share
1 answer

LPCSTR lpszString LPTSTR lpszString. ANSI Unicode . PROPENUMPROCEXW , Unicode, EnumPropsEx EnumPropsExW, , . , Unicode API.

ULONG_PTR dwData.

, :

BOOL CALLBACK
PropEnumProcEx(HWND hwndSubclass, LPTSTR lpszString, HANDLE hData, ULONG_PTR dwData)
{
    return TRUE;
}
+4

All Articles