Maximizing a child without docking it to the Mainframe

I have an MDI application, and want to implement the next feature: When the
user hits the MAXIMIZE button in a child frame, it grows to a certain size,
but DOESN'T dock to the mainframe.
Right now, I've written some code overriding the OnGetMinMaxInfo event in
the ChildFrame class, that does the part of maximizing the window just to
the desired size, but the child in anyway docked to the mainframe. I tried
commenting out the call to the base function
(CMDIChildWnd::OnGetMinMaxInfo(lpMMI)) but without any results. I don't know
if there's any other event I can override to avoid the docking.

Does anybody have some extra tips about it?

Thanks a lot for your help.

Atly.
Alvaro Palma


0
8/17/2004 7:15:15 PM
vc.mfc 33608 articles. 0 followers. Follow

3 Replies
565 Views

Similar Articles

[PageSpeed] 59

Capture the WM_SYSCOMMAND (You can have MFC map it - OnSysCommand) in the
child form. Look for SC_MAXIMIZE in the nID parameter. Do your sizing of the
form and don't call the base class to abort.


"Alvaro Palma" <invalid_address@invalid_domain.com> wrote in message
news:OuVbI6IhEHA.3024@TK2MSFTNGP10.phx.gbl...
> I have an MDI application, and want to implement the next feature: When
the
> user hits the MAXIMIZE button in a child frame, it grows to a certain
size,
> but DOESN'T dock to the mainframe.
> Right now, I've written some code overriding the OnGetMinMaxInfo event in
> the ChildFrame class, that does the part of maximizing the window just to
> the desired size, but the child in anyway docked to the mainframe. I tried
> commenting out the call to the base function
> (CMDIChildWnd::OnGetMinMaxInfo(lpMMI)) but without any results. I don't
know
> if there's any other event I can override to avoid the docking.
>
> Does anybody have some extra tips about it?
>
> Thanks a lot for your help.
>
> Atly.
> Alvaro Palma
>
>


0
drpazz (112)
8/18/2004 9:40:07 AM
Thanks a lot. This did the trick, however, I still have some issue. If I hit
the Maximize box, the OnSysCommand(SC_MAXIMIZE,...) is triggered and handled
in my App, preventing the application to dock in the Mainframe. BUT if I
double click in the title bar of the Childframe, it still is maximized in
the "typical way".

So my question is: Does anybody know what is the message to be handled in
that case? Spy++ only shows WM_SYSCOMMAND. Maybe I have to override
OnGetMinMaxInfo, but I don't thing that this is the particular message I'm
interested in, but just an information collector.

And thanks again for your attention.

"Eddie Pazz" <drpazz@hotmail.com> wrote in message
news:OR9DjfQhEHA.4092@TK2MSFTNGP10.phx.gbl...
> Capture the WM_SYSCOMMAND (You can have MFC map it - OnSysCommand) in the
> child form. Look for SC_MAXIMIZE in the nID parameter. Do your sizing of
the
> form and don't call the base class to abort.
>
>
> "Alvaro Palma" <invalid_address@invalid_domain.com> wrote in message
> news:OuVbI6IhEHA.3024@TK2MSFTNGP10.phx.gbl...
> > I have an MDI application, and want to implement the next feature: When
> the
> > user hits the MAXIMIZE button in a child frame, it grows to a certain
> size,
> > but DOESN'T dock to the mainframe.
> > Right now, I've written some code overriding the OnGetMinMaxInfo event
in
> > the ChildFrame class, that does the part of maximizing the window just
to
> > the desired size, but the child in anyway docked to the mainframe. I
tried
> > commenting out the call to the base function
> > (CMDIChildWnd::OnGetMinMaxInfo(lpMMI)) but without any results. I don't
> know
> > if there's any other event I can override to avoid the docking.
> >
> > Does anybody have some extra tips about it?
> >
> > Thanks a lot for your help.
> >
> > Atly.
> > Alvaro Palma
> >
> >
>
>


0
8/18/2004 8:58:30 PM
I answer to myself: Just handle OnNcLButtonDblClk in the ChildFrame. Anyway,
it's a shame that most of this messages aren't covered by the ClassWizard.

"Alvaro Palma" <invalid_address@invalid_domain.com> wrote in message
news:uG%23oKYWhEHA.2952@TK2MSFTNGP09.phx.gbl...
> Thanks a lot. This did the trick, however, I still have some issue. If I
hit
> the Maximize box, the OnSysCommand(SC_MAXIMIZE,...) is triggered and
handled
> in my App, preventing the application to dock in the Mainframe. BUT if I
> double click in the title bar of the Childframe, it still is maximized in
> the "typical way".
>
> So my question is: Does anybody know what is the message to be handled in
> that case? Spy++ only shows WM_SYSCOMMAND. Maybe I have to override
> OnGetMinMaxInfo, but I don't thing that this is the particular message I'm
> interested in, but just an information collector.
>
> And thanks again for your attention.
>
> "Eddie Pazz" <drpazz@hotmail.com> wrote in message
> news:OR9DjfQhEHA.4092@TK2MSFTNGP10.phx.gbl...
> > Capture the WM_SYSCOMMAND (You can have MFC map it - OnSysCommand) in
the
> > child form. Look for SC_MAXIMIZE in the nID parameter. Do your sizing of
> the
> > form and don't call the base class to abort.
> >
> >
> > "Alvaro Palma" <invalid_address@invalid_domain.com> wrote in message
> > news:OuVbI6IhEHA.3024@TK2MSFTNGP10.phx.gbl...
> > > I have an MDI application, and want to implement the next feature:
When
> > the
> > > user hits the MAXIMIZE button in a child frame, it grows to a certain
> > size,
> > > but DOESN'T dock to the mainframe.
> > > Right now, I've written some code overriding the OnGetMinMaxInfo event
> in
> > > the ChildFrame class, that does the part of maximizing the window just
> to
> > > the desired size, but the child in anyway docked to the mainframe. I
> tried
> > > commenting out the call to the base function
> > > (CMDIChildWnd::OnGetMinMaxInfo(lpMMI)) but without any results. I
don't
> > know
> > > if there's any other event I can override to avoid the docking.
> > >
> > > Does anybody have some extra tips about it?
> > >
> > > Thanks a lot for your help.
> > >
> > > Atly.
> > > Alvaro Palma
> > >
> > >
> >
> >
>
>


0
8/18/2004 9:20:31 PM
Reply:

Similar Artilces:

Sync PST between Desktop and laptop without Exchange Server
hi everyone, i like to sync my outllook with my desktop and laptop without exchange server. any one has idea how to do this? thanks Vishal Check out http://www.slipstick.com/outlook/sync.htm -- PATRICK REED [Outlook - MVP]~~~~~~ -Microsoft Certified Professional (MCP) -Have you checked http://www.slipstick.com? -Please post your Outlook version! "Vishal" <visjunk2003@hotmail.com> wrote in message news:ehynIjL7DHA.3648@TK2MSFTNGP11.phx.gbl... > hi everyone, > > i like to sync my outllook with my desktop and laptop without exchange > server. > >...

Exchange 2010 without AD
OK, I read that exchange 2010 sits on powershell and does not integrate with AD. Can exchange2010 run without AD? Carl On Mon, 22 Mar 2010 15:45:30 -0500, "MRNews" <nf@no.com> wrote: >OK, I read that exchange 2010 sits on powershell and does not integrate with >AD. You read wrong! >Can exchange2010 run without AD? No. --- Rich Matheisen MCSE+I, Exchange MVP On 3/22/2010 1:45 PM, MRNews wrote: > OK, I read that exchange 2010 sits on powershell and does not integrate with > AD. Can exchange2010 run without AD? > When on ...

Can't maximize a workbook
I tried to open a workbook on my office computer - has a 19 inch monitor. I created the workbook at home with a wide inch lcd display - display 1680 x 1040. When I open the file on my office computer - the top of the workbook is hidden behind the toolbars - so i can't get at it and maximize it. I tried everything I could think of - zoom; adjust the screen resolution in windows - all to no avail. Anybody got any ideas? Thanks Richard -- rgarber50 ------------------------------------------------------------------------ rgarber50's Profile: http://www.excelforum.com/member.php?...

Switching between view on SDI with or without docview support
I have another question about how to switch between views. On my last project we wrote a SDI application entirely built with views, it means that we don't use CDialog at all even for error message. It was a bit difficult because to handle all these views we had to keep information about them. For instance we have a structure like this CViewMgr::ViewInfo g_ViewInfo[] = { { CViewMgr::MAIN_VIEW, CViewMgr::CREATE_ONCE, IDR_MAINFRAME, RUNTIME_CLASS(CMainView), NULL,0 }, { CViewMgr::WELCOME_VIEW, CViewMgr::CREATE_AND_DESTROY, IDR_MENU_OKCANCEL, RUNTIME_CLASS(CWelcomeView), NULL,0 }...

260 days without a backup and counting
Let me start by letting you know I am in over my head on this but I love a good challenge. My problem is backing up exchange. Online backup errors out as follows: "WARNING: Portions of "\Mailbox Store (server)" cannot be read. The backed up data is corrupt or incomplete. This file will not restore correctly." This occurs after backing up 120 MB. Offline backup has the same result with the same error for the public folder store, and log files but does not copy a single file. I have used eseutil to examine both priv1 and pub1.edb and both databases are in a consist...

Office:mac disk ejects without loading??
Has anyone else had this problem with Office:mac? Trying it on a new macbook pro (intel). This is the only CD that won't run. There are no surface marks or defects. Any ideas? Hi Claude - Just because *you* can't see the flaws of a CD/DVD doesn't meant the 'eye' of an optical drive can't, so I wouldn't rule out a defective disk just yet. The defect doesn't have to be physical - it can happen during the recording process if the disk isn't written to correctly. Can you test the disc on another Mac? Are there any error messages? If so, what do they say?...

how do I activate links without opening external workbooks?
How can I activate my Excel links when the “Update Links” selection in the Edit pull-down menu is ineffectual, without resorting to opening the aforementioned linked workbooks? ...

don't want to show images for treeview child items
Hi, I set up a tree view control. I see all of the child items inherit their images from their parents. But for some child items, I don't want to show any image at all. How do I kill the inheritance? Your help is appreciated. JD I don't about child items inheriting images from the parent. But when you add your child items pass a -1 to InsertItem as the Image index. AliR. "JD" <jdt_young@yahoo.com> wrote in message news:uwvPga8%23HHA.5404@TK2MSFTNGP02.phx.gbl... > Hi, > > I set up a tree view control. I see all of the child items inherit their...

Access for everyone without passwords..
currently i have set up a ssrs 2005 and users that view the reports use their domain account. I would like to create one report where anyone in the company can view it. How can I do this? Brian Most domains have a group that includes all users for the domain. Using Reportings Services Roles and security usually gets inherited from the root (home). But you can override that. So just change the security for the specific report to the group that includes all users. -- Bruce Loehle-Conger MVP SQL Server Reporting Services "Brian S." <bsgallatin@community.n...

Get a label value from a MDI child form
I'm obviously new at C# and this question is more about the language than the example. I have a MDI child and I want to get/set a label (labIndex) value on another child form. I have: private string labIndex { get {return labIndex.value; } set {labIndex.value = value; } } public static string getIndex() { return labIndex; << but this can't be seen because it's inside a static method } So, how to I get and set the labIndex.value?? Thanks in advance! On 12/13/2009 10:30 AM, Steve Ricketts wrote: > I'm obviously new at C# and ...

How to sort CListCtrl without changing the per-item data?
Hi, I'm using visual c++ 6. I want to sort the CListCtrl. But I don't want to use SetItemData because I want to use the per-item data in another place. Can I sort the CListCtrl without changing the per-item data? Thanks in advanced. You could use a virtual list control and then just sort your external data (any way you want actually). Tom "bucher" <bucher@xxxx.com> wrote in message news:eQ3r7AUkHHA.4676@TK2MSFTNGP02.phx.gbl... > Hi, > > I'm using visual c++ 6. I want to sort the CListCtrl. But I don't want to > use SetItemData because I ...

Copy worksheet without names
I have a workbook that generates summary data from data validation lists and formulas. Once the data is set a macro is ran that creats a "clean" sheet preplacing the formulas etc with just the values, then removes all names from the clean sheet. The clean sheet is moved to a new workbook by right clicking the tab and selecting the new notebook... The problem is that the global names in the source notebook get copied to the new notebook. Is it possible to move the clean sheet so that it is realy "clean". thanks Robert Maybe you can copy|paste special values i...

Can I print calendars without start & end times?
This would be a good thing for our employee vacation calendar since the time takes up too much page in each printed cell, but I can't figure out how to do it! Mary if they show on the outlook calendar, they will print if there is room. Turn them off on the outlook calendar by right clicking on the grid and choosing other settings and uncheck Show end times. -- Diane Poremsky [MVP - Outlook] Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstick.com/ Outlook Tips by email: mailto:dailytips-subscribe-request@lists.outloo...

dateTime Without Timezone?
This is a multi-part message in MIME format. ------=_NextPart_000_0010_01C5D8AC.B570CBD0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I am trying to create XML from a dataset using the WriteXml function. = This is what it is creating for my dateTime column/element: definition =3D=3D=3D=3D=3D=3D=3D=3D=3D <xs:element name=3D"last_maint_dt" type=3D"xs:dateTime" /> data produced =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D <last_maint_dt>2006-06-02T00:00:00.0000000-05:00</last_maint_dt> Is there a way I can ...

Install Money 2005 without passport
I have installed money 2005 without a passport at least twice before, but I can't remember how I did it. Why is Microsoft so intent on people using the passport anyway? I don't want to use it and I feel it's an invasion of my privacy to be forced to use it simply to use a program. 1) It's not clear how Passport/WinLive ID in and of itself invades your privacy, but many users feel the same way. 2) Microsoft wants people to use Passport/WinLive ID for many reasons, some noble (it provides a password recovery mechanism, for instance, which the local Money password does n...

Opening a file with code without a set file name #3
Your such a sweet heart THANK YOU. You actualy jogged my memory and made me think of another option. I'm gonna try ApplicationFindFile so they can select the 1 they need. As far as your code i have use for it in my new program im making. Man there is much to learn. Nothing like putting the puzzle together hu. i love it and you for the help you gave....... XOXO Thank you, Pj JulieD Wrote: > Hi > > how about something like > > dim fname as string > > fname = inputbox("What is the name of the file?")- > > Sheets("stby").Select >...

assigning a multi-dimensional array to a combobox.List??? without loops
Why is this working? I have a combobox cbBox and an array say arr(1 to 10, 1 to 5). This seems to work but I was wondering if anyone had encountered this yet. If I say cbBox.List = arr it will display the elements along the first dimension. But if you check cbBox.List is a 2-d array(0 to 9, 0 to 4) Is there any documentation that shows that this usage is fine? Thanks It is fine. You can show those extra columns by changing the ColumnCount property of the combobox. Even if you don't the data is still there, and you can access it, it just doesn't show. -- ___________________...

Can I change product key without re-installing the programme?
Someone helped me and installed Microsoft office ultimate 2007 on my computer. After a while office signalled that this version was not genuine. I was directed to the microsoft homepage. I bought a new version of office ultimate 2007 so that it would be genuine. I got a product key Now my question: Can I change the product key without re-installing the office software? I have many office files on my computer and I do not want them to dissapear. I would also prefer not to re-install the software as it takes time and will probably add a lot of file fragments on my computer. U...

A subform Link Child Fields, Link Master fields problem (newbie question)
THis is a very basic question, since I'm learning Access without a book, so don't read too much into it, and from my description I trust you understand where I'm going. This post is a repost of another thread that got rather long so I broke it into a new post. As you can see below, the issue is how to bring into your child subform a field that is not a migrated primary key (that is, is not a foreign key) from the parent form, so that this field can be bound to control (e.g. a text box) in the child subform, mainly so that the user of the subform has a visual clue (ie the field wi...

Section size in maximized view
I have a form with 2 subforms in the form footer, all on one page. My two subforms are in a continuos line format. I want to be able to maximize the form window, and have the two subforms take up the majority of the page. I set the section sizes in design view to the sizes I wanted, but when I maximize in form view, there is a large (2") blank section bordered off. How do I get rid of this empty space? ...

GAL OWA 2003 not populated without search
I am running Exchange 2003 enterprise with OWA and HTTP over RPC turned on. When users click the TO button whiule generating a new OWA email message the Global Address List comes up empty. If you search for something users show up. I would like to have all users show up like they do in Outlook without having to search. Hi Scott, You have mentioned that OWA doesn't pull up the GAL by default. This is by design to reduce the load on the client machine. Only when you query for a name will the client pull the corresponding entries from the mail server. Regards, (Imay) Imayavaramb...

Manage Contacts without Admin Priv
We are wanting to let certain users manage the external contacts in the recipients container without giving the user ADMIN privilege to those users. We have quote a few external contacts that change continually. How do you do this??? ...

Synch OST file without opening Outlook?
Can you set Outlook to synch it's offline file to Exchange without opening Outlook? Can you set it for every x minutes? We have several users with laptops that will be connecting to a Terminal Services session both in and out of the office. I'd like them to have the ability to open their local laptop copy of Outlook while unable to connect to the Internet / Network and see the latest Exchange data since they left the office. I do not want them to need to open Outlook outside of their Terminal Services session while at the office. Even if I could give them an icon they could click ...

Importing from Maximizer to MSCRM
Has anyone experience importing data from Maximizer into MSCRM? If so, is it easier to use something like Scribe (you still have to import to a .csv file first), or stay with the Data migration Framework? Is this more complicated than importing from other databases? Many Thanks Cathy Allington I have no experience with Maximiser but assuming you can get the data out into a usable format that you have multiple options write your own code to import look at scribesoft to see if their products can handle the import Use the DMF. How easy is the maximizer database to user? for example which ...

Load a child entity in a IFRAME inside a new TAB
Hello the problem is the following: When i put the IFRAME in the General Tab (tabTab0), the IFRAME works great, but when i change the IFRAME to another Tab, the IFRAME doesn't show anything. I try to show a related child entity in this IFRAME. Here is my javascritpt code. I put this code in the OnLoad( ) Event: var sUrl=crmForm.all.IFRAME_VEntas.src; sUrl = sUrl + "?id=" + crmForm.all.new_idventa.DataValue + "&etc=" + "10001"; crmForm.all.IFRAME_VEntas.src = sUrl; var sUrl=crmForm.all.IFRAME_Marketing.src; sUrl = sUrl + "?id=" + crmForm.all....