|
"Essential C++" isn't a bad starter book. I'd read "Effective C++" and "Effective STL" before reading "Exceptional C++", though. There are some problems in "Exceptional C++" that you won't understand if you don't have a strong crasp of the language.
The Windows API is written in C. It is structural. It is also worth noting that C++ is NOT an object oriented language; it allows you to program using the object oriented paradigm, but does not limit you to it (which is one of its major strengths when compared to Java and C#). There are some things that just do not work well in the OO paradigm. The C++ standard library (STL), for example, uses the generic programming paradigm. I'm not familiar enough with Vista yet to answer your question about it with a definite yes or no. Just basing my answer on Microsoft's historical record, I don't imagine they would rewrite every part of the OS to give and object oriented API, but I could be wrong.
To understand more of the OS, check out "Programming Applications for Windows" by Jeffrey Ritcher as a starting point.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hi,
I am currently building a C++ application and I want to add some gui stuff to it. Basically, it should only show the status of the basecode (I'm currently doing everything as console output), so there won't be any/much interaction with the gui and the base application. Now I want to abstract it, that I won't have to put any MFC/Gui code into the base code.
So, I thought about some sort of event callback functions.
Somewhere in the MFC init phase:
<br />
myapp = New MyApplication;<br />
<br />
myapp->SetEvent1Callback(&MyMfcApp::Event1Callback);<br />
myapp->SetEvent2Callback(&MyMfcApp::Event2Callback);<br />
<br />
void MyMfcApp::Event1CallBack(long para)<br />
{<br />
BlinkBlink(para)<br />
}<br />
<br />
Somewhere in my Code:
<br />
<br />
if(event1callback) (*eventcallback1)(para1, para2, ...);<br />
<br />
This way, I will still be able to develop the C++ basecode without mixing it with any MFC Code. You may ask why? The reason is that I want to have my C++ code gui free and change the *bling-bling* gui system later.
Is it a good idea? I'm open for every comment.
Greetings
|
|
|
|
|
Do you need any of the MFC classes? Why not just develop your console app without MFC?
Mark
|
|
|
|
|
No, I don't need any MFC classes internal. But I want to have visual output of the data. Is some sort of call monitor (with data transfer). The base code is already handling everything, but I want to see, when a new connections comes in (using some sort of leds), when a connection cancels and some sort of history monitor.
|
|
|
|
|
Hi,
I think it's an interesting idea. Sort of Document/View architecture on steroids.
Best of Luck
Tom
PS. what sort of IPC are you considering?
|
|
|
|
|
TClarke wrote: I think it's an interesting idea. Sort of Document/View architecture on steroids.
TClarke wrote: PS. what sort of IPC are you considering?
Well, I don't want to use some sort of IPC, only simple function calls. As I posted in the other post, it's some sort of calling montior, so I thought something like this:
When a new connection comes in:
(in my base code)
<br />
if(newconnection)<br />
(ConnectEvent)(ConnectionID, CallerNumber, ...)<br />
And the MFC should then enable an (software) led or something.
|
|
|
|
|
Hello Everyone,
I'm a newbie, Please help me!
I'm adopting the code that could redirect a console output into the MFC Edit box.
My problem is, i want to have a live redirection from the console output to the edit box because i have a console application that will run about 5-10 mins and produces lots of information (output) in between those time in the command line.
My recent code will just wait the application to finish up before it could redirect the output from the command line to the Edit box.
Please help!.... thank you very much..
-rupert-
i need to learn more... i want to be like you guys... i'm just a begginer
|
|
|
|
|
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
well,
I was using that at the present but it will just wait for the console output to finish before it can redirect.
i need to learn more... i want to be like you guys... i'm just a begginer
|
|
|
|
|
I need a basic C++ example for the multi threading. I am building up a source code. I have been working on Unix C++ and now need to build up MS windows and as such windows dont support pthread.h, is there an equivalent for it and i can code with it??
Thanks,
Rajesh.
|
|
|
|
|
use CreateThread, search google you will be getting lot of samples using this
mpk1979
|
|
|
|
|
rajeshckk wrote: C++ example for the multi threading.
Look at the boost.org[^]-page.
Boost is a semi-official enhancement of the C++ runtime environment - full of usefull and high-quality code: They employ a strict peer-review).
Here is the link for boost threads[^].
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
jhwurmbach wrote: Look at the boost.org[^]-page. Boost is a semi-official enhancement of the C++ runtime environment - full of usefull and high-quality code
Boost has no acceptance on the Windows platform.
|
|
|
|
|
Sceptic Mole wrote: Boost has no acceptance on the Windows platform.
Where did you get this erroneus information?
Boost is about high-quality standard C++. Not more and not less.
And on Windows, quality code is as accepted as anywhere. So is boost.
BTW. Big parts of the code now on boost will become official part of the next version of the C++ standard.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
jhwurmbach wrote: Look at the boost.org[^]-page.
While in general I support using Boost libraries, in this particular case I would advise against it. Boost Threads development seems to be all but dead since the original author left it, and the Standard will probably adopt a different approach.[^]
|
|
|
|
|
Nemanja Trifunovic wrote: the Standard will probably adopt a different approach.[^]
OK.
I did not know that.
All I can say is that Boost Threads works flawlessly here in a few projects. It is certainly more complete and of better quality than most of the thread-wrapper classes floating around (and better than anything I could build!)
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
See here.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi,
would anybody help me out ,how to draw BST in SDI mfc.
how can i use Inorder traversal recursive algo or there can be any other way
sohail
|
|
|
|
|
i have xxx.lib file in msvc++
is there any way ,we can convert .lib file to its corresponding source code
in msvc++.
|
|
|
|
|
are you trying to hack some Microsoft code ?
|
|
|
|
|
no.
you convert to Assembly (a.k.a. "disassemble" the .LIB). and, there are Assembly to C converters, but the C they create will be nothing like the original source.
|
|
|
|
|
can u suggest any tool whish disassembles the .lib file and also a tool which will assemble to C
|
|
|
|
|
In my Listbox and EditCtrl, I need grid.
How I can do it?
|
|
|
|
|
Dato(Baga) wrote: How I can do it?
Perhaps by asking a coherent question.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi everyone.
i want use dll in mfc project,without using lib and header file.
please help me.
|
|
|
|