Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

ody

MFC/MDI

This topic is 6917 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
MDI is being "outlawed" by microsoft? do you know what they''re replacing it with?


--
Float like a butterfly, bite like a crocodile.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!