mfc dui hua kuang he atl dui hua kuang shi yong qu bie.

解决方案 »

  1.   

    The code of atl dialog's "create" is diffrent mfc's.
    alt dialog:dlgobj.Create(hParentWnd);
    The function call is only one parameter,
    the parameter is the handle of parent's window.
    mfc dialog:dlgobj.Create(IDD, NULL);
    The first parameter is the resource of dialog,
    the second parameter is NULL,
    or none second parameter, that mean is using default parameter,
    the default parameter is just NULL.

    If an object of dialog(atl and mfc same) will show modal,
    the object isn't a globe variable or a member variable,
    the object must be a local variable, turly the dialog object what will show modal
    needn't be a globe variable or a member variable, only a dialog object what 
    will show modeless require is a globe variable or a member variable.
    The atl's needn't have a parameter of parent, but mfc's require, mfc's cann't be NULL.