Sign in to follow this  

User Defined Messages not working.

This topic is 4862 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've got a Network API that needs the WPARAM and LPARAM, I built a quick MFC app and it doesn't seem to want to let me have the network messages at all. Here is the code I'm currently using:
// In Header
afx_msg LRESULT OnNetwork(WPARAM wParam, LPARAM lParam);

// In Message Map Area

ON_MESSAGE(WM_MSG, OnNetwork)


// OnNetwork Function

LRESULT CChatClientDlg::OnNetwork(WPARAM wParam, LPARAM lParam)
{
	pClient->Update(lParam, wParam);
	Invalidate(false);
	return 0;
}

Anyone see anything obviously wrong or any detail I'm missing?

Share this post


Link to post
Share on other sites
You provide little info. But if its user-defined Message make sure it has a value above all other Windows-Messages. If i remember right, it has to be calculated from the WM_USER Message (sth. like WM_MSG = WM_USER + 1024). Also i dont see any initialization (like IP, Socket etc) and what is pClient?

Share this post


Link to post
Share on other sites

This topic is 4862 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this