|
Sorry in advance for long post..
Ok well let me fill you in on the bigger picture::
I am at the early stages of learning visual C++ and have a few decisions to make before I can start, and would like to hear what people think(especially if you work in the industry)..Im I on the right track or are there obvious flaws in my planning?... Here is my situation:
I have:
Hnd Computer science(same as first 2 years of Uni.)
written basic programs in C experience in OO: Java and Smalltalk programming degree level projects..not vey big..email client..shopping checkout/stock system etc etc
I want to learn and start earning money as a visual c++ programmer,
I have the oppertunity of a 6 month work placement at my local University, I can use the time to learn visual c++ with a view to getting a job as a programmer + get some experience. But I have to complete some kind of programming project at the end of the 6 months, possibly an app that the University may actually use, the idea being that the app with full documentaion etc..can be used to try and get a job somewhere...
Im using the free Express edition of visual studio(for now), hopefully at some point in the near future I can purchase the full version...can you see any drawbacks to using the express version over the full version..in terms of what im trying to achieve?...also with Express, will there be a licencing issue if the University decide to use the completed project/stand-alone app(compiled in Express)
Now my rough unsure plan is get a hold of a book like
'Ivor Horton's Beginning Visual C++ 2005'
[url]http://www.amazon.com/Ivor-Hortons-Beginning-Visual-Programmer/dp/0764571974/ref=pd_bbs_sr_1/002-3234138-6754445?ie=UTF8&s=books&qid=1173625687&sr=1-1[/url]
...and work through the exercises and experiment a bit(1 month)..then at the end of the book I should be more familiar with the subject and ready to start the project, I also have access to the uni library and the web for more general c++ issues that will arise that are not covered in ivors book..as it looks like quite a broad intro to vs c++
To give you an idea of the scale of the project(which can be anything that can be completed within 4 months)..my initial project ideas are:
Messenger type program that would run on the uni network..features: search/buy/sell used books, printer credit, suggestion box, weather, Calender/planner
Basic Firewall application
Im thinking of these types of apps because because I imagine they require the exploration of the different areas of visual c++ in reference to networks, files guis, internet, security, database etc...and hopefully give me a good grounding introduction..Also feel free to suggest alternative projects that you think more suitable?
How realistic is this plan?
|
|
|
|
|
The only recommendation I can give you for you project is the KISS principle (Keep It Simple Stupid), which applies to all programming. As to the compiler you are using, that is the universities problem and not yours. If they decide your code is good enough to use, then it is up to them to let you or someone else compile and test it on a version that is licensed for commercial usage. As to the language you choose to use, the ones offered by Microsoft are much easier to use for internet communications than most, because they are designed with that in mind. The C++ language is great, especially because it hides some of the details that C does not. Keep in mind your ultimate goal; meaning that if you know, and have experience with the latest languages (C#, etc…) you increase your odds of finding a job.
My preferred language is C++, I recommend searching for ‘Thinking in C++” online as the author provides copies of his works for free. That should give you a good start and please buy a copy when you have the funds, he admits he was a bad C programmer (and I agree), but more than understands programming now (opinion submitted 10 years ago) . Once you understand his works then purchase a copy of ‘The C++ Programming Language’ by ‘Bjarne Stroustrup’ the creator of C++. There are other book that delve into the language a little deeper and ‘Bjarne Sroustrup’s’ web site mentions a few of them.
When you can answer this question for you self, then you will know the power of C++:
What is the most important (or defining) function in the STL?
HINT: Without it the ‘strong guarantee’ would not be possible.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
somebody would tell me why there would be a exception when the Format funciton excuted?
The codes like this:
COleDateTime time(1982,10,17,12,30,0);<br />
CString strTime=time.Format("%H%M");
the assert message like:
File:afxwin1.inl
Line:22
I'm eager for someone's hand! Thanks
|
|
|
|
|
Generally, the way to tell is to check line 22 of afxwin1.inl.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
I use Visual C++ 6.0
the 22nd line of file "afxwin1.inl" only is a MACRO !
I don't know how to do it.
Thanks
|
|
|
|
|
When an assert fails, the error message shows you the check that was being done. What does the message say?
|
|
|
|
|
the assertion dialog like below:
Debug Assertion failed!<br />
<br />
Program:...<br />
File:afxwin1.inl<br />
Line: 22<br />
<br />
For information on how your program can cause an assertion failure,See the vasual C++ documentation on asserts.<br />
<br />
(Press Retry to debug the application)
Thanks
|
|
|
|
|
now,I know,the statement can work well only on Release mode, if you run it on Debug mode ,the assertion will be throwed allways!
Somebody would tell me,Why?
Thanks
|
|
|
|
|
In my version of MFC I see this
_AFXWIN_INLINE HINSTANCE AFXAPI AfxGetInstanceHandle()
{ ASSERT(afxCurrentInstanceHandle != NULL);
return afxCurrentInstanceHandle; }
If this is the same line that is asserting in your app then maybe MFC isn't initialized properly.
It seems to me that shouldn't get called anyway when you call COleDateTime::Format unless the
time is invalid.
If you click to debug you should be able to trace back on the stack and view the value that is
causing the assertion and why.
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
but when i select Retry on the assertion dialog, it would start debug and show assembly codes!
i think nobody would accept this!
but how to resolve it?
Thanks
|
|
|
|
|
What call stack states , in this case ? Make sure, your .rc file is compiling.
|
|
|
|
|
of course,my .rc file is compiling.
but this code would work well in VS2005's debug mode.
why?
and how to debug my program using VC6.0?
Thanks for helping
|
|
|
|
|
kcynic wrote: but this code would work well in VS2005's debug mode.
Does this mean, Its not working in release mode ? Have you tried seeing difference betn these two configurations ?
|
|
|
|
|
No,I mean that, it doesn't work in Debug mode,but work well in Release mode.
I'm sorry, my English is so poor that sometimes I could not show my thought well.But I really want to improve it and learn more things here,not only programming but also language.
Thanks for your help
Best Regards
|
|
|
|
|
Dear all
In one dialog based project in visual C++ 6,
I create one window by following instruction.
childWindow = new CMyDialogBox;
childWindow->Create(IDD_HANNELSWINDOW_DIALOG,this);
childWindow->ShowWindow(SW_SHOW);
but I want to access both windows of my program.
for example by using Ctrl tab I want to switch between 2 dialogs of my program.
But it is not possible now , because child dialog box is on the main dialog
box,
how can I overcome this problem
Regards
Monhi
|
|
|
|
|
May be you should have gone for an MDI type application ?
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
My project is one Dialog based program.
But I want it to have 2 Dialogs
I create second dialog.
But when I want to change the control from child dialog box to fathers dialog box, I find that childs window is always on fathers window. Thus I cannot control the fathers dialog box.
|
|
|
|
|
m_monhi wrote: fathers dialog box, I find that childs window is always on fathers window. Thus I cannot control the fathers dialog box.
Amusing.
Ok check here.[^]Good Luck.
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
Finaly I find the answer
if we call Create(IDD_SOMETHING,NULL) and put second argument to NULL then 2 dialog boxes will become separate from each other.
thank you for your help Mr VuNic.
|
|
|
|
|
Hi all,
i've created this class that inherites from CRichEditCtrl:
CMyRichEditCtrl::CMyRichEditCtrl()
{
}
CMyRichEditCtrl::~CMyRichEditCtrl()
{
}
void CMyRichEditCtrl::PreSubclassWindow()
{
CRichEditCtrl::PreSubclassWindow();
SetAutoURLDetect();
SetEventMask(ENM_CHANGE | ENM_LINK);
}
BEGIN_MESSAGE_MAP(CMyRichEditCtrl, CRichEditCtrl)
ON_NOTIFY_REFLECT(EN_LINK, &CMyRichEditCtrl::OnRichEditLink)
ON_NOTIFY_REFLECT(EN_CHANGE,&CMyRichEditCtrl::OnRichEditChange)
END_MESSAGE_MAP()
void CMyRichEditCtrl::OnRichEditLink(NMHDR* pNMHDR,LRESULT* pResult)
{
}
void CMyRichEditCtrl::OnRichEditChange(NMHDR* pNMHDR,LRESULT* pResult)
{
}
problem is that when i place a break point inside the 'OnRichEditLink' it breaks there, but when i place a break point inside the 'OnRichEditChange' it doesn't break???
can any1 help
thanks in advanced
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
ok i found what the problem was, instead of catching
ON_NOTIFY_REFLECT(EN_CHANGE,&CMyRichEditCtrl::OnRichEditChange)
i should have caught
ON_CONTROL_REFLECT(EN_CHANGE,OnRichEditChange)
thanks anyways
cheers
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Dear all
I want to write one program in dialog base mode in visual C++.
I neet this program to have 2 separate windows, which one of them is the child of main window.
I want to show some information on second window,thus I need to know how to send data to it.
If I can create a new class which is responsible for second window, then I can handle all the requirments I need.
If you know any article about this problem please let me know about it.
Regards
Mahdi
|
|
|
|
|
You will like this.[^]
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|
|
|
Have a nice day monhi
Press: 1500 to 2,200 messages in just 6 days? How's that possible sir?
Dr.Brad :Well,I just replied to everything Graus did and then argued with Negus for a bit.
|
|
|
|