Click here to Skip to main content
15,922,696 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: My Shortcut keys are not shown .... Pin
Michael P Butler8-May-02 23:59
Michael P Butler8-May-02 23:59 
GeneralRe: My Shortcut keys are not shown .... Pin
Joaquín M López Muñoz8-May-02 22:59
Joaquín M López Muñoz8-May-02 22:59 
GeneralRe: My Shortcut keys are not shown .... Pin
Nish Nishant9-May-02 0:23
sitebuilderNish Nishant9-May-02 0:23 
GeneralRe: My Shortcut keys are not shown .... Pin
Mike Nordell9-May-02 20:46
Mike Nordell9-May-02 20:46 
GeneralRe: My Shortcut keys are not shown .... Pin
Michael Dunn9-May-02 14:55
sitebuilderMichael Dunn9-May-02 14:55 
GeneralRe: My Shortcut keys are not shown .... Pin
Nish Nishant9-May-02 15:23
sitebuilderNish Nishant9-May-02 15:23 
GeneralON_MESSAGE and ON_COMMAND (big trouble 4 me) Pin
8-May-02 22:27
suss8-May-02 22:27 
Questionhow to create a record-view based on a dialog? Pin
8-May-02 22:14
suss8-May-02 22:14 
i use createview(), which is memeber function of Class CMainFrame, to create a record-view based on a dialog in a Command-message handler. code as follows:

void CMainFrame::OnViewConfdef()
{
CView *t_pCurrentActiveView = GetActiveView();

CCreateContext *t_pCretContext = new CCreateContext;

t_pCretContext->m_pCurrentDoc = GetActiveDocument();
t_pCretContext->m_pCurrentFrame = this;

CRuntimeClass *t_pRunTC = RUNTIME_CLASS(CHuiYiDefView);
t_pCretContext->m_pNewViewClass = t_pRunTC;

t_pCretContext->m_pLastView = t_pCurrentActiveView;

CView *t_pView = (CHuiYiDefView*)CreateView(t_pCretContext);

if(!t_pView)
{
AfxMessageBox("error!");
exit(1);
}

t_pView->ShowWindow(SW_SHOW);
t_pView->OnInitialUpdate();
SetActiveView(t_pView);
RecalcLayout();

delete t_pCurrentActiveView;
}
The class CHuiYiDefView is derived from the class CRecordView. And the class CHuiYiDefView is linked with a dialog recource.
The following code "enum { IDD = IDD_CONF_DLG }" is added by AppWizard.

I face a problem that the pointer t_pView returned by createview() equals to NULL after I place the controls, Microsoft Ado Data Control and Microsoft DataGrid control, onto the dialog.
All codes i write pass the compile and have no errors. But I cant create the view correctly.
Confused | :confused:
QuestionHow Do I send a window message to another... Pin
Baldwin8-May-02 22:01
Baldwin8-May-02 22:01 
AnswerRe: How Do I send a window message to another... Pin
Mauricio Ritter9-May-02 1:47
Mauricio Ritter9-May-02 1:47 
GeneralRe: How Do I send a window message to another... Pin
Baldwin9-May-02 19:33
Baldwin9-May-02 19:33 
GeneralInstallShield VC++ Pin
Sameer Maggon8-May-02 21:16
Sameer Maggon8-May-02 21:16 
GeneralRe: InstallShield VC++ Pin
Joaquín M López Muñoz8-May-02 21:35
Joaquín M López Muñoz8-May-02 21:35 
GeneralRe: InstallShield VC++ - Solved Pin
Sameer Maggon9-May-02 2:30
Sameer Maggon9-May-02 2:30 
GeneralNew Project - Totally Lost Pin
Roger Wright8-May-02 20:56
professionalRoger Wright8-May-02 20:56 
GeneralRe: New Project - Totally Lost Pin
Michael P Butler8-May-02 22:36
Michael P Butler8-May-02 22:36 
GeneralRe: New Project - Totally Lost Pin
Roger Wright9-May-02 4:47
professionalRoger Wright9-May-02 4:47 
GeneralHidecaret() help Pin
Ryan28458-May-02 20:35
Ryan28458-May-02 20:35 
GeneralRe: Hidecaret() help Pin
Nish Nishant8-May-02 20:43
sitebuilderNish Nishant8-May-02 20:43 
GeneralRe: Hidecaret() help Pin
Mike Nordell9-May-02 20:50
Mike Nordell9-May-02 20:50 
QuestionCString casted to CONST BYTE* - Is that safe? Pin
Nish Nishant8-May-02 20:19
sitebuilderNish Nishant8-May-02 20:19 
AnswerRe: CString casted to CONST BYTE* - Is that safe? Pin
Joaquín M López Muñoz8-May-02 21:14
Joaquín M López Muñoz8-May-02 21:14 
GeneralRe: CString casted to CONST BYTE* - Is that safe? Pin
Nish Nishant8-May-02 21:17
sitebuilderNish Nishant8-May-02 21:17 
GeneralRe: CString casted to CONST BYTE* - Is that safe? Pin
Jonathan Craig9-May-02 3:27
Jonathan Craig9-May-02 3:27 
GeneralRe: CString casted to CONST BYTE* - Is that safe? Pin
Nish Nishant9-May-02 3:39
sitebuilderNish Nishant9-May-02 3:39 

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.