|
Can anybody let me know how to display a tree view in an MDI Application.So that I can synchronize each node in the tree to the MDI Child in the application.
laiju
|
|
|
|
|
...these were excellent tools and I can't seem to find them (nor mention of them in the discussion boards). Am I just going senile - or have these disappeared?
|
|
|
|
|
It seems to be referenced in this Wrox book "Visual C++ 4 Master Class" which I have at home. I'll take a look and will get back to you. There's also a reference to it in this[^] CP article, but you've probably already seen that.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I fired up google and found the CP article. However, I downloaded the code and I didn't see it in there.
|
|
|
|
|
Hi everyone,
I need the Sourcecode(best MFC) for an Audio Spectrum Analyzer. I found Audacity at Sourceforge but I don't get through the Code. It's a kind of difficult because they use some stuff wxWindows and so on. I really need some of SourceCode, which is understandable.
Greeting
RedDragon2k
Unix and C are the ultimate computer viruses.
|
|
|
|
|
|
Does anybody know a tool for automaic generation of database layers for C++ with Microsoft SQL Server and MSDE.
I found a lot of tools for C# and VB.NET, but a special tool for C++ I could not found. Does anybody of you have experiences with such tools, and can tell me, which one is easy to use and can maintain structural changes in the database with following generation of new layer files.
Thank you for any help.
Roman
|
|
|
|
|
I reinstalled Windows XP (to basically clean the crap off of it I accumulated for a year) and I tried to run my app I'm developing but I still get that runtime error in the function CWnd::DefWindowProc in the file wincore.cpp. There are two calls to ::CallWindowProc, and the one called is decided on if m_pfnSuper is null or not. Sometimes one is called, and sometimes the other is. At any rate, the program still crashes. The line it's crashing on at the moment is running now is:
if (m_pfnSuper != NULL)<br />
return ::CallWindowProc(m_pfnSuper, m_hWnd, nMsg, wParam, lParam);
And here are the values of those variables:
m_pfnSuper: 0xffff02d3
m_hWnd: 0x00010420
nMsg: 2
wParam: 0
lParam: 0
And those look valid to me. The real crash still happens deep within .dll calls that I don't have the source code for but that's as far as the rabbit-hole goes for me, so-to-speak. I'd love to get this gorilla off my back. (using weird analogies in honor of Dan Rather)
|
|
|
|
|
m_pfnSuper looks pretty weird to me: it's pointing into kernel space. Of course, this value may have a special meaning for ::CallWindowProc .
I'd stick a data breakpoint on m_pfnSuper and see where its value is being changed. See Setting Breakpoints When Values Change or Become True[^].
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
I'm working on that now, but in the meantime, I should add that if the app starts and I immediately close it, there's no error but once I do anything in the app, it crashes like I described every time when I go to close the app.
|
|
|
|
|
I added the breakpoint as described and it never is triggered, however, I still get the same runtime error, so either it's not setup right (which is possible but the procedure is simple so it shouldn't be) or it's never changed. Another thing is if I use the close button in the top-right, it closes fine but I've always closed with File->Exit, and that function simply calls exit(0); and then crashes.
|
|
|
|
|
LighthouseJ wrote:
nMsg: 2
Messages 0 through 1023 are reserved by the system so it seems weird that nMsg would be 2. Make sure you are not doing something like SendMessage(IDCANCEL) to close the window. I have seen people make that mistake before.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Nope, when the user goes to File->Exit, the function called by the menu click just runs exit(0);
|
|
|
|
|
LighthouseJ wrote:
runs exit(0);
Try using PostQuitMessage(); instead.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
wow, if only my other problems left to resolve quit as easily as that one did, good call. Now I don't have to click through any more runtime errors that always occur but I used to not know how to do anything about it. Thanks alot.
|
|
|
|
|
Call PostMessage(WM_CLOSE) instead. PostQuitMessage() does not shut down an application properly as other messages might be initiated by the shutdown operation and those messages, along with any other messages that might be in the queue, will not be processed.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Yes, you are right.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
I have a Visual Studio solution that contains an MFC executable project and a .NET C# class library project with a Windows Form. When I instantiate a simple C# Windows form from the MFC program, then, on closing out the form and exiting the MFC app, I receive an assert in the CCmdTarget destructor (line 48 cmdtarg.cpp) because m_dwRef is > 1. I have recreated this with the simplest MFC and C# windows from that I can make. I still get this assert. Other than the assert on close-out, everything else works fine. The form is instantiated from an MFC CDocument class object using the following code:
FormX *f = new FormX();
f->ShowDialog();
What's my problem??
|
|
|
|
|
RockyMu wrote:
FormX *f = new FormX();
Where are you deleting f?
Artificial intelligence is no match for natural
stupidity.
|
|
|
|
|
Thanks, Anon. I was not deleting 'f' thinking that it would just get garbage-collected, but I can see the problem with that.
Since deleting 'f' requires a destructor, I have added the 'delete f;' code to the MFC object and a destructor '~FormX(){}' to the form's code. When I compile the MFC code, I get an C3841 error on the delete statement which says "C3841: illegal delete expression: managed type 'ClassLibrary1::FormX' does not have a destructor defined." I am still missing something?
Paul
|
|
|
|
|
RockyMu wrote:
I am still missing something?
Sorry man.... can't help you there. MFC->.NET interaction I haven't delved into.
No garbage collection in MFC to help you out with the new/delete operations. But I imagine that your problem is a result of your instantiation of the FormX object and MFC not knowing how to release it properly. At least it's a place for you to start looking.
Artificial intelligence is no match for natural
stupidity.
|
|
|
|
|
I have a driver that provides low level access to the hardware, but it does
not function for all users. It only works when logged in as the
administrator.
How can I tell windows that the driver/program has priveledges to run the
driver to perform the low level functions (inp/outp)?
I am not a professional software writter, obviously, so if you could provide
a piece of code this would help.
I have tried several examples from codeguru and codeproject that were
suppose to allow this type of situation, but they do not work. No matter
what I try, I cannot get windows to let the driver run with priveledges in
non-administrator mode.
Many thanks for your help!!!!
Brad
|
|
|
|
|
If you create MFC7 applications using C++.NET, are the projects compatible with the 2002, 2003 and 2005 versions ?
It's just that we have a couple of copies of 2002 and I would like to make sure people can exchange files and projects (just for MFC).
Thanks.
Elaine
The tigress is here
|
|
|
|
|
Hi
I´m creating my own "MessageBox" -like class, derived from ::Form.
I want the messagebox to close when I press the "OK" button , i.e. to work as if the "x" (close)-button was pressed.
I don´t know where to find the code for this.
Can anyone help?
sincerely
doneirik
|
|
|
|
|
doneirik wrote:
I want the messagebox to close when I press the "OK" button
All messageboxes are like that...
Call
CDialog::OnOK(); on the click event of your OK Button..
Ninety-eight percent of the thrill comes from knowing that the thing you designed works, and works almost the way you expected it would. If that happens, part of you is in that machine.
|
|
|
|