I have a class called "Client", and a class called "Login"
both are friends of each other (haha).
in the class Client, there is an instance of login called "menu".
I have the following code in the class Client :
menu.MainHwnd = CreateWindowEx(WS_EX_CLIENTEDGE , "LoginClass", "Login", WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_MINIMIZEBOX | WS_MAXIMIZEBOX, CW_USEDEFAULT, CW_USEDEFAULT, 400, 300, NULL, NULL, hInstance, NULL);
std::thread t1(&Client::CheckAuth, this);
and the thread :
if (menu.AuthenticateSuccess == true)
int x = 3;
Now, I have a boolean field in menu, that is called AutheticateSuccess, which is set to true at a certin condition.
I've checked, and it reached the line where it makes it true inside the Login class, yet it remains false outside (by the way, the constructor is making it false at start)...
I've checked using debug points if it reachs the "int x = 3", and if it reaches the "AuthenticateSuccess = true" inside the Login class, and it does not reach the "int x = 3" line, but do reach the "AuthenticateSuccess = true" line.
I have no idea, how come the object menu (which is a Login class), doesnt update itself, saying that "AuthenticateSuccess" is still false, while I've changed it into true.
What is my error?