| 
O.P.  RE: Using DialogBox function
 here it is, i only paste the important parts 
 
#include "resource.h" 
 
LRESULT CALLBACK    Help(HWND, UINT, WPARAM, LPARAM); 
 
HINSTANCE hInst; 
HWND hWnd; 
 
MPPLUGIN_RETURN_BOOL ParseCommand(/*[in]*/  const char* sCommand, 
                                  /*[in]*/  const char* sCommandArg, 
                                  /*[in]*/  PLUGIN_PARAM* pParam, 
                                  /*[out]*/ char* sResult) 
{ 
    if(stricmp(sCommand, "/xhelp") == 0) 
    { 
        DialogBox(hInst, (LPCTSTR)IDD_HELP, hWnd, (DLGPROC)Help); 
 
        strcpy(sResult, ""); 
        return TRUE; 
    } 
 
    else if(stricmp(sCommand, "/xping") == 0) 
    { 
        strcpy(sResult, sCCNotify); 
        strcat(sResult, "smppg"); //The notify code must be 5 characters long 
        strcat(sResult, "Ping?"); 
        return TRUE; 
    } 
    return FALSE; 
} 
 
LRESULT CALLBACK Help(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) 
{ 
    switch (message) 
    { 
        case WM_INITDIALOG: 
                return TRUE; 
 
        case WM_COMMAND: 
            if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)  
            { 
                EndDialog(hDlg, LOWORD(wParam)); 
                return TRUE; 
            } 
            break; 
    } 
    return FALSE; 
} 
 This post was edited on 07-09-2003 at 09:36 PM by oberststen.
 |