m_text1 is a CString value that represents static text in mian window. To change it I have to call this: ((CNoweOknoDlg*)m_pParent)->m_text1 = "text" on button click. I don't have any idea how to do this in a different way. I'm confused why it works with modeless window.
SzyKam
Posts
-
Passing data from modal dialog. -
Passing data from modal dialog.Any more details?
-
Passing data from modal dialog.Hello! I've made a simple application. When I click a button in mian window a modal popup window shows up: Ustawienia modalne; modalne.DoModal(); I want that when I click OK in this modal wnd. it changes a Static Text in main wnd.: void Modalne::OnBnClickedOk() { UpdateData(true); ((CNoweOknoDlg*)m_pParent)->m_text1 = "tekst"; ((CNoweOknoDlg*)m_pParent)->UpdateData(false); OnOK(); } When I press this button the app crasches :( When I made this popup wnd. as modeless using Create() funtion everything is OK. :/
-
Error while executing programI believe the problem is solved. I made the same project from the begining, now using Static Library. I don't know why it did't work last time. Maybe I should delete previous bild .exe file. Anyway... thans for your time and help.
-
Error while executing programMicrosoft Visual Studio 2005 Version 8.0.50727.42 (RTM.050727-4200) Microsoft .NET Framework Version 2.0.50727 Installed Edition: Professional Microsoft Visual C++ 2005 77626-009-0000007-41598 Microsoft Visual C++ 2005 Project: Dialog window made with MFC Application Wizzard. I added only: 1 button to main window, create 1 dialog and call it as Modal window tih this botton.
-
Error while executing programWhat information?
-
Error while executing programThere is a lot of dll's that application depends on. It is hard to check every machine before runnig a program on it. I don't know if i'm getting it correct (this sattically link), but I've changed in project properties to "Use MFC in Static Library". It didn't worked.
-
Error while executing programBut how to find out which dll's does he need, and where sholud he place it? This program is a simple dialog, made with app wizard. With a press of a button I create modal window. Can't anything be done while debugging/linking...some build options?
-
Error while executing programHello! I've made simple MFC program. I sent it to my friend, and he told me that he is getting an error while executing. The message box says that the configuration is corrupted and reinstall of this app. might help (something like that). He tryied to run this app on 3 more computers always getting the same error. Please help!
-
Bit Edit ControlHello! Anybody knows how to make EditBox to accept only bitwise strings (0 and 1), something like ES_NUMBER that allows only digits to be entered into the Edit Control. SzyKam.
-
MDI in CLR Windows Form ApplicationThank You for your reply! Yes... I know what MFC and MDI are. Beceause I'm begining to work with Visual C++ and it will be best if you pass me this all knowledge in a "dumb-resistant" way... a mean source codes... Regards, SzyKam
-
MDI in CLR Windows Form ApplicationHello! I built my first simple CLR program. On "OK" button clic it displays MessageBox. Can anybody tell me how to do so that I activate Child dialog-based window by clicking "OK" on a Main dialog-based form. I want the Child form to be Properities window so it has to send some "settings" to the Main window. What code should I put to my program to call a dialog-based window in another. PS. If You be so nice and tell me also how to do this in MFC apps. SzyKam
-
Error in creating windowHello! Thank you for your help. I came to this yesterday. Now I have Visual not to use unicode. Everything is working fine, without using macro. :) Szymon
-
Error in creating windowHello! I'm begining with Visual C++. I found article on www.codeproject.com, I mean "Introduce Yourself to VC++ Part I". I have done everything "by the book", but it dosen't work. The message I'm getting from debugger is as follows: ------ Build started: Project: MFCFundamentals1, Configuration: Debug Win32 ------ Compiling... exercise.cpp WINVER not defined. Defaulting to 0x0502 (Windows Server 2003) e:\programy\microsoft visual studio 8\projekty\mfcfundamentals1\mfcfundamentals1\exercise.cpp(17) : error C2664: 'CFrameWnd::Create' : cannot convert parameter 2 from 'const char [17]' to 'LPCTSTR' Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast Build log was saved at "file://e:\Programy\Microsoft Visual Studio 8\Projekty\MFCFundamentals1\MFCFundamentals1\Debug\BuildLog.htm" MFCFundamentals1 - 1 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== I'll be greateful for a help! PS. I'm using Visual Studio 2005 (if it makes any difference). Szymon SzyKam