Hi!
I need to create a MDI childframe from another MDI childframe without the user have to click new. Anyone wants to help me out with this? Maybe a code exempel? I´m pretty new to windows coding so any help would be appreciated.
//Ody the men in tight
Derive a custom class from CMDIFrameWnd or CMDIChildWnd (one or the other, look in up in help DOCS), and overide special functions to do your bidding .
Then just create your new class doing: CMyClass *myClass = new CMyClass .
Then just call CMDIChildWnd/CMDIFrameWnd::Create on the myClass pointer, and do a call to CMDIChildWnd/CMDIFrameWnd::ShowWindow to show the window. I''m working on child windows in SDI views, so i know a lot on this .
----------------------------------------------------
PCMCIA - People Can't Memorize Computer Industry Acronyms
ISDN - It Still Does Nothing
APPLE - Arrogance Produces Profit-Losing Entity
SCSI - System Can't See It
DOS - Defunct Operating System
BASIC - Bill's Attempt to Seize Industry Control
IBM - I Blame Microsoft
DEC - Do Expect Cuts
CD-ROM - Consumer Device, Rendered Obsolete in Months
OS/2 - Obsolete Soon, Too.
WWW - World Wide Wait
MACINTOSH - Most Applications Crash; If Not, The Operating System Hangs
Then just create your new class doing: CMyClass *myClass = new CMyClass .
Then just call CMDIChildWnd/CMDIFrameWnd::Create on the myClass pointer, and do a call to CMDIChildWnd/CMDIFrameWnd::ShowWindow to show the window. I''m working on child windows in SDI views, so i know a lot on this .
----------------------------------------------------
PCMCIA - People Can't Memorize Computer Industry Acronyms
ISDN - It Still Does Nothing
APPLE - Arrogance Produces Profit-Losing Entity
SCSI - System Can't See It
DOS - Defunct Operating System
BASIC - Bill's Attempt to Seize Industry Control
IBM - I Blame Microsoft
DEC - Do Expect Cuts
CD-ROM - Consumer Device, Rendered Obsolete in Months
OS/2 - Obsolete Soon, Too.
WWW - World Wide Wait
MACINTOSH - Most Applications Crash; If Not, The Operating System Hangs
MDI is being "outlawed" by Microsoft. MFC probably won''t even support it when the new msvs comes out.
MDI is being "outlawed" by microsoft? do you know what they''re replacing it with?
--
Float like a butterfly, bite like a crocodile.
--
Float like a butterfly, bite like a crocodile.
--Float like a butterfly, bite like a crocodile.
quote: MDI is being "outlawed" by Microsoft. MFC probably won''t even support it when the new msvs comes out.
When you make statements like this, please back them up.
I would be INCREDIBLY surprised if this were true. Of the three application paradigms MFC offers (Single Document Interfact, Multiple Document Interface and Dialog-Based), MDI is the most versatile. Furthermore, in order to conform to its own standards, all MFC must contain backwards-compatible code in its DLLs, so MDI should still be in the next release.
Please, let us know where you got this information.
Well I have also heard that MS advise programmers to use SDI instead of MDI (Have read it in both Programming Windows and Programming Windows with MFC).
Instead of MDI an application should start mutiple instances of itself.
You can see an example of this in Word2000:
if you open up two documents in the same instance of word, word will start up another instance of itself.
The reason why MDIs should be avoided is following to MS, that MDI is confusing for the user.
Still I think MDI is cool, and I don´t ever think it will be removed from MFC, but who knows
Instead of MDI an application should start mutiple instances of itself.
You can see an example of this in Word2000:
if you open up two documents in the same instance of word, word will start up another instance of itself.
The reason why MDIs should be avoided is following to MS, that MDI is confusing for the user.
Still I think MDI is cool, and I don´t ever think it will be removed from MFC, but who knows
<<>> The Big ? <<>>
I too have read that MS is trying to phase MDI out. I think MS saying it is confusing to the user is lame though. For Word2000, going down the SDI road and just creating new instances works well. Instead of minimizing the document you are working on, the maximizing the document you WANT to work on, you just click the Word2000 instance that has the doc open, on the task bar. However, for MSVC this approach would suck...
There''s my two cents
There''s my two cents
I dont think MS will phase MDI out on all products, just consumer level things. Hopefully, the programmers at MS realize that developers would like the MDI versatility in development tools, and that most developers arent confused by such things. I can see what they mean about applications like word though, but as an alternative, it would be really cool if you could choose how it behaves(yes, i know it would be hard to do debug,etc., but thats what those MS programmers get paid so well for ) that would be the ideal situation for all users in any application I think.
---------------------------Hello, and Welcome to some arbitrary temporal location in the space-time continuum.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement