Click here to Skip to main content
15,912,475 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: USB Project Pin
knowvc10-Aug-08 20:09
knowvc10-Aug-08 20:09 
Questionerror LNK2019: unresolved external symbol question Pin
monsieur_jj10-Aug-08 17:01
monsieur_jj10-Aug-08 17:01 
QuestionRe: error LNK2019: unresolved external symbol question Pin
rp_suman10-Aug-08 18:28
rp_suman10-Aug-08 18:28 
AnswerRe: error LNK2019: unresolved external symbol question Pin
monsieur_jj10-Aug-08 18:33
monsieur_jj10-Aug-08 18:33 
GeneralRe: error LNK2019: unresolved external symbol question Pin
monsieur_jj10-Aug-08 19:11
monsieur_jj10-Aug-08 19:11 
Questiontwo basic questions about message pump in STA Pin
George_George10-Aug-08 15:26
George_George10-Aug-08 15:26 
Questionfile filter by shell extension Pin
greenfish77710-Aug-08 13:58
greenfish77710-Aug-08 13:58 
QuestionHow can I post a user message from a Dialog box to the CDocument class? Pin
Electronic7510-Aug-08 6:20
Electronic7510-Aug-08 6:20 
Hi, I have a MFC Doc/View SDI application that in CDocument it opens a dialog box I need this dialog box to send and get data to the CDocument without halting the thread so I created a Mode less dialog box (CDialog m_dlgCalibrate),Now my problem is How can I send a message from this dialog box to CDocument
class. In CDocument class that I create this calibration dialog box I've
assigned its parent the CView associated with CDocument(I have only one view)
This is the code
void CMyDoc::OnCommandsCalibrate()
{
bool res;
POSITION pos = GetFirstViewPosition();

res = m_dlgCalibrate.Create(IDD_CALIBRATE, GetNextView(pos));
if(!res)
AfxMessageBox(_T("Error Creating Dialog Box"));
m_dlgCalibrate.ShowWindow(SW_SHOW);
}

So when in this calibration dialog box I executed
PostMessage(WM_CAL_COMMAND);
I expected it is routed to CMyView
I have put this in CMyView Message map
ON_MESSAGE(WM_CAL_COMMAND, CMyView::OnNewCalCommand)
I also have defined handler function as:
afx_msg LRESULT OnNewCalCommand(WPARAM, LPARAM);
but this message won't reach to CMyView let alone CMyDoc
but I could grab it in CMainFrame class using similar code(I only
executed AfxGetMainWnd()->PostMessage(WM_CAL_COMMAND) in dialog box in this
case). Is there anyway so I can post this message to CMyDoc directly or at
least to CMyView?
Thanks
AnswerRe: How can I post a user message from a Dialog box to the CDocument class? Pin
Bram van Kampen10-Aug-08 9:18
Bram van Kampen10-Aug-08 9:18 
GeneralRe: How can I post a user message from a Dialog box to the CDocument class? Pin
Electronic7510-Aug-08 17:10
Electronic7510-Aug-08 17:10 
GeneralRe: How can I post a user message from a Dialog box to the CDocument class? Pin
Bram van Kampen11-Aug-08 15:17
Bram van Kampen11-Aug-08 15:17 
GeneralRe: How can I post a user message from a Dialog box to the CDocument class? Pin
Electronic7511-Aug-08 17:59
Electronic7511-Aug-08 17:59 
AnswerRe: How can I post a user message from a Dialog box to the CDocument class? Pin
Randor 10-Aug-08 17:31
professional Randor 10-Aug-08 17:31 
GeneralRe: How can I post a user message from a Dialog box to the CDocument class? Pin
Electronic7510-Aug-08 20:11
Electronic7510-Aug-08 20:11 
QuestionRPC linking error in VC6.0 Pin
sunny_vc9-Aug-08 21:16
sunny_vc9-Aug-08 21:16 
AnswerRe: RPC linking error in VC6.0 Pin
Jijo.Raj9-Aug-08 21:40
Jijo.Raj9-Aug-08 21:40 
GeneralRe: RPC linking error in VC6.0 Pin
sunny_vc10-Aug-08 16:59
sunny_vc10-Aug-08 16:59 
Questionhow to make mfc opengl installer application Pin
yoel good9-Aug-08 18:21
yoel good9-Aug-08 18:21 
QuestionSpawning a new frame within a CDialog's OnBnClickedOk() has the effect of making the new frame immediately go behind the main frame Pin
Sternocera9-Aug-08 14:12
Sternocera9-Aug-08 14:12 
QuestionRegOpenKey error i cant figure out Pin
locoone9-Aug-08 12:56
locoone9-Aug-08 12:56 
AnswerRe: RegOpenKey error i cant figure out Pin
David Crow9-Aug-08 16:23
David Crow9-Aug-08 16:23 
GeneralRe: RegOpenKey error i cant figure out [modified] Pin
locoone9-Aug-08 17:05
locoone9-Aug-08 17:05 
QuestionRe: RegOpenKey error i cant figure out Pin
Mark Salsbery10-Aug-08 8:03
Mark Salsbery10-Aug-08 8:03 
AnswerRe: RegOpenKey error i cant figure out Pin
Rob Manderson10-Aug-08 8:26
protectorRob Manderson10-Aug-08 8:26 
QuestionHaving problems with Templates Pin
BobInNJ9-Aug-08 4:05
BobInNJ9-Aug-08 4:05 

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.