Click here to Skip to main content
15,907,326 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionMFC State Question (Calling MFC UI objects from non-UI objects) Pin
mevatron13-May-07 12:09
mevatron13-May-07 12:09 
QuestionRe: MFC State Question (Calling MFC UI objects from non-UI objects) Pin
Mark Salsbery3-May-07 12:39
Mark Salsbery3-May-07 12:39 
AnswerRe: MFC State Question (Calling MFC UI objects from non-UI objects) Pin
mevatron14-May-07 3:21
mevatron14-May-07 3:21 
GeneralRe: MFC State Question (Calling MFC UI objects from non-UI objects) Pin
Mark Salsbery4-May-07 5:15
Mark Salsbery4-May-07 5:15 
GeneralRe: MFC State Question (Calling MFC UI objects from non-UI objects) Pin
mevatron14-May-07 11:24
mevatron14-May-07 11:24 
GeneralRe: MFC State Question (Calling MFC UI objects from non-UI objects) Pin
Mark Salsbery4-May-07 11:39
Mark Salsbery4-May-07 11:39 
GeneralRe: MFC State Question (Calling MFC UI objects from non-UI objects) Pin
mevatron15-May-07 8:08
mevatron15-May-07 8:08 
GeneralRe: MFC State Question (Calling MFC UI objects from non-UI objects) Pin
Mark Salsbery5-May-07 8:21
Mark Salsbery5-May-07 8:21 
mevatron1 wrote:
So, maybe in the CMainFrame::Update method just call the PostMessage function?


Yes. Anywhere on the callback thread.

You showed "Hardware_Callback() --> Subject::NotifyObservers() --> CMainFrame::Update(...)"
so maybe posting from Subject::NotifyObservers() is more appropriate (depends on what's
appropriate to you and your code).
That way you post an update message to the main frame instead of calling a main frame method.
Regardless, it's a quick way to test and see if that truly is the issue.

mevatron1 wrote:
I've been looking at the AFX_MANAGE_STATE(...) macro


I looked at that too before my last reply. I was thinking you need one in reverse - for a DLL
calling an EXE function Smile | :) It doesn't look like it works that direction though.

Mark


"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

QuestionHow to read Date types from a MDB Pin
nukoso3-May-07 11:59
nukoso3-May-07 11:59 
QuestionProblem disabling IEEE 802.1x authentication when adding a network to WZC through WZC API Pin
ceNewbie3-May-07 8:17
ceNewbie3-May-07 8:17 
QuestionMCI source code Pin
YUANGE3-May-07 6:54
YUANGE3-May-07 6:54 
QuestionRe: MCI source code Pin
Maximilien3-May-07 7:13
Maximilien3-May-07 7:13 
AnswerRe: MCI source code Pin
Hamid_RT3-May-07 7:50
Hamid_RT3-May-07 7:50 
QuestionCTreeCtrl Pin
CDRAIN3-May-07 5:16
CDRAIN3-May-07 5:16 
AnswerRe: CTreeCtrl Pin
PJ Arends3-May-07 5:39
professionalPJ Arends3-May-07 5:39 
GeneralRe: CTreeCtrl Pin
CDRAIN3-May-07 6:10
CDRAIN3-May-07 6:10 
GeneralRe: CTreeCtrl Pin
PJ Arends3-May-07 14:06
professionalPJ Arends3-May-07 14:06 
GeneralRe: CTreeCtrl Pin
Maximilien3-May-07 6:35
Maximilien3-May-07 6:35 
GeneralRe: CTreeCtrl Pin
CDRAIN3-May-07 6:50
CDRAIN3-May-07 6:50 
QuestionHow to write into and read from a string table? Pin
TheInfernalCrow3-May-07 4:15
TheInfernalCrow3-May-07 4:15 
AnswerRe: How to write into and read from a string table? Pin
David Crow3-May-07 4:19
David Crow3-May-07 4:19 
QuestionRe: How to write into and read from a string table? Pin
TheInfernalCrow11-May-07 2:42
TheInfernalCrow11-May-07 2:42 
AnswerRe: How to write into and read from a string table? Pin
David Crow11-May-07 2:52
David Crow11-May-07 2:52 
Questionerror LNK 2019 Pin
sandeepkavade3-May-07 4:00
sandeepkavade3-May-07 4:00 
AnswerRe: error LNK 2019 Pin
krmed3-May-07 4:04
krmed3-May-07 4:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.