|
Bump. Ow, no Bump.
modified on Friday, October 23, 2009 12:27 PM
|
|
|
|
|
I'm trying to fix an MFC app that puts up a "Failed to create empty document" for some customers when they try to open a data file. It hasn't failed on any of our own systems or for our customers in North America, but only for a customer in Sweden and one in Australia. It fails in both Win XP and Vista. The user has admin privileges. I installed those on a test machine of my own, setting the language to Australian and the locale to Australia, and installing the same anti-virus as the Australian customer, but nothing I do can reproduce the problem locally.
It's failing somewhere in MFC's OpenDocumentFile() function. Does anyone have an idea why it would work fine in the United States, but fail in Australia? It's not even reading a file yet, just trying to create an empty doc.
Thanks in advance for your help.
Dave Goodman
dgoodman@infoway.com
dkgoodman.com/blog.html
"Actio sequitur esse."
|
|
|
|
|
Dave,
I was adding some functionality to an MFC app that has been running for 10 years. I started getting the "Failed to create empty document" message. I stepped into the constructor of my document class and its base class and all the other objects that were being created. The constructor of one of my objects was getting a pen style out of a configuration file that contained a bogus value. The class was attempting to create a pen with "new CPen(..." using the bogus pen style value. The constructor of CPen threw an exception eventually causing the document class to exception out resulting in the infamous "Failed to create empty document" message. Perhaps your customers in Sweden and Australia have some bogus data in either their data files or some configuration file.
|
|
|
|
|
What does additional exception params mean. How to decode them
Exception code: c0000417
Additional params 1: bc2f
Additional params 2: a1e3a477b6e1fdbadac6c68bdf7431d9
Additional params 3: a3b3
Additional params 4: 7bd20c8dcbae52a3e1bbda9149a93f62
Чесноков
|
|
|
|
|
Hi,
My dll is creating connection to a sybase database. I am using ex_connect to connect the sybase.But while i am trying to build the code,after coming to the function ex_connect my debugger is not returning anything.Neither it is giving any error nor returning anything.
But while i used the same code(written in dll) in an executable file to test, it was working fine.
I need your help. Thanks in advance.
|
|
|
|
|
I have Dialog Box in SDI application. How to write data from Dialog to Document not closing the dialog box (just clicking the button).
Thanks for any help
BC
|
|
|
|
|
Make the dialog modeless.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
OK. I have changed my dialog to modeless but how to interact between dialog and document. For example:
In dialog I have number in edit box and on click "add" button I want this number to be written in new line on document.
Thanks for any help.
|
|
|
|
|
kudlaty79 wrote: OK. I have changed my dialog to modeless but how to interact between dialog and document.
Post a message to it. When the document receives the message, it can then notify the view (i.e., UpdateAllViews() ) that it needs to render the new data.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
OK.
But can you give an example?
like:
when clicked add on dialog write "hello" on document
Thanks for help.
|
|
|
|
|
Assuming the dialog is modeless, call PostMessage() with some user-defined message and a pointer to some heap-based data (i.e., new ) as the LPARAM . Provide a handler for that message in the document class. In that handler, update the document's data with the contents of LPARAM . Then call UpdateAllViews() . In the view' OnUpdate() method, it will get the latest data from the document and render it.
Aside from the dialog, all the rest is just plain MFC stuff.
You can test most of this by creating a sample SDI application. Add a CString member variable to the document and assign it some value. In the view's OnUpdate() method, get access to the document's data by calling GetDocument() plus whatever name you gave the member variable. Now render that data using the supplied DC's TextOut() method.
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi
I have a great idea for a new virtual world which will be written in C++ and was wondering if someone would like to help with this project which I might need help with. It's a great design and should be easy to program. Members will be able to create a character, purchase and build houses, go shopping, chat with friends and much more in 3D.
Thanks
Andrew
Andrew McIntyre
|
|
|
|
|
|
A "great idea" is one thing, implementing it is another.
You're probably looking at 5 man-years work just to get a basic, reliable system up and running, and well over 20 man-years for a fully-featured, immersive system. Even something as crude as Second Life has had a huge amount of development time spent on it (and most people would expect much higher quality in any new offerings).
Rather than trying to built this from scratch yourself, you might try looking for a job at one of the companies already developing in this area.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
I will get there, but it will take time. I have carefully planned out of how it will work and overall it should be easy to implement into C++. I am looking for someone to help me put in the basics like full screen, mousecursor, background music, sounds, graphics ect. Then I will think of a way to complete it whilst in the actuall world code.
If you are interested I would be delighted if you could help me with just the basics and I will be really happy with that so the project has been lifted off the ground.
Thanks
Andrew McIntyre
|
|
|
|
|
Honestly Andrew, I think you're seriously underestimating the scale of what you're planning. I'm not trying to put a damper on your dream, or say it's impossible, but as a game developer I have first-hand experience of this sort of thing. I've been involved in quite a few different projects over the years, from the small "3 or 4 person for a year" size up to the "nearly 100 for nearly 5 years" scale, and what you're proposing is definitely at the higher end of that range.
One suggestion I can make, which should help you along the way, and maybe get you producing games on a smaller scale first, is to look at some of the middleware and games engines out there. Try downloading a few, building some basic games, and getting a feel for the process.
A good place to start is with Microsoft's XNA framework, which gives you just about everything you need to get up and running.
There are also lists of engines at Devmaster and on Wikipedia - there are a lot to choose from, so I'd suggest trying maybe Ogre and Irrlicht as two pretty well developed ones.
If you really want to get into games development then it might be worth looking for companies in your area, asking what vacancies they have, or possibly even asking for a studio tour to get an idea of what working in games is like (it's not as glamorous or "fun" as people imagine).
Good luck with the project if you do decide to go ahead with it, but, as you say, it will take time, so be prepared to spend several years on it.
There are three kinds of people in the world - those who can count and those who can't...
modified on Thursday, August 6, 2009 9:22 AM
|
|
|
|
|
It isnt a virtual world like Second Life as advanced than that, I mean just like World of Kaneva on that sort of edge no higher than that.
As I said previously I am still looking for anyone who is interested, and that this project can be finished progressivly and I have planned out this project carefully step by step.
Andrew McIntyre
|
|
|
|
|
MrMcIntyre wrote: It isnt a virtual world like Second Life as advanced than that, I mean just like World of Kaneva on that sort of edge no higher than that.
I hadn't come across Kaneva before, but it looks just about as complex as Second Life, and with higher quality graphics. Developing something like that is definitely going to be a pretty big job.
MrMcIntyre wrote: As I said previously I am still looking for anyone who is interested, and that this project can be finished progressivly and I have planned out this project carefully step by step.
You'll definitely need to put together a fairly big team to do this, even using middleware. You're going to need coders, artists, designers, audio people, networking specialists... The list is pretty long. There are a few online boards where you can ask for people interested in collaborative work, although there are always more people with ideas needing teams than there are people interested in joining them.
I notice that Kaneva have made their engine freely available for non-commercial use (here) so it might be a good idea to check it out and see if you can use it to get your basic system up and running.
And in case you think I'm being too negative, have a look at what my company's currently working on. OK, maybe a bit more complex, and a bit bigger in scale, but in many ways a very similar exercise. You'd be staggered if I told you (that's if I was allowed to tell you) how many people are in the team and how long it's been in development...
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
See if I don't create a virtual world but redesign the project into being more game based in some ways but still allow players to upload music, videos, photos, ect to the game, would you able to help me as I think you are the best person to work with and I had a look at your website and was stunned at the work you do.
Thanks
Andrew McIntyre
|
|
|
|
|
Hi Andrew,
Unfortunately my company has strict rules about what we can work on as "outside projects" and something like this certainly wouldn't be allowed. I doubt I'd have the time to put into it anyway, as I prefer to spend most of my non-work time in non-programming activities.
Hopefully the links I've posted in previous messages will be of some use to you, and I'd recommend trying e.g. XNA to get a feel for the process of building a game.
re RTW and APB, well, it is pretty amazing, but I'm not actually on that project. I'm working on the game that's coming after APB - which will be even more amazing - obviously
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
Do you know anyone who could help me with this project who either has an e-mail address or a website that I can contact and ask ect.
Andrew McIntyre
|
|
|
|
|
Pretty much all my contacts are in the games business as well, so would probably be in the same position and unable to help you.
There are some online boards and lists where you can put up a message asking if anyone's interested in your idea, one of the more likely possibilities being GameDev.Net. Actually, GameDev.Net is a pretty good resource for learning about all aspects of game development as well, so you can probably pick up quite a lot of useful information by browsing through the articles and tutorials there.
Anyway, good luck with the project, and I hope you can get a few people interested.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
I have an SDI based application, and is uploading a bitmap having dimension 1280*1280... The size of client area is less and the bitmap size is large... It only uploads the portion of bitmap that fits into the client area.
So how I may increase the client area, so that scroll bar horizontal/vertical appears and bitmap loaded properly. I changed the structure CREATESTRUCT in PreCreateWindow(CREATESTRUCT& cs)
but it did not work.
any idea? THANKS
|
|
|
|
|
I need a control for the new ribbon bar that looks like a button but behaves like a checkbox (i.e. a pushlike checkbox). In VC6 I could do that with the BS_AUTOCHECKBOX|BS_PUSHLIKE styles, but I can't find a ribbon button with the same behavior, and the new CMFCRibbonButton and CMFCRibbonCheckBox aren't real windows (they don't have hwnds), so I can't just add the styles.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Nevermind, I found a way to simulate that behavior with ON_UPDATE_COMMAND_UI.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|