|
Have a look at the IconPro sample included on the MSDN CD
|
|
|
|
|
|
Thank you for your reply. I think that's what I want to know.
I'm going to see the recommended article in detail.
-------------------------------
Masahiro Kurosawa
kurosaw@itg.hitachi.co.jp
-------------------------------
|
|
|
|
|
At first, I greatly appreciate your advice. I can understand how to customize the icons
and icon handler architecture.
Well, I have another question:
- - -
How to retrieve a handle to an icon from the specified file as we can do same thing from
DLL or EXE using 'ExtractIcon' function ?
- - -
I'm sorry to trouble you so often. If you can find time for me, please tell me the solution
about this.
-------------------------------
Masahiro Kurosawa
kurosaw@itg.hitachi.co.jp
-------------------------------
|
|
|
|
|
How to retrieve a handle to an icon from the specified file as we can do same thing from DLL or EXE using 'ExtractIcon' function?
Sorry, I don't quite understand what you're asking. Is ExtractIcon not working?
--Mike--
http://home.inreach.com/mdunn/
The preferred snack of 4 out of 5 Lounge readers.
|
|
|
|
|
Oh, I apologize to you if my description was not enough.
At first, Visual C++ 6.0 Help reads that ExtractIcon function retrieves a handle to an icon from
the specified executable file, dynamic-link library (DLL), or icon file. Then, I actually try to use
ExtractIcon function for text file (.txt), but ExtractIcon would not work as Help reads.
If there is a way to retrieve a handle to an icon from '.EXE', '.DLL', or '.ICO', I think there is also
a way to do same from '.TXT'.
Should I use IExtractIcon interface like Explorer? If so, I want to know how to use IExtractIcon
interface ( I understand how to implement IExtractIcon interface for Explorer to use thanks to
you ). Or, If there is more easier way like using ExtractIcon for '.EXE', '.DLL', or '.ICO, please instruct
me.
-------------------------------
Masahiro Kurosawa
kurosaw@itg.hitachi.co.jp
-------------------------------
|
|
|
|
|
Ah ok, you want to get the icon that's used for TXT files, right? The way to do that is with SHGetFileInfo(), such as:
SHFILEINFO info;
SHGetFileInfo ( _T("foo.txt"), FILE_ATTRIBUTE_NORMAL, &info, sizeof(SHFILEINFO),
SHGFI_ICON | SHGFI_USEFILEATTRIBUTES );
After that, info.hIcon is the icon. Add SHGFI_SMALLICON to the flags if you want the small (16x16) icon.
--Mike--
http://home.inreach.com/mdunn/
The preferred snack of 4 out of 5 Lounge readers.
|
|
|
|
|
Yes, that's what I want to do. Thank you very much.
Also, I'm coming to understand where I should refer in VC++ Help thanks to
your advices, so I wish to express my appreciation to you again.
Thanks a lot.
Sincerely yours
-------------------------------
Masahiro Kurosawa
kurosaw@itg.hitachi.co.jp
-------------------------------
|
|
|
|
|
|
Hi,
I faced some problem when develop a small Internet reliant application, could you help me to solve them ?
How to use get/put_onsubmit method of interface IHTMLFormElement when hosting a WebBrowser control in an
application ?
How to hosting more than one WebBrowser control in an application, which use same session on the server ? Once the
session is authenticated by first created control, other controls can enlist in the same session.
Thank you.
|
|
|
|
|
Does anybody know how to display a bitmap from memory DC into the SS_BITMAP-style static control ? Where shuld be this memory DC derived from ?
Thanks for suggestion.
Petr Pivonka
|
|
|
|
|
Your memory DC would be a CDC and as a bitmap static gets set with a bitmap, I'd suggest using GetCurrentBitmap to get the bitmap out of the DC and pass into the static.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
I'm looking for a C(++) library which would enable me to work
with 32-bit CRC. I would also appreciate some reference to
any theory behind that. Will somebody help me? Thanks.
Marek Svantner
|
|
|
|
|
Take a look at the zlib, this compression library comes with a crc32 algorithm, the link for zlib is:
http://www.info-zip.org/pub/infozip/zlib/
Rui Lopes
|
|
|
|
|
Take a look at http://sourceforge.net/projects/yeasoft/ - In that class library you will find a class for calculating the CRC-32. The related files are yCrc32.h, yCrc32.inl and yCrc32.cpp and you can find them browsing the CVS repository.
|
|
|
|
|
I would like to know an API/APIS which can help me to catch the physical path of a file which is given for print along with reading the parameters from the print dailog box.
I'll be waiting for reply from anyone who can help me to solve this problem.
|
|
|
|
|
I have an MFC Dialog based application. Using other code samples I added a toolbar to my dialog and added support for the tooltips, etc. It works great. I have a couple instances where I need to disable some of the buttons on the toolbar. I figured out a way to do this with using CToolBar::GetToolBarCtrl function and using the SetState function with the indeterminate flag. However, all my reading suggests that the proper way to do this is to use ON_COMMAND_UI for the button I want to disable.
Well, ON_COMMAND_UI needs a CFrame to work correctly. For a dialog, the ON_COMMAND_UI handlers you set up for each button on the toolbar is never even called so I can't call the pCmdUI->Enable(false) to disable the item. If you are writing a dialog based app (as I am) your best bet currently appears to be to use WM_KICKIDLE instead. However, that doesn't give me the ON_COMMAND_UI handler I need (the CCmdUI pointer). I could use OnKickIdle and call the OnCommandIUI handlers myself creating and passing a pointer to a CCmdUI object I populate myself but I can't seem to get this to work.
Could someone tell me the proper way and demonstrate fully? I've tried so many different things without success and while my hack(?) appears to work, I'd like to do it the proper way.
Thanks.
Matt Philmon
|
|
|
|
|
Your OnKickIdle() handler should call UpdateDialogControls(this, FALSE); which will call the UPDATE_COMMAND_UI handlers for you.
--Mike--
http://home.inreach.com/mdunn/
The preferred snack of 4 out of 5 Lounge readers.
|
|
|
|
|
True enough... but not for Toolbar buttons. UpdateDialogControls will get UPDATE_COMMAND_UI working for standard controls(buttons, text boxes, whatever) but not for a toolbar button. I'm not EXACTLY sure for the reason. Maybe it's because toolbars aren't exactly intended to Dialog base apps.
|
|
|
|
|
Could someone tell me how can i know if a file or folder is shared in VC++? Is there any attribute to indicate that the file or folder is shared?
|
|
|
|
|
Can anyone point me to manual, where i can read about developing datasource?
I mean i need to implement my own datasource... where to read about?
|
|
|
|
|
Hi Dmitriy!
I guess, that the way you have to go is OLEDB Provider....so search for this on MSDN....and CodeProject too of course
Regards,
Attila Hajdrik
|
|
|
|
|
I am trying to change the hostname in win9x and NT and then alert the DHCP server that I have a
new name so he can update DNS. Ideally I want this to happen without rebooting, but I realize this may not be possible.
Currently, when I change the client hostname (Win9x - HKLM\SYSTEM\CURRENTCONTROLSET\SERVICES\VxD\MSTCP\HostName
& NT/2000 - HKLM\SYSTEM\CURRENTCONTROLSET\SERVICES\TCPIP\PARAMETERS\Hostname) and reboot the DHCP server
still uses the old name in DNS. Even if I release and renew the client's ip lease the DHCP server still uses the old name.
However, when the client's name is changed via the network applet and rebooted the DHCP server does change the name
in DNS. If anyone has any insight I would be grateful.
PS. I am using a CISCO dhcp server if it matters.
Paul
|
|
|
|
|
If you install the security update to Outlook 98/2000 the CMC mail functions are no longer available. Is there another simple way of sending a mail message with an attached file without knowing which program is being used for mail.
Thanks in advance
Steve
|
|
|
|
|
Ok, I've created a "full control" in atl object wizard.
Edit, radio, etc - ok, except listbox nd combo.
The subclassed listbox control window somehow becomes a little bit smaller, then dimensions i used in m_ctlZZZ.Create(...,rect,...)
why?
where to debug?
|
|
|
|