Click here to Skip to main content
15,925,528 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: delete from text file Pin
shaans22-Mar-05 23:37
shaans22-Mar-05 23:37 
GeneralRe: delete from text file Pin
ThatsAlok23-Mar-05 1:08
ThatsAlok23-Mar-05 1:08 
GeneralMysterious new[] and delete[] problem! Pin
Erik Hammar22-Mar-05 12:57
Erik Hammar22-Mar-05 12:57 
GeneralRe: Mysterious new[] and delete[] problem! Pin
Serge Krynine22-Mar-05 22:04
Serge Krynine22-Mar-05 22:04 
GeneralRe: Mysterious new[] and delete[] problem! Pin
Erik Hammar23-Mar-05 2:12
Erik Hammar23-Mar-05 2:12 
GeneralMFC Dialog question Pin
Steve Messer22-Mar-05 11:41
Steve Messer22-Mar-05 11:41 
GeneralRe: MFC Dialog question Pin
Phil J Pearson23-Mar-05 0:00
Phil J Pearson23-Mar-05 0:00 
GeneralRe: MFC Dialog question Pin
Steve Messer23-Mar-05 4:57
Steve Messer23-Mar-05 4:57 
I will look into your method but my OnMessage function passing data that won't work with this solution.


The function declaration is as follows:

BOOL OnMessage( CSystem * pSystem, CMessage * pMessage );

This two items allow passing much more data than wParam and lParam.

I have come up with the following since my post. Tell me what you think of it.

    // Set Pointer to CCOREDlg to g_System-----------------------------------------
HWND hMainWnd;
hMainWnd = AfxGetApp()->m_pMainWnd->GetSafeHwnd();

CDialog* pDlg = DYNAMIC_DOWNCAST(CDialog, CWnd::FromHandlePermanent(hMainWnd));
if (pDlg != NULL)
{
    CCOREDlg *pTemp;
    pTemp = (CCOREDlg*)pDlg->GetRuntimeClass();

    g_pSystem->pCoreDlg = pTemp;

        // Test to see if it worked
        CSystem * pSys = NULL;
        CMessage *pMsg = NULL;
    g_pSystem->pCoreDlg->OnMessage( pSys, pMsg );
}


Now I just pass the pointer pCoreDlg to a plugin and it can call my OnMessage function.
GeneralIp Spoofing using Winsock API Pin
TheBurninator22-Mar-05 11:36
sussTheBurninator22-Mar-05 11:36 
Generalresource .dll and MDI Pin
Ben D.22-Mar-05 10:15
Ben D.22-Mar-05 10:15 
GeneralRe: resource .dll and MDI Pin
Phil J Pearson23-Mar-05 0:05
Phil J Pearson23-Mar-05 0:05 
GeneralRe: resource .dll and MDI Pin
Ben D.23-Mar-05 2:00
Ben D.23-Mar-05 2:00 
GeneralUsing the Debug Window Pin
jerry1211a22-Mar-05 9:45
jerry1211a22-Mar-05 9:45 
GeneralRe: Using the Debug Window Pin
David Crow22-Mar-05 10:36
David Crow22-Mar-05 10:36 
GeneralRe: Using the Debug Window Pin
jerry1211a22-Mar-05 11:40
jerry1211a22-Mar-05 11:40 
GeneralRe: Using the Debug Window Pin
David Crow22-Mar-05 16:43
David Crow22-Mar-05 16:43 
GeneralStupid Questions on C++ .NET Pin
Anonymous22-Mar-05 8:44
Anonymous22-Mar-05 8:44 
GeneralRe: Stupid Questions on C++ .NET Pin
Chris Losinger22-Mar-05 11:07
professionalChris Losinger22-Mar-05 11:07 
GeneralRe: Stupid Questions on C++ .NET Pin
Andrew Walker22-Mar-05 13:56
Andrew Walker22-Mar-05 13:56 
GeneralRe: Stupid Questions on C++ .NET Pin
Anonymous23-Mar-05 4:41
Anonymous23-Mar-05 4:41 
GeneralRe: Stupid Questions on C++ .NET Pin
Serge Krynine22-Mar-05 22:13
Serge Krynine22-Mar-05 22:13 
GeneralRe: Stupid Questions on C++ .NET Pin
Ravi Bhavnani23-Mar-05 2:45
professionalRavi Bhavnani23-Mar-05 2:45 
GeneralRe: Stupid Questions on C++ .NET Pin
Anonymous23-Mar-05 4:51
Anonymous23-Mar-05 4:51 
GeneralCannot allocate memory with malloc?! Pin
Dani10000122-Mar-05 8:25
Dani10000122-Mar-05 8:25 
GeneralRe: Cannot allocate memory with malloc?! Pin
Chris Losinger22-Mar-05 8:55
professionalChris Losinger22-Mar-05 8:55 

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.