Click here to Skip to main content
16,015,756 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: I/O completion port Pin
Gerald Schwab26-May-02 16:44
Gerald Schwab26-May-02 16:44 
GeneralAssertion Failure Pin
laphijia24-May-02 22:15
laphijia24-May-02 22:15 
GeneralRe: Assertion Failure Pin
PJ Arends24-May-02 22:38
professionalPJ Arends24-May-02 22:38 
GeneralRe: Assertion Failure Pin
laphijia24-May-02 22:46
laphijia24-May-02 22:46 
GeneralRe: Assertion Failure Pin
PJ Arends24-May-02 23:24
professionalPJ Arends24-May-02 23:24 
GeneralRe: Assertion Failure Pin
24-May-02 23:58
suss24-May-02 23:58 
GeneralRe: Assertion Failure Pin
Nish Nishant25-May-02 0:12
sitebuilderNish Nishant25-May-02 0:12 
GeneralRe: Assertion Failure Pin
PJ Arends25-May-02 7:30
professionalPJ Arends25-May-02 7:30 
laphiji wrote:
void CWnd::SetWindowText(LPCTSTR lpszString)
{
ASSERT(::IsWindow(m_hWnd) || (m_pCtrlSite != NULL));

if (m_pCtrlSite == NULL)
::SetWindowText(m_hWnd, lpszString);
else
m_pCtrlSite->SetWindowText(lpszString);
}

WHAT THIS MEANS?


ASSERT(::IsWindow(m_hWnd) will cause a debug assertion if the window that you are trying to set the text for does not exist. You have declared the CWnd object, but you have yet to create the actual window at the system level.

Also :

laphiji wrote:
CMyForm* prova;
prova = new CMyForm;
prova->m_edit.SetWindowText("ciao");
delete prova;


Even if this did work, (which it won't for the above reason) the prova form would only briefly flash on the screen because it is created, then destroyed within your function call. it is not persistant beyond the beyond the length of time it takes the computer to process the message.

You need something like this:
{
CMyForm *prova;
prova = Get_The_Address_Of_The_Already_Existing_CMyForm_Object();
prova->m_edit.SetWindowText("ciao");
}



---
CPUA 0x5041

Sonork 100.11743 Chicken Little

Within you lies the power for good - Use it!
GeneralProblem to use StrRetToBuf function Pin
24-May-02 22:19
suss24-May-02 22:19 
GeneralWindow, transparent for mouse clicks Pin
Alex Cramer24-May-02 21:34
Alex Cramer24-May-02 21:34 
GeneralRe: Window, transparent for mouse clicks Pin
Renjith Ramachandran25-May-02 4:04
Renjith Ramachandran25-May-02 4:04 
GeneralPuzzled when converting CInternetFile* to FILE* Pin
George Ma24-May-02 19:37
George Ma24-May-02 19:37 
GeneralRe: Puzzled when converting CInternetFile* to FILE* Pin
Nish Nishant24-May-02 19:55
sitebuilderNish Nishant24-May-02 19:55 
GeneralRe: Puzzled when converting CInternetFile* to FILE* Pin
Erik Funkenbusch25-May-02 3:29
Erik Funkenbusch25-May-02 3:29 
GeneralRe: Puzzled when converting CInternetFile* to FILE* Pin
George Ma25-May-02 17:07
George Ma25-May-02 17:07 
GeneralCFontDialog and LOGFONT :: MFC Pin
valikac24-May-02 17:52
valikac24-May-02 17:52 
GeneralRe: CFontDialog and LOGFONT :: MFC Pin
Jason Henderson24-May-02 18:46
Jason Henderson24-May-02 18:46 
GeneralRe: CFontDialog and LOGFONT :: MFC Pin
valikac25-May-02 5:58
valikac25-May-02 5:58 
Generalavi software Pin
pnpfriend24-May-02 13:52
pnpfriend24-May-02 13:52 
GeneralRe: avi software Pin
Rama Krishna Vavilala24-May-02 16:26
Rama Krishna Vavilala24-May-02 16:26 
GeneralRe: avi software Pin
Nish Nishant24-May-02 17:43
sitebuilderNish Nishant24-May-02 17:43 
GeneralRe: avi software Pin
pnpfriend25-May-02 2:52
pnpfriend25-May-02 2:52 
GeneralRe: avi software Pin
Maxwell Chen25-May-02 9:03
Maxwell Chen25-May-02 9:03 
GeneralRe: avi software Pin
Mike Nordell25-May-02 14:11
Mike Nordell25-May-02 14:11 
Generalwant to post .gif file on my dialog. Pin
pnpfriend24-May-02 12:04
pnpfriend24-May-02 12:04 

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.