Click here to Skip to main content
16,006,001 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Threads and graceful exit Pin
vikramlinux27-Feb-07 23:05
vikramlinux27-Feb-07 23:05 
GeneralRe: Threads and graceful exit Pin
jhwurmbach28-Feb-07 2:10
jhwurmbach28-Feb-07 2:10 
QuestionDisplay String Message.. Pin
Shah Satish27-Feb-07 22:17
Shah Satish27-Feb-07 22:17 
AnswerRe: Display String Message.. Pin
toxcct27-Feb-07 22:20
toxcct27-Feb-07 22:20 
GeneralRe: Display String Message.. Pin
Shah Satish27-Feb-07 22:30
Shah Satish27-Feb-07 22:30 
GeneralRe: Display String Message.. Pin
toxcct27-Feb-07 22:34
toxcct27-Feb-07 22:34 
QuestionIndenting the first line in Graphics::DrawString Pin
Bartosz Bien27-Feb-07 21:57
Bartosz Bien27-Feb-07 21:57 
QuestionWindow procedure Pin
ng4kau127-Feb-07 21:49
ng4kau127-Feb-07 21:49 
i'm trying to build an ActiveX using MFC to control a device,
i got some problem when i tried to get the WM_USER message that send by the device,

i tried this code

LRESULT CALLBACK AfxWndProc(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam)
{
CWnd* pWnd = CDialog::FromHandlePermanent(hWnd);
return AfxCallWndProc(pWnd, hWnd, nMsg, wParam, lParam);
}


LRESULT AFXAPI
AfxCallWndProc(CWnd* pWnd, HWND hWnd, UINT nMsg,
WPARAM wParam = 0, LPARAM lParam = 0)
{
LRESULT lResult;
lResult = pWnd->WindowProc(nMsg, wParam, lParam);
return lResult;
}



LRESULT CCertDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{ //CDialog::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
LRESULT lResult = 0;
if (!OnWndMsg(message, wParam, lParam, & lResult))
lResult = DefWindowProc(message, wParam, lParam);
return lResult;
}


BOOL CCertDlg::OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult)
{ //CDialog::OnWndMsg(UINT message, WPARAM wParam, LPARAM lParam, LRESULT* pResult)
if (message == WM_USER+0)
return_pin(hwnd);
else if(message == WM_USER+1)
return_track2(hwnd);


//OnNotify(wParam, lParam, & lResult);
//else
//... // msg map related
return true;
}


LRESULT CCertDlg::DefWindowProc(UINT nMsg, WPARAM wParam, LPARAM lParam)
{ //CDialog::DefWindowProc(UINT nMsg, WPARAM wParam, LPARAM lParam)
if (m_pfnSuper != NULL)
return ::CallWindowProc(m_pfnSuper, m_hWnd, nMsg, wParam, lParam);
}

but its return error 2447 : missing function header (old-style formal list?) in afxwndproc function, can anybody help me?
its there any recomendation, another way to get the window message using mfc in C++?

thx
AnswerRe: Window procedure Pin
toxcct27-Feb-07 21:58
toxcct27-Feb-07 21:58 
AnswerRe: Window procedure Pin
Rick York27-Feb-07 22:11
mveRick York27-Feb-07 22:11 
Questionhow i used SendMessage or post Message for update child window? Pin
amitmistry_petlad 27-Feb-07 21:48
amitmistry_petlad 27-Feb-07 21:48 
AnswerRe: how i used SendMessage or post Message for update child window? Pin
ThatsAlok27-Feb-07 22:03
ThatsAlok27-Feb-07 22:03 
GeneralRe: how i used SendMessage or post Message for update child window? Pin
Roger Stoltz27-Feb-07 22:30
Roger Stoltz27-Feb-07 22:30 
GeneralRe: how i used SendMessage or post Message for update child window? Pin
ThatsAlok27-Feb-07 22:42
ThatsAlok27-Feb-07 22:42 
GeneralRe: how i used SendMessage or post Message for update child window? Pin
Roger Stoltz27-Feb-07 22:48
Roger Stoltz27-Feb-07 22:48 
GeneralRe: how i used SendMessage or post Message for update child window? Pin
ThatsAlok27-Feb-07 23:15
ThatsAlok27-Feb-07 23:15 
GeneralRe: how i used SendMessage or post Message for update child window? Pin
Roger Stoltz27-Feb-07 23:33
Roger Stoltz27-Feb-07 23:33 
GeneralRe: how i used SendMessage or post Message for update child window? Pin
amitmistry_petlad 27-Feb-07 22:59
amitmistry_petlad 27-Feb-07 22:59 
GeneralRe: how i used SendMessage or post Message for update child window? Pin
ThatsAlok27-Feb-07 23:15
ThatsAlok27-Feb-07 23:15 
QuestionThreads Pin
Programm3r27-Feb-07 21:43
Programm3r27-Feb-07 21:43 
AnswerRe: Threads Pin
Roger Stoltz27-Feb-07 21:56
Roger Stoltz27-Feb-07 21:56 
GeneralRe: Threads Pin
Programm3r27-Feb-07 22:05
Programm3r27-Feb-07 22:05 
QuestionPower management to Monitor UPS Pin
abhiramsss27-Feb-07 21:05
abhiramsss27-Feb-07 21:05 
AnswerRe: Power management to Monitor UPS Pin
Nibu babu thomas27-Feb-07 21:42
Nibu babu thomas27-Feb-07 21:42 
Questionbit-field Pin
Ayman Mashal27-Feb-07 20:51
Ayman Mashal27-Feb-07 20:51 

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.