Click here to Skip to main content
16,014,613 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
JokeRe: You're welcome. Pin
Rajesh R Subramanian21-May-08 20:18
professionalRajesh R Subramanian21-May-08 20:18 
GeneralRe: You're welcome. Pin
CPallini21-May-08 21:41
mveCPallini21-May-08 21:41 
JokeRe: You're welcome. Pin
Cedric Moonen21-May-08 20:32
Cedric Moonen21-May-08 20:32 
GeneralRe: You're welcome. Pin
CPallini21-May-08 21:39
mveCPallini21-May-08 21:39 
GeneralRe: You're welcome. Pin
Rajkumar R22-May-08 1:05
Rajkumar R22-May-08 1:05 
GeneralRe: You're welcome. Pin
CPallini22-May-08 1:54
mveCPallini22-May-08 1:54 
GeneralRe: You're welcome. Pin
Rajkumar R22-May-08 5:56
Rajkumar R22-May-08 5:56 
QuestionAssertion error in VS 2005 C++ Pin
LeonardLay21-May-08 6:04
LeonardLay21-May-08 6:04 
I am trying to use a CFrameWnd in my code and I keep getting an assertion error when I try to ShowWindow(SW_SHOW);

CWnd * tempWnd = new CWnd(); //Create a new CWnd object
tempWnd->Attach(p_adsw_hwndAcad); //handle to the main window
CFPLvlLyrWnd *mWnd = (CFPLvlLyrWnd*)(RUNTIME_CLASS(CFPLvlLyrWnd))->CreateObject(); //CFPLvleLyrWnd is derived from CFrameWnd
RECT sizze = CFrameWnd::rectDefault;
DWORD dwStyle = WS_OVERLAPPEDWINDOW;
    //set up Window size
if (mWnd->Create(NULL, "Levels/Layers", dwStyle, sizze, tempWnd, MAKEINTRESOURCE(0) ))
{
        mWnd->m_parentWHandle = p_adsw_hwndAcad;
            tempWnd->BeginModalState();
    mWnd->ShowWindow(SW_SHOW);
}
else
{
    AfxMessageBox("LoadFrame failed!");
}
HWND tempHandle = tempWnd->Detach();

delete(tempWnd);


This will run in VS 6.0 but in VS 2005 I get an assertion error and the program crashes. What could be the problem?

Help me Obi-Wan Kenobi, you're my only hope!Confused | :confused:
QuestionRe: Assertion error in VS 2005 C++ Pin
David Crow21-May-08 8:19
David Crow21-May-08 8:19 
AnswerRe: Assertion error in VS 2005 C++ Pin
LeonardLay21-May-08 8:27
LeonardLay21-May-08 8:27 
QuestionRe: Assertion error in VS 2005 C++ Pin
Maximilien21-May-08 9:18
Maximilien21-May-08 9:18 
AnswerRe: Assertion error in VS 2005 C++ Pin
LeonardLay21-May-08 9:23
LeonardLay21-May-08 9:23 
GeneralRe: Assertion error in VS 2005 C++ Pin
Stephen Hewitt22-May-08 18:53
Stephen Hewitt22-May-08 18:53 
GeneralRe: Assertion error in VS 2005 C++ Pin
LeonardLay28-May-08 1:45
LeonardLay28-May-08 1:45 
GeneralRe: Assertion error in VS 2005 C++ Pin
wipehindy22-May-09 16:55
wipehindy22-May-09 16:55 
GeneralRe: Assertion error in VS 2005 C++ Pin
LeonardLay26-May-09 1:43
LeonardLay26-May-09 1:43 
QuestionCannot resize my IWebBrowser2 Web Browser Control Pin
Johann Gerell21-May-08 5:31
Johann Gerell21-May-08 5:31 
AnswerRe: Cannot resize my IWebBrowser2 Web Browser Control Pin
led mike21-May-08 5:55
led mike21-May-08 5:55 
GeneralRe: Cannot resize my IWebBrowser2 Web Browser Control Pin
Johann Gerell21-May-08 13:35
Johann Gerell21-May-08 13:35 
GeneralRe: Cannot resize my IWebBrowser2 Web Browser Control Pin
led mike22-May-08 10:20
led mike22-May-08 10:20 
GeneralRe: Cannot resize my IWebBrowser2 Web Browser Control Pin
Johann Gerell22-May-08 20:30
Johann Gerell22-May-08 20:30 
QuestionHow to hide window when the app starts ? Pin
capint21-May-08 5:00
capint21-May-08 5:00 
AnswerRe: How to hide window when the app starts ? Pin
Hamid_RT21-May-08 5:40
Hamid_RT21-May-08 5:40 
GeneralRe: How to hide window when the app starts ? Pin
capint21-May-08 5:47
capint21-May-08 5:47 
GeneralRe: How to hide window when the app starts ? Pin
Hamid_RT21-May-08 6:02
Hamid_RT21-May-08 6:02 

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.