It really is relatively simple to work with, it may take a bit of a learning curve depending on your depth/breadth of knowledge in the area of C/C++ programming, sockets, web development (including services).
Any one can explain about MFC design pattern. Past 3 years Iam developing MFC application, but i never gone through such design pattern procedure. I have refered some of the articles, but i feel difficult to understand it. Can anybody help me....
1.what MFC design pattern?
2.why we need to go for MFC design pattern?
3.Any real time example there?
There is no dificult to understand ... in fact, you have to write so such code that could easely reuse it ... I think that is design patterns ... you could search on wikipedia ... and like hint, search for singleton pattern ...
MFC is a deprecated framework. Don't invest time in learning it unless you have to maintain legacy systems written in it. MFC is not just a GUI library, its a set of classes for a lot of other problems too but ppl are using MFC mainly as a C++ gui framework. Unfortunately I can't recommend a really good C++ gui library for you but Qt is definately a much better solution because its much more object oriented than MFC and its crossplatform. MFCism is a religion coming from the previous century, avoid it if its possible.
EDIT: I see there are some downvoter MFC fans here, but they are afraid to show their names and opinions... :P
MFC is not a deprecated framework, agreed that there are sections of it that are and always have been useless (all the collection classes), but it is still worked on and still offer good bang for the money for classic and modern application designs, especially when working with C++.
The design of the gui part is deprecated, and would say that its only half C++. I'm talking about gui because thats part is the most widely used from MFC. Among the helper classes I think there is some useful stuff but don't use them anymore because of crossplatform development. You can say "it works" even about the worst library of the world, its never a good reasoning. Its cost is zero if I'm right if you bought visual studio, but buying even the most expensive gui library is usually only a fraction of the development of a software. Of course you can put together nice gui in MFC, but its more difficult than doing the same with a better system. Not to mention the maintaining of the code, especially if a lot of ppl are working on it, and not all of them are MFC experts. You might be very good at it for now, but imagine how many things you must be aware of to handle MFC well: Win32 dialog resources, subclassing/hooking, window messages to some degree, etc... Its not a small piece... And its not just C++! A good gui library gives you a pure nice C++ interface.
EDIT: Its no problem to downvote something, the '1' button is there for this reason!
I need to draw a spikey 3D surface plot. It might include 300 x 500 points along the horizontal x and y axes and the height (z-axis) might be an integer between 0 and 100. I want the hight to be represented by colour banding...i.e. a point at the front of the graph with a value of 100 would be a tall bar going from green through brown through orange through to white at the top. And a value of 50 would only be a bar with green through to brown.
The most simple (and hopefully effective) solution I can think of is to draw a vertical bar for each point, rather than any triangle drawing as Excel does for it's surface plot.
My question is...how can I do this quickly? I'd do some vector maths to skip any points that don't need to be drawn (hidden bars) and merge others that sit on the same pixel, but could still have 1-2000 points to draw! So would it be possible/quicker to use a cached bitmap of a single full height bar and just copy a portion of it (depending on the z-value) onto a memory dc 2000 times or to use GDI+ and draw 2000 gradient lines/bars? I've not used GDI+ so am trying to work out which bit of darkness to stumble into and read up on!
Any thoughts/suggestions/relevant articles would be hugely appreciated.
Does the class output data to Excel and draw a surface plot within Excel? If so, thanks, but I've already implemented this as an interim measure. I actually need to do the drawing within an MFC application, so various settings can be modified and the results updated in real time.
Otherwise, if your class draws 3d charts within an MFC view, that would be awesome - yes please!
He is no fool, who gives what he cannot keep, to gain that which he cannot lose.
This class could control excel graph in two way : like excel ActiveX object inside of an MFC application or, could control an excel graph in new created file, in exterior of an MFC application but with control from inside of MFC application ... if you say that could help you, I will gladly give you ... and more, I will try to make a little demo ...
Following is the code which i wrote to implement a splitter view to join together 5 dialog. Problem is the split window at the bottom screen occupies the whole form area please help me to remove the error.
I believe you need to create views for all the panes that you create.
So after you create a splitter with m_wndSplitter having 2 rows, you need to create 2 views in these 2 rows before creating the next splitter with m_wndSplitter2.
«_Superman_» I love work. It gives me something to do between weekends.
The Wiki page states:
Serialization is the process of converting a data structure or object state into a format that can be stored (for example, in a file or memory buffer, or transmitted across a network connection link) and "resurrected" later in the same or another computer environment.
You have been a member here long enough to know that questions like this can be researched quite easily by using Google and/or MSDN. For MSDN you can go directly to the CArchive class and learn how to use that.
One of these days I'm going to think of a really clever signature.
However it seems that the Send/PostMessage can only send messages to the CMainFrame
That's not true... you can post messages to any HWND[^] (which is the appropriate method versus saving a CWnd or CDialog). In another words, you can send messages to anything that has a window associated with it (not the only way, but it's a good generic statement), which sort of leads to a common way of messaging to classes that don't have other framework characteristics, make an invisible window for them that others can use as messaging targets.
I'm having a wee bit of a problem on my new system.
I installed Visual Studio 2008 on my new laptop (my old system died). I had already tried to use
ML and Link and mspdb80.dll which were in my TOOLS directory, but the system said that "mspdb80 is
the wrong version, check installation", so I tried the install. I had already used bcdedit.exe to
modify the path to add my TOOLS directory (there is no more autoexec.bat in Windows 7 - and I was
coming from Windows XP).
Now when I execute bcdedit.exe (as administrator) I now just get a flash on the screen (starts to
execute then immediately quits). I wrote a pathedit.bat file to execute bcdedit.exe (from its
location in the Windows 7), then pause. I get the following when I execute it
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
'C:\Windows\System32\bcdedit.exe' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .
Several interesting things are apparent. Why does the batch file execution identify itself as
"Microsoft Windows [Version 6.1.7601]"
My system is Windows 7 Home Premium (from Control Panel:System).
Secondly, why does Windows now say that bcdedit.exe "is not recognized..."
Has the installation of Visual Studio 2008 clobbered Windows 7? It did not report any errors,
but I have not tested Visual Studio yet.
Note the following PATH display.
The first entry is where I added the path to my TOOLS directory before I installed Visual Studio.
The last entry (at least the last entry - I don't have a copy of the path from before the Visual
Studio install) is where Visual Studio added the entry for "Microsoft SQL Server\90\Tools\binn\" and
I had noticed that installation as it installed.
What should I do other than restore the system from before the installation attempt?
I did take a full system Norton Ghost save to my backup external drives (actually, a Symantic
Recovery Disk full save with the system shut down).
Has anyone else run into this?
Has anyone got any ideas?