|
How Long Does It Take For A Beginner To Become Like You? I Really Want To Know...
|
|
|
|
|
a lifetime?!
For me, it's about 20 years that I first touched a computer. But I also wasted a lot of time with games I had many obstacles that in hindsight helped me a lot.
But seriously, to become a "useful developer", there is something that takes time, and can't be cut short.
It starts with having experience with a lot of different things - be it languages, protocols, concepts, ideas, paradigms, tools. Later, this allows you to move smoothly between layers of abstraction. At one point, your product, your software becomes independent of all these ways to communicate - with peers or compilers.
Only recently I achieved the point where I move between programming languages without effort, I don't really know how to express that, but let me try:
Software is a thought. Programming means giving this thought a clear shape, turning a vague cloud of smoke into a crastyl with asharply defined corners. OOP, UML, C++, C#, Scheme, Assembly, TCP/IP, German are all languages to express this thought, to explain this thought to your compiler, your collegue, or your PC. But the concious part of your mind isn't thinking how to express a certain thought in a certain language, but it is busy shapingthe thought itself.
Sounds more esoteric than I'd want it to be. And there are lots of programming things I am terribly bad at (that's not a weak attempt at modesty, but a provable fact).
Tips? Learn to read - read a lot, read fast. That's the most valuable skill you can actually train.
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP blog: TDD - the Aha! | Linkify!| FoldWithUs! | sighist
|
|
|
|
|
If I declare a CEdit dynamically in my dialog file and try to connect the resource id of editbox to it via
DDX_Control(IDC_EDIT_BOX, *pEdit);
The program asserts. It works fine if I create a CEdit object on stack and pass it.
Why is it that DoDataExchange doesnt work as expected with dynamically allocated variables ? I thought I knew Intermediate level MFC before this one stumped me
Thanks
Cage
|
|
|
|
|
cagespear wrote: The program asserts
Why? I.e. what was the assertion message?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Are you creating the CEdit object and calling Create() before or after calling CDialog::OnInitDialog() ?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
No, what's the need of that if I am doing DDX_Control?
|
|
|
|
|
cagespear wrote: No
It was not a yes/no question.
cagespear wrote: what's the need of that if I am doing DDX_Control?
It's required. Now, where is the call to CDialog::OnInitDialog() in relation to where the CEdit object is created and its Create() method called?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I don't think so david. I am pretty sure I don't need an explicit create call in my oninitdialog if I am linking the editbox with the dialog with DDX_Control call.
As it turned out, it was an issue with the resource ID.Thanks for the advice though.
Regards
Cage
|
|
|
|
|
cagespear wrote: I am pretty sure I don't need an explicit create call in my oninitdialog...
Correct. But the CEdit object must be created before CDialog::OnInitDialog() is called. Otherwise, DDX_Control() will throw an exception.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Agreed
|
|
|
|
|
Do you want to make dynamic editbox and use of their events?
|
|
|
|
|
So I am using the solution Explorer and I link two projects together. The question I want to ask is how do I run an object that is created from my second project on my first project? Is there any easy way to do that using include? I tried looking through the microsoft library on Project Dependencies but I am still confused. Thanks
|
|
|
|
|
kanekcwu wrote: The question I want to ask is how do I run an object that is created from my second project on my first project?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
As in I have two projects different projects in MFC in a solution. I want to call the dialog created by the second project in my first project.
|
|
|
|
|
But why you want to run a dialog of a project on other project,do you have any idea?
|
|
|
|
|
kanekcwu wrote: I want to call the dialog created by the second project in my first project.
See here.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
kanekcwu wrote: So I am using the solution Explorer and I link two projects together. The question I want to ask is how do I run an object that is created from my second project on my first project? Is there any easy way to do that using include? I tried looking through the microsoft library on Project Dependencies but I am still confused. Thanks
The answer depends on what kind of projects you are using. It's easiest if you are using an object in a static library. Then you need to use the include files from the library project and link the library into the calling project. With other kinds of projects, it becomes more complicated. Could you explain in more detail?
Nathan
|
|
|
|
|
I am using an MFC project. I am trying to run a video player on my MFC project and therefore is having problems. Thanks
|
|
|
|
|
Do you want to play a movie file and whats problem?
|
|
|
|
|
Yes I basically want to play a movie file with my project... I have a project that gives me data on when to play the movie. I just need to make the movie play it at those times... How do i do that?
|
|
|
|
|
For play movie files you can use of MCI functions and they are powerful and easy to use,but I think for this case you dont need to two project.
|
|
|
|
|
Both of my projects areMFC
|
|
|
|
|
kanekcwu wrote: Both of my projects areMFC
I assume that you mean MFC executable projects, as opposed to MFC extension dlls. I have never used MFC automation, but I think you can use that to make methods in one executable callable. Another possibility would be to convert one of your projects to an MFC extension dll project (which has some issues), or an ATL project (which would provide much better automation support than MFC).
Nathan
|
|
|
|
|
hi,
the complier tell me this error happens at the statement of the malloc sentence, but I wonder how can this happens for this statement
AT2[nAT2].itemset=(int *)malloc(sizeof(int)*up->lb[i].itemlen);
usually when the pointer points to the invalid error or the array is out of index then this error happens, but now the very strange thing is I have run the program for 40hours then the error jump out?
can anyone help me to analyze this error?
|
|
|
|
|
Use your debugger to check if up is a valid pointer and that i is in the range of the array.
|
|
|
|