Emmili_ Mfc
π ALL INFORMATION CLICK HERE ππ»ππ»ππ»
Emmili_ Mfc
Sign up or log in to customize your list.
more stack exchange communities
company blog
Stack Overflow for Teams
β Start collaborating and sharing organizational knowledge.
Create a free Team
Why Teams?
Asked
9 years, 4 months ago
Modified
9 years, 4 months ago
169k 9 9 gold badges 151 151 silver badges 337 337 bronze badges
319 2 2 gold badges 6 6 silver badges 13 13 bronze badges
Highest score (default)
Trending (recent votes count more)
Date modified (newest first)
Date created (oldest first)
63.9k 10 10 gold badges 72 72 silver badges 136 136 bronze badges
142k 36 36 gold badges 247 247 silver badges 454 454 bronze badges
8,790 2 2 gold badges 30 30 silver badges 52 52 bronze badges
Stack Overflow
Questions
Help
Products
Teams
Advertising
Collectives
Talent
Company
About
Press
Work Here
Legal
Privacy Policy
Terms of Service
Contact Us
Cookie Settings
Cookie Policy
Stack Exchange Network
Technology
Culture & recreation
Life & arts
Science
Professional
Business
API
Data
Accept all cookies
Customize settings
Find centralized, trusted content and collaborate around the technologies you use most.
Connect and share knowledge within a single location that is structured and easy to search.
Though I've had plenty of software experience I've not done a great deal of Windows programming. I'm trying to post a WM_USER message from a thread so that it gets picked up in the main UI thread but I'm having some trouble. This is in C++ using VS2010 and MFC.
Declared the handler function as follows,
As far as I can see this is all in line with what MSDN says as stated here.
Can anyone let me know what the problem is?
Trending sort is based off of the default sorting method β by highest score β but it boosts votes that have happened recently, helping to surface more up-to-date answers.
It falls back to sorting by highest score if no posts are trending.
CMyApp inherits from CWinApp, which inherits from CWinThread. CWinThread user-defined messages take a special macro in their message map for what you want to do:
Assuming DoSomething() is a member of your CMyApp class.
See the documentation on ON_THREAD_MESSAGE() for more information.
THe problem is that the message map expects a function on a CWnd, whereas your class clearly is not a CWnd, either by virtue of actually being such or inheriting from CWnd.
The function expects you to pass a method of CWnd that takes a WPARAM and an LPARAM, but you're passing in a function of CMyApp.
Make the CMyApp class extend off of the CWnd class:
If this isn't possible, then you're going to have to find a way to pass in a function of CWnd or any other function of a class that extends off of CWnd with the right parameters and return type.
Thanks for contributing an answer to Stack Overflow!
By clicking βPost Your Answerβ, you agree to our terms of service , privacy policy and cookie policy
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
Site design / logo Β© 2022 Stack Exchange Inc; user contributions licensed under CC BY-SA . revΒ 2022.8.11.42796
By clicking βAccept all cookiesβ, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy .
Your browser isnβt supported anymore. Update it to get the best YouTube experience and our latest features. Learn more
Krezz Karavan
Huge Cocke
Small Tits Undressing