15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


removing text from icon

Ramaswamy Hari -- hari@nextwave.com
Monday, February 05, 1996

Hi,
	I have an mfc MDI application in which I create multiple views of a 
document. When I iconify the views I get an icon and a piece of text at
the bottom of the icon. What I really need is something similar to 
windows 95 where I have a small bitmap and the text appearing to the
right of the bitmap. I could make the icon owner drawn by overriding 
OnPaint and OnQueryDragIcon functions. But how do I get rid of the text
from the bottom of the icon ?  Also since each icon I generate will be
different widths how do I make sure that the arrange icons menu item in the
windows pulldown in my application will calculate the width and height 
of each of my icon properly ?

thanks in advance for your help.

-hari




Mike Blaszczak -- mikeblas@msn.com
Monday, February 12, 1996

This isn't going to be very easy.  If you remove the text from the icon, what 
do you want the corresponding entry in the "Window" menu to say?

.B ekiM
TCHAR sz[] = _T("");

----------
From: 	owner-mfc-l@netcom.com on behalf of Ramaswamy Hari
Sent: 	Monday, February 05, 1996 11:22
To: 	mfc-l@netcom.com
Cc: 	hari@nextwave.com
Subject: 	removing text from icon

Hi,
	I have an mfc MDI application in which I create multiple views of a 
document. When I iconify the views I get an icon and a piece of text at
the bottom of the icon. What I really need is something similar to 
windows 95 where I have a small bitmap and the text appearing to the
right of the bitmap. I could make the icon owner drawn by overriding 
OnPaint and OnQueryDragIcon functions. But how do I get rid of the text
from the bottom of the icon ?  Also since each icon I generate will be
different widths how do I make sure that the arrange icons menu item in the
windows pulldown in my application will calculate the width and height 
of each of my icon properly ?

thanks in advance for your help.

-hari





Deepak Saxena -- Deepak_Saxena@ccm.ch.intel.com
Tuesday, February 13, 1996


The text that appears underneath the icon is the title of your 
MDIChildWnd.  So in your derived ChildWnd you are using, just change the 
title to the window to "" whenever the user iconizes it and change it 
back to normal when he restores it.  Use CWnd::SetWindowText() to set 
the title.

----------
From:      owner-mfc-l@netcom.com on behalf of Ramaswamy Hari 
Sent:      Monday, February 05, 1996 11:22
To:      mfc-l@netcom.com
Cc:      hari@nextwave.com
Subject:      removing text from icon

Hi,
     I have an mfc MDI application in which I create multiple views of a
document. When I iconify the views I get an icon and a piece of text at 
the bottom of the icon. What I really need is something similar to 
windows 95 where I have a small bitmap and the text appearing to the 
right of the bitmap. I could make the icon owner drawn by overriding 
OnPaint and OnQueryDragIcon functions. But how do I get rid of the text 
from the bottom of the icon ?  Also since each icon I generate will be
different widths how do I make sure that the arrange icons menu item in the 
windows pulldown in my application will calculate the width and height
of each of my icon properly ?

thanks in advance for your help.

-hari



Nanda -- nanda@genius.tisl.soft.net
Thursday, February 15, 1996

You can do the following:
	when your view is getting minimised, change the caption to "". 
This will remove the text displayed along with the icon. You have to 
store the caption of your view in the view class, so that when the view 
gets restored/maximised you set back the caption.
	Whenever the "Window" menu is selected you have to modify the menu
items for the minimised views, to display the window caption. Store the view
captions and their status in the mainframe. Now on InitMenupopup traverse 
the popup menu and find the menuitems which doesn't display the captions 
of the views and modify them.

Nanda

> Date: Mon, 12 Feb 96 05:15:25 UT
> From: Mike Blaszczak 
> To: mfc-l@netcom.com
> Subject: RE: removing text from icon
> 
> This isn't going to be very easy.  If you remove the text from the icon, what 
> do you want the corresponding entry in the "Window" menu to say?
> 
> .B ekiM
> TCHAR sz[] = _T("");
> 
> ----------
> From: 	owner-mfc-l@netcom.com on behalf of Ramaswamy Hari
> Sent: 	Monday, February 05, 1996 11:22
> To: 	mfc-l@netcom.com
> Cc: 	hari@nextwave.com
> Subject: 	removing text from icon
> 
> Hi,
> 	I have an mfc MDI application in which I create multiple views of a 
> document. When I iconify the views I get an icon and a piece of text at
> the bottom of the icon. What I really need is something similar to 
> windows 95 where I have a small bitmap and the text appearing to the
> right of the bitmap. I could make the icon owner drawn by overriding 
> OnPaint and OnQueryDragIcon functions. But how do I get rid of the text
> from the bottom of the icon ?  Also since each icon I generate will be
> different widths how do I make sure that the arrange icons menu item in the
> windows pulldown in my application will calculate the width and height 
> of each of my icon properly ?
> 
> thanks in advance for your help.
> 
> -hari
> 
> 
> 
> 




| Вернуться в корень Архива |