Jump to content
  • Advertisement
Sign in to follow this  
ChaosPhoenix

User Defined Messages not working.

This topic is 5226 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!