|
Why can't you compare the resource scripts?
A few URLs that could help:
Programmer's Tools
Sudden Discharge
I know of a tool - ResourceHacker - that is able to decompile resources.
|
|
|
|
|
Hello...
I am rather familiar with MFC, Windows..
Now I found that soon there will be much needs for COM,
I really want to get inside the ATL..
First of all I need a book that leads me the right way..
(With a month of searching for COM, now I can only use them)
What Book Would You Recommand?
I found "ATL Internals", "Inside ATL", "professional ATL..."
And any more?
Above All If there is good way to get familiar with ATL,
Please Recommand it to me...
Regards
-a beginner
|
|
|
|
|
Hi,
First of all learn the basics of COM programming itself no matter what are you going to use later VB, MFC, ATL or pure C++. Check "Essential COM" by Don Box, it's a nice book for the beginners. Then when you understand what is COM about you can jump into the ATL.
Regards,
Alex Gorev,
Dundas Software.
|
|
|
|
|
"Essential COM" .... For a beginner, hmmmm.
Sorry Alex but....
yes I learned a lot from the Essential COM book. heck, I always thought that Don invented COM..
***BUT***
In the first 4 times I have tried to read the book I always get stuck on the fifth chapter... where Don suddenly speaks in different language
I believe Essential COM is a great book. However it is not for beginners (at least not all chapters)
I recommend, an easier path before digging into Essential COM. like "Understanding DCOM " by William Rubin and Marshall Brain.
Then digging into "Essential COM"
"Essential COM" is a great book, read it after you get your self familiar with the basic concepts first. I did.
This is my Story and I am sticking to it
Alfadhly
|
|
|
|
|
I have been learning C++ and MFC for the past year, and I still feel like I'm struggling! How long did it take anyone else to learn it, and be able to say that they were confident using it? It seems that there is so much to learn.....can anyone recommend a book that really gave them a handle on it??
|
|
|
|
|
Personally, I think it took about 6 months of fairly dedicated effort to learn MFC. MFC was really my first foray into serious O-O development (and I've subsequently learned that MFC is not the best place to learn O-O, sigh...)
To me, learning anything requires a project that demands you figure out problems. I've always used a contact manager/mailing list project my goal as I move from language to language, as it covers most of the needed areas (UI, data access, alogritms, etc.)
First and foremost, make sure you understanding how to program Windows itself (which is *not* OO at all), understanding the basics is key to understanding why MFC does what it does. I had a great book on Borland C++ 4.5 that got me that far, but I'd have trouble recommending that today.
Mastering MFC to me is more about understanding it's wide array of idiosyncratic behaviors. You'll know what you want to do, but it will not be obvious how to get there. A book like Eugène Kain's MFC Answer book will be helpful in outlining this.
If you're serious about developing apps with MFC, you should consider buying a library, like the Dundas toolbox, I found the ability to dig through their code and see how they solved things invaluable.
|
|
|
|
|
Hey I'm still learning after almost 2 yrs
But I managed to make cash as an independant developer after 4 months! however I had some other relevant experience before that.
I think you need to initially break it down into 4 parts,
1.)The Visual C++ WorkSpace eg VC++6
2.) C or C+
3.) Windows API
4.) MFC,
If you can break your main problem area down into one of the last 3 areas and work on the area that gives you the most difficulty it may help. Don't worry about the other areas, for a while, When you get to know one of those 3 areas really well, I bet the other areas will fall into place quickly.
I find I still fall back on my beginners books for syntax and procedual reference, as much as the intermediate and advanced books, I use now.
Sorry I'm reluctant to name any books as I believe an authors style has as much influence as anything in learning,
So unfortunatly I keep buying "good" books but until I find one that suits me
Regardz
|
|
|
|
|
Hi,
Another very good book is 'Programming Windows 95 with MFC', written by Jeff Prosise. Altough one could get the impression this book is 'outdated' (because of the number '95' in the title ), it isn't outdated at all!
This book does not talk a lot about the Visual Studio environment, but mainly about how to efficienty use MFC. Jeff is starting from the 'good old days' by giving an example of how Windows programs had to be written in the past. Then he gradually changes over to writing Windows programs nowadays with the help of MFC. He does this really nice.
He also gives a lot of pitfalls you have to pay attention to. It's a must if you want to know more about efficient use of MFC.
Perhaps there's already a new issue of the book (with '98' or even '2000' in the title??? ), but if you still can get the 'old' one, don't hesitate to buy it. ISBN number: 1-55615-902-1. The issue I have is from 1996, but still very much up to date for the basic MFC stuff.
Also the book of Eugene Kain, 'The MFC Answer Book', is very instructive and educational, as already mentioned in another reply on your question.
To have a taste of the book, just visit his web site: http://www.mfcfaq.com . You can have some code snippets and other stuff from his book. This is really a 'try before you buy' site, which I very much appreciate.
Hope this info is useful
Best regards,
Geert
|
|
|
|
|
Hi,
I've got a 3rd party activex control embedded in a dialog App, occassionally the activex generates an unspecified error resulting in a blank error message box,
Whilst the errors aren't integral to my main application, And if necessary I can work arround them, The Messagebox is a pain, Anyone know how to silence an activex from doing this,
Regardz
Colin Davies
|
|
|
|
|
Geez, talk about a crappy ActiveX control! It just goes ahead and displays error messages when there's a problem and to top it off, the message is blank! I suggest you call these guys up and tell them to send you an improved version. If they refuse, tell them you'll be happy to disclose to the world what a "wonderful" product they have. That may get them going...
If you don't want to go that route, then I suggest you look at writing yourself a system-wide Hook DLL. Then when you detect the message box is about to come up, you can close it down quietly. That's one not-so-nice way to do it, but it's the only way I know of. I had to do something similar a couple of years ago and I got a great jump start from an article I found in CodeGuru -- I don't know if CodeProject has anything like it yet.
Good luck!
Alvaro
|
|
|
|
|
Alvaro, the ActiveX is actually a real popular one, on client machines its the swflash.ocx, I bet you have it and unfortunatly its free so I can't hound the makers. And actually it's my code that causes the errors, I'm asking it for a variable name that doesn't exist in its structure. Unfortunatly if I don't ask I don't know if it exists. I know this sounds illogical.
But there is no way of enumerating the variable structure it appears.
I'll see what I can do with a hook
Regardz
|
|
|
|
|
I have a 600MHz PIII with 256M Ram running windows NT server . Generally apps go along nicely . But if I do a carrige return or a delete at the top of a 16KB source file it takes 5 seconds to respond , and the processor goes from 2% utilisation to 50% .(memory usage stays constatnt around 75MB) I am pulling what little hair I have out in big chunks . Any ideas ?
|
|
|
|
|
Are you running any add-ins customizing the IDE?
|
|
|
|
|
If its an MFC based project you could try deleting the
.dsw(workspace ) file. Create a new blank workspace and insert the dsp file into this workspace.
robin
|
|
|
|
|
This typically happens because of the .NCB file created by VC++. Close down your project and delete this file (in your project's folder).
Let me know if it helps,
Alvaro
|
|
|
|
|
Hi!
I have the following problem:
I want to use paper tray 1 (special paper) to print the
first copy and tray 2 (normal white paper) to print the
second copy. I want to do this whithout making the user to
select trays manually.
I've found a struct DEVMODE that has a member
dmDefaultSource that looked promising, but I am not sure how
to set and use this variable. I am not even sure if this is the correct way to solve my problem.
I hope there is someone that can help me.
/Henrik
|
|
|
|
|
Check out this article on MSDN:
HOWTO: Change the Default Source of Printer Programmatically
http://support.microsoft.com/support/kb/articles/Q157/6/29.asp
Cheers,
Frank
|
|
|
|
|
I have a CPropertySheet with three embedded CPropertyPages. In each page when the user handles some controls, their state is saved in the parent CPropertySheet. When the PropertySheet is dismissed by pressing the OK button, the user selection should be saved in a file. But I do not want the caller of the CPropertySheet to do this saving. Rather I want the CPropertySheet to implement this saving. So I did the
following.
In the CPropertySheet, I manually added a BN_CLICKED message map entry for IDOK (ClassWizard does not do this). This command handler gets called but the OnKillActive() of the currently visible page is not called (which I badly need). Then I used ClassWizard to add the OnOk handler to one of the pages (and removed this from CPropertysheet). Only when this page is active, this OnOk gets called. When some other page is active, the sheet closes automatically.
I do not want to override OnOk() for every page that I add to this sheet, yet I still want the CPropertySheet to handle this message. What should I do?
Thanks,
|
|
|
|
|
Why don't you find out what the current page is when your sheet's OK handler is called and then call the active page's OnKillActive() yourself.
Then you only have to handle the OK once in the property sheet.
You would need to do this anyway if you were overriding something else that closed the sheet, so why not with the OK button handler you overrode in the sheet?
|
|
|
|
|
Hi,
if you like i can send you a CPropertySheet derived class that exactly does what you asked for.
Best regards
Holger
|
|
|
|
|
I am writing a WTL application similar to explorer with a treeview on the left of a splitter, and various views on the right hand side. The problem is the that the controls flicker like crazy and I can't stop them. Every single window in the chain from the MainFrame to the parents of the controls have WM_ERASEBKGND handled, but the controls themselves are still blanking out, and the windows continue to be flagged for erasure.
Has anyone worked out a truly flicker free solution to controls like CListViewCtrl and CTreeViewCtrl?
|
|
|
|
|
I know Visual C++'s intgrated profiler and VTune 4.5 from Intel.
Are there any other products out there, that are comparable to VTune (and maybe better)?
|
|
|
|
|
One to certainly consider is Rational Quantify for Windows NT
http://www.rational.com/products/vis_quantify/index.jtmpl
Here are some feature benefits from their page:
Automatically pinpoints application performance bottlenecks
Profiles all parts of your Windows® NT application — including components with or without source code
Quickly analyzes your executables -- no rebuild is required
Provides thorough and repeatable performance data
Supports Visual Basic, Visual C++ and Java applications
Companion tool for Rational Purify and Rational PureCoverage for Windows NT, and integrated with Rational Visual Test and Rational ClearQuest
Integrated with Visual Studio 6.0
|
|
|
|
|
I have some code that includes a function that draws a simple graph in a CButton using GDI calls (FillRectangle and Polyline). The purpose of this code is to allow selection of foreground and background colors. The "graph" in the CButton shows what the selection(s) will look like. I call the function in question when one of the color buttons is pushed and it works fine in those instances. So, I placed calls to the function in OnInitDialog (after the CDialog::OnInitDialog call), but it does not do the drawing. I've walked thru the code and it all appears to be executing correctly, but the graph is not displayed. Any ideas?
Thanks, so much.
|
|
|
|
|
Try initiating a redraw on it with an Invalidate.
Windows might not be thinking it needs to paint the control, or your MFC DC for the dialog is not valid yet.
At least after the dialog is inited, there will be a paint message in the queue for that control to execute the drawing.
|
|
|
|