|
I don't know if this really getting anyone anywhere. Why don't you jump into the debugger and track down the exception.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
Tom is right in that you're likely run into weird behavior if VC++ doesn't get the dependencies right. And a "rebuild all" forces recompilation of all modules, thereby getting around a bad dependency check.
But I suspect the real problem may lie in the code. I've often run into annoying situations (my fault) when I forget to delete an unused #define from resource.h. It causes no end of problems until I figure out that I'm calling GetDlgItem() with a bogus id. Although the ASSERT s I liberally sprinkle my code with will usually catch that. But annoying all the same.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Very good point, Ravi. That's why while it doesn't hurt anything to do rebuilds, I let him know that it's probably a dependency issue so that he can start looking in that area.
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
It may be worth checking your clocks date/time and seeing if its set to earlier then some of the .cpp/.h files of your project. This can cause the project to only build partially after a change and link using old .obj files.
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
Any recommendations for good books on getting started with Managed C++. Preferably aimed at experienced C++ developers.
Michael
Communication is the first step towards enlightenment.
|
|
|
|
|
Hi Michael,
I personally enjoyed very much the MS Press Step By Step book. You do have to wade through a few "this is a variable" type sections. However, I personally don't mind that as I enjoy the tutorial, sequential steps approach as it quickly gets me through the demos of what I need to learn. I will add the caveat that if you've already been doing a lot of MC++, this book will be a waste for you.
I also have the APress book, but I just do not like the format of their books at all.
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
Hey Tom
This is slightly off-topic. But are there any 3rd party form designer tools for use with MC++?
Nish
The rumours that I am an AI bot are absolutely false. These rumours have been propogated by *them* to focus all the attention on to me, while *their* bots take over the planet. Thank y%%%% Divide by zero. Cannot proceed. Abort(y/y)?
|
|
|
|
|
I'm sure there will be and I've even had friends talk of writing one, but I haven't seen one yet.
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
If an MC++ form designer comes out I bet I'll prefer that to VS.NET except maybe for MSDN
Nish
Check out last week's Code Project posting stats presentation from :-
http://www.busterboy.org/codeproject/
Feel free to make your comments.
|
|
|
|
|
Thanks, I'll have a look at the MS Press book.
What about the "Visual C++.NET Bible" (assuming you are the same Tom Archer)? What kind of stuff does that cover?
Michael
Communication is the first step towards enlightenment.
|
|
|
|
|
It's me
However, the VC++ .NET bible is named that simply because the product is now affixed with the .NET label whether you use it to write managed extensions or MFC. My book is an MFC book with about 5 chapters on managed extensions, which is why I didn't mention it.
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
Ok, I'll wait and see what the MS Press one is like first. I might have a look at your book later.
When does the Second Edition of Inside C# get released, Amazon.co.uk is still only listing the first edition
Michael
Communication is the first step towards enlightenment.
|
|
|
|
|
I've never seen my reviews over there. The "Petzold of C#"? That might be just a bit of hyperbole I'll take it though!!
Anwyay, I have no idea why it's not listed on the UK Amazon. It should be in stores this week and I know that US Amazon is shipping it now. I'll ask the publisher tomorrow.
Cheers,
Tom Archer
Author, Inside C#
A total abstainer is one who abstains from everything but abstention, and especially from inactivity in the affairs of others.
|
|
|
|
|
can anyone tell me which program that i have to use to create avi file..
i want to use canimation in mfc.. but need avi file. i have never seen avi in my life. don't know how to create either..
i know for BMP file, i can use adobe photoshop, paint program and some other drawing programs. but what is avi?? how to create one my own.
what i really want is an animated .gif file. is avi is the same thing like .gif file???
|
|
|
|
|
avi I thought was audio video something (interchange maybe).
animated gif's are similar but no sound...
Theres tons of free tools that will create AVI's for you from bitmaps and such...
Maybe Flash has a tool to convert *.swf files to avi's
Check out www.wotsit.org for full details on the AVI file structure.
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
There are a number of applications that can be used to both execute and create AVI files on download.com
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
I want to preview a jpg or gif in open dialog? I use GetOpenFileNamePreview for showing avi files but havent found a way for images. is there a way or do i need to create some kinda shell around the standard box?
Thanx
An Expert is somone who has previously made ALL the Mistakes, I dream of this day. - Lucky
|
|
|
|
|
Hi.
I am working on a multiview program (two views). The design is done; however, I just found out I cannot cast GetActiveView() in main to any view I want. For example, let say I am in main and the active view is View#1, but I want to send a message or call a function in View#2.
How do you access *any* view, active or inactive, from main?
Thanks,
Kuphryn
|
|
|
|
|
Like many things in MFC, there are many answers here and it comes down to personal choice and your system design:
1) You could call the document's UpdateAllViews function and pass the desired message & data that way.
2) You could store the view pointers in a central place (such as the app object or the mainframe object) and then call a member functions to either send the data from that main object or to return the pointer so that you could then directly call the view's member functions
In situations like these there is no right or wrong way although I typically like to use the built in UpdateAllViews method.
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
I tend to store pointers to each view in my CWinApp derived class. I'm not sure it is the best way, but it works well for me as I tend to have multiple views connected to just one document class.
Michael
Communication is the first step towards enlightenment.
|
|
|
|
|
Hello, the codegurus around the world.;)
Even though I don't know your code in detail, I guess that you will
change the location of your function in View2.
If the some funtions can share between View2 and View1, try to put
these functions to the other classes like Doc, Frame or WinApp.
This is mainly because if view2 doesn't get the current focus,
we don't need to send the message or call the function.
If the view2 gets the input focus, we should restore these data to update.
Or anyone has better idea?
Please, don't send me your email about your questions directly.
Have a nice day!
Sonork - 100.10571:vcdeveloper
-Masaaki Onishi-
|
|
|
|
|
Okay. I am using a split windows.
Here is the solution for a splitter design.
-----
CMyView2 *pView = reinterpret_cast<cmyview2 *="">(m_wndSplitter.GetPane(1, 0));
pView->SendMessage(WM_USER_TEST, 0, 0);
return 0;
-----
Thanks to LordShade of GameDev for for the pointer.
Kuphryn
|
|
|
|
|
You didn't mention that you're using a splitter. In that case, the views are created in the mainframe and can be accessed through the mainframe's splitter window member variable.
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|
|
Thanks.
I did not think that the splitter window would affect it.
Kuphryn
|
|
|
|
|
No problem. The effect it would have on anyone's answer is that with a splitter, you already have a "built-in" place to get the views (the CMainFrame::m_wndSplitter).
Anyway, no worries. I'm glad you got your code to work. Just remember to be a bit more detailed when asking for help as it aids others in getting you the response you need.
Cheers,
Tom Archer
Author, Inside C#
Please note that the opinions expressed in this correspondence do not necessarily reflect the views of the author.
|
|
|
|