Message Map from non ui application
-
Hi Is it possible to do message maps calls like post and peakmessage from a non-GUI (no window) application? I have an MFC dll with callbacks that i presume can be invoked using message map calls. But as i understand these calls requires a window handle and as there is no window/UI (its a service) I am not sure how i can invoke these callback from the dll. Are there any related sample code or articles that i can look at? TIA -S PS: I am not very experienced with mfc programming so please bare with my silly questions.
-
Hi Is it possible to do message maps calls like post and peakmessage from a non-GUI (no window) application? I have an MFC dll with callbacks that i presume can be invoked using message map calls. But as i understand these calls requires a window handle and as there is no window/UI (its a service) I am not sure how i can invoke these callback from the dll. Are there any related sample code or articles that i can look at? TIA -S PS: I am not very experienced with mfc programming so please bare with my silly questions.
shreelak wrote:
I have an MFC dll with callbacks that i presume can be invoked using message map calls. But as i understand these calls requires a window handle...
What would those callback functions do with a
NULL
window handle?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
-
shreelak wrote:
I have an MFC dll with callbacks that i presume can be invoked using message map calls. But as i understand these calls requires a window handle...
What would those callback functions do with a
NULL
window handle?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
-
Hi Is it possible to do message maps calls like post and peakmessage from a non-GUI (no window) application? I have an MFC dll with callbacks that i presume can be invoked using message map calls. But as i understand these calls requires a window handle and as there is no window/UI (its a service) I am not sure how i can invoke these callback from the dll. Are there any related sample code or articles that i can look at? TIA -S PS: I am not very experienced with mfc programming so please bare with my silly questions.
This is possible. Hope ur ServiceMain is in a separate thread. u can use PostThreadMessage to post any message. Then in a loop you can chk for the messages by calling GetMessage or PeekMessage. cheers.. Milton KB