15,917,731 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Albert Wen-Jie Feng (Top 12 by date)
Albert Wen-Jie Feng
30-Jan-13 5:29am
View
Thank you for your replay.
Albert Wen-Jie Feng
4-Oct-11 10:17am
View
Thank you!
Albert Wen-Jie Feng
4-Oct-11 10:15am
View
oh, this's true. but I want to to know if there is a way that I can adding data out of the OnInitDialog() function, which means if I can let the listbox object exsit before I fill it up with the data, thus I can update and add different data when necessary at any time and any where. would you give me some suggestion?
thank you!
Albert Wen-Jie Feng
4-Oct-11 10:04am
View
Thank you very much. I want to know if I can create a way to let the listbox object exsit before I use it which like I can declare an array without initializing, but I can assign data for it when necessary. Would you give me some sugestion? thank you!
Albert Wen-Jie Feng
3-Oct-11 3:24am
View
Oh, yes, When I move the part of adding data to the OnInitDialog() function, the programm can work constrainedly, but this is not the result I want, which means I have to add some unrelative parts to the Dialog class. Is there a better solution? thank you!
Albert Wen-Jie Feng
2-Oct-11 22:31pm
View
Thank you very much. I've made it clear by debuging the program, as you said it don't exist before adding item to the listbox. but it still cann't work when I exchange the order of DoModal and AddString method, and I still don't know how to organize the structure. At the same time if I add the instantiation process to the OnInitDialog() function, it seems can break the program logic, what I want is just that I can update the data in the listbox and show it by the dialog, then I can do other work. Do you have any other sugestion? thank you!
Albert Wen-Jie Feng
2-Oct-11 8:43am
View
ok, I have uptate the question, and I set breakpoints on My "OnInitDialog" function AND My "DoDataExchange" function but it break out before get the breakpionts.
thank you
Albert Wen-Jie Feng
2-Oct-11 7:44am
View
thank you. but I've add the DoDataExchange method when I create th dialog, and there are the same code as you writen in the first place. but when I instantiate the dialog in class T passing data to it, and it cann't work at the place where add data. And I don't know add what in OnInitDialog method!
Albert Wen-Jie Feng
2-Oct-11 7:14am
View
Generally I needn't add more code in OnInitDialog method, and other pragram can work well. but this time even I use CreatObject method to create the ListBox, it didn't work.
Albert Wen-Jie Feng
2-Oct-11 7:07am
View
Hi, but when I don't add the code "a.m_listvalue.addString("Calculative table : "), the dialog can show and there's no problem, but there's no any content in the ListBox.
Albert Wen-Jie Feng
2-Oct-11 6:56am
View
Thank you.
As you said the 'CWnd' is null, and the instantiated isn't null at stack, but the 'm_listvalue' variable as the element of the dialog is null.I've find it. but don't know how to deal with it.
What can I do?
Thank you!!
Albert Wen-Jie Feng
2-Oct-11 6:46am
View
Thank you.
The structure of my program is that the dialog is the output dialog for my data, and the ListBox Control named as m_listvalue is a part of the dialog which is used as showing data. And the data is created or generated in the class T. So I create an object of the dialog in class T, and add data serially into the m_listvalue. when the program carry out to AddString(data), it breaks out. Also I use the MFC to create the dialog class.
How do I deal with the problem?
Thank you!!
Show More