|
Hello guys,
I'm quite new on COM and maybe what I'm asking it's stupid : in VC++ is there an automatic way to add another interface to an existing class which already has one or I have to do it by hand? If so, in which file I have to add it (idl, header file of the class)?
Thank you very much,
Thomas
|
|
|
|
|
You can go to the class view tab in the workspace manager, then right click on your com class. There should be a number of options to help you manage the functions and the interfaces in your object, whether you are using MFC or ATL to create your object.
|
|
|
|
|
There are a lot of options in that popup menu but none of it is dealing with adding a new interface ...
|
|
|
|
|
It's a good practice to always start in the IDL file. try the IDL interface keyword.
#define MOSTLY_LEAN_AND_MEAN
|
|
|
|
|
Sorry for asking : what is all about #define MOSTLY_LEAN_AND_MEAN ?
|
|
|
|
|
I want to give the user the opportunity to adjust the dpi before printing. I have overridden CPrintInfo and can get my CMyPrintInfo to display instead. I'm confused with the dpi in the DEVMODE structure. Is dmPrintQuality just the horizontal resolution? Can I set dmYResolution to be any value between 1 and pDC->GetDeviceCaps(LOGPIXELSY) or are there specific hardware dependant values?
When I do a "GetDevMode()->dmPrintQuality = DMRES_DRAFT", nothing changes on the output.
If anyone can shed some light on any of these issues, I'd be very grateful.
|
|
|
|
|
I want to repaint a WebBrowser control placed in a dialog window, after a resize operation (MoveWindow). I've tried with InvalidateRect and nothing happened.
rechi
|
|
|
|
|
bogdan_rechi wrote:
I want to repaint a WebBrowser control placed in a dialog window,
You can't actually repaint the webbrowser,
But you can Refresh() ;
This can cause another navigation,
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
I think it's interesting that we often qu-ote each other in our sigs and attribute the qu-otes to "The Lounge". --- Daniel Fergusson, "The Lounge"
|
|
|
|
|
Anybody know how to create a shortcut to "My Computer" & "My Network Places" using MFC?
Any help would be appreciated...
|
|
|
|
|
I think you need to look at the Shell API functions. Look for CSIDL_DRIVES. Hope that's of some help.
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
I have visual c++ 6.0 and I can draw nice looking icons
with about 8 colors to choose from. I have seen some
really nice icons with more than 8 colors and great
shape.
Is there a better way of creating icons? I can't use
ms paint or other devices, because I can't save it as
a .ico file. If I save a beautiful image as a bitmap,
then I can't transfer the image to *.ico file format.
Any ideas?
Any response any one can give me will be greatly appreciated.
Sincerely,
DanYELL (an overworked graduate student)
|
|
|
|
|
Try to draw on paint-brush on 32x32 pxls image, save it to BMP, rename it to ICO.
You won't be able to see it in the MSDEV icon editor, but you can use it.
--BlackSmith--
"With the help of all mighty", 2001, Me.
|
|
|
|
|
BlackSmith wrote:
Try to draw on paint-brush on 32x32 pxls image, save it to BMP, rename it to ICO.
You won't be able to see it in the MSDEV icon editor, but you can use it.
Technically the header information in an icon is different than that of a bitmap. It'll work it some instances, but not for all. What's worse, using paint will only allow you to save one image instead of having all your resolutions.
I have to go with Nish (see below) on this one. I use Microangelo for my icons. It's well worth the $50.
Jeremy L. Falcon
"The One Who Said, 'The One Who Said...'"
Homepage: imputek.com
|
|
|
|
|
|
How to create sexy icons...???
Take a picture of me, resize to 32x32 and change color depth to 256 colors at best on win98 (i think).
Just jokes.
Ummm what I do is a bit of a hack, but still a solution.
Create the image in Paint (I would suggest you download PSP) as 32x32.
save as 256 color bitmap gif or jpeg.
Ctrl+A
Ctrl+C
Open VC++ resource editor create a new icon with 256 colors 32x32 resolution. Ctrl+V.
Whola!!! cheap export of bitmap to icon...
Other suggestions...look for a free d/l graphics files converter. I think you can convert from ICO to BMP and back.
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
|
DanYELL wrote:
How can I create sexy looking icons?
Put Elle Macpherson on them ? :P
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
Actually Visual Studio comes with a sample program called "IconPro" (search your HD for it, you have to compile it yourself). It has a feature for converting .bmp files to .ico files. and it supports icons up to 128 * 128 pixels, and 32 bit colour. I use it frequently.
---
CPUA 0x5041
Sonork 100.11743 Chicken Little
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
I want to make the translucence,that is i want to see the background from the dialog which just on the background.
And I am working in win98.
thank you for your help!
|
|
|
|
|
Search for Opaque and Transparent .
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
I use the following code to change the dialog into transparent ,but failed.The dialog is a child wnd in a CRichEditView,and it has not titlebar
m_bf.SourceConstantAlpha = 0;
m_bf.BlendOp = AC_SRC_OVER;
m_bf.BlendFlags = 0;
m_bf.AlphaFormat = 0;
m_nWidth=rc.Width ();
m_nHeight=rc.Height ();
CBitmap m_bitmap;
CClientDC dc(this);
CDC dcMem;
dcMem.CreateCompatibleDC(&dc);
::AlphaBlend(dc, 0,0, m_nWidth, m_nHeight, dcMem, 0,0,m_nWidth, m_nHeight,m_bf);
|
|
|
|
|
I'm not sure I understand you fully, but if you want to see through some portions of your dialog I think all you do is make your brush NULL.
Maybe have to handle WM_ERASEBKGND with FALSE or TRUE too...
Look around CP there are lots of examples of Skinned sytle apps using bitmaps, regions whatever....
Cheers!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
thank you for help!
If I want make alpha value of dialog is between 10 and 200.How can I?
|
|
|
|
|
I’m tired and grumpy... I’m at the end of a project and the last thing I have left is, of course, the stuff I really don’t want to do.
The application I’ve written calls for a "Search for Files" type view. Basically duplicating the "Start/Search" functionality. Don’t ask... I’ve been asking that myself and all I get is a “it’s got to be there”.
I’m not up to reinvent the freaking wheel. Given that the "Search" in Windows (XP in this case) is already there and it seems to be a simple HTA type application, how do I get it into an embedded CHtmlView? (by the way, I'm stuck with VC6 for the time being).
The alternative to that is to write a recursive search engine and fill up my own list control, implementing that obnoxious Shell ID’s crap, icons, context menus, drag & drop, you know the drill. I really don’t feel like it. Unless, of course, you have something like that already. If that’s the case, let’s talk...
Thanks,
g
|
|
|
|
|
There is an advanced CListCtrl under List controls section here at CP. The control implements drag and drop behavior and uses the system image list I think.
This isn't exactly the everything done for you, but it's a start...
Have a day!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|