The 'this' parameter has to be a pointer to the class instance (the value that 'this' would have when using 'this' inside the callback function itself). So you have to pass something else when the connect call is not being called from inside the PanelClient class.
Edit: If that isn't the problem then could you show the build output? I just googled C2075 and it seems like it has nothing to do with this line itself. Are you using VS2015 update 2 or higher?
Code (cpp) Select
PanelClient client;
button->connect("pressed", &PanelClient::windowChooseKey, &client, "txtWindowShowKey" );Edit: If that isn't the problem then could you show the build output? I just googled C2075 and it seems like it has nothing to do with this line itself. Are you using VS2015 update 2 or higher?
. My pc happily continues running without issues even after invalid memory was accessed like in this code. Although I couldn't reproduce it here, I think I know what the issue was and it should be fixed in the latest version.