|
Greetings,
I have modified the icon file for my program (res\myprog.ico) but I am still getting that old MFC "3 cubes" icon displayed in the title bar and as the icon for the executable file in Explorer. Is there some secret trick to getting that new icon used?
Oddly, if I right-click on the executable's icon in Windows Explorer and bring up the properties dialog, the new icon is displayed, so I obviously did something right. Just not enough.
Can some kind soul please point out the steps to fix this?
Thanks!
|
|
|
|
|
Heh, I remember this happened to me when I wrote my first MFC program. Ah, the old days...
Anyway, there are two common sizes of icons displayed. 16x16 pixels and 32x32 pixels. You have apparently changed only one of them, which is the reason why you see the updated one in the properties dialog box and the old on in the explorer view.
There is a small drop down right above the space where you edit your icon when you have it open, labelled "Device". Select the size you want from there and edit it. You can even insert icons of new sizes by clicking on the small "New Device Image" icon next to the drop down. Save and build, and lo and behold, your new icon shows up now.
Regards,
Rohit Sinha
|
|
|
|
|
Bless you!
That did it! Jeez! Once you told me the secret, it took me all of 60 seconds to fix it.
Thank you very much!
|
|
|
|
|
Icons come in different sizes (32x32, 16x16, etc.) and color depths (16 colors, 256, ...). Windows picks which one to display based upon what's needed. You need to make sure you change all of the versions in your resource.
Software Zen: delete this;
|
|
|
|
|
|
Hi All,
I've got a CFormView derived class which needs to provide tooltips for it's controls. Some of the controls are placed on the form through the resource editor, but some of the controls are created dynamically, in the OnInitialUpdate of the view. I've got a member function which is capturing the TTN_NEEDTEXT notification in my view. But, this only seems to work for the controls that were placed on the form with the resource editor. If I place the mouse over one of the dynamically created controls, I don't get a notification for the tool tip.
Anyone have any guessees as to what I might be doing wrong?
Thanks,
Aaron
|
|
|
|
|
Did you set the SS_NOTIFY style when creating these dynamic controls?
Roger Allen
Sonork 100.10016
I have a terminal disease. Its called life!
|
|
|
|
|
SS_NOTIFY? What's that? I can't find that style in MSDN.
What I've got is the MFC wrapper class for a home grown control. I am creating it like this, in a member function of my CFormView derived class:
CHEditDouble* CGraphView::CreateHEdit(const RECT& rc, const UINT& nID)
{
DWORD dwStyle = WS_VISIBLE|WS_CHILDWINDOW|WS_CLIPCHILDREN|WS_TABSTOP|ES_LEFT|ES_AUTOHSCROLL;
DWORD dwExStyle = WS_EX_LEFT|WS_EX_LTRREADING|WS_EX_RIGHTSCROLLBAR|WS_EX_NOPARENTNOTIFY|WS_EX_CLIENTEDGE;
CHEditDouble* pHEditDouble = new CHEditDouble();
ASSERT(pHEditDouble != NULL);
(void)pHEditDouble->Create("Edit", dwStyle, rc, this, nID);
return pHEditDouble;
}
I'm not sure how to see what the system does with this same control when it creates them from a dialog ersource, something must be different.
|
|
|
|
|
The SS_NOTIFY style is not welll documented in MSDN at all. If you do a search and not use the index it should turn up some references.
I use the TT_NEEDTEXT on formviews/floating windows. In the floating ones I create the controls like this:
m_LeakSensors[0].Create("?", WS_CHILD | WS_VISIBLE | SS_NOTIFY | WS_CLIPSIBLINGS, CRect(0, 0, 15, 15), this, IDC_LLEAK_SENSOR1) ;
This makes the tooltip work for that control as long as I map the correct control ID in the onTTNeedText function.
Roger Allen
Sonork 100.10016
I have a terminal disease. Its called life!
|
|
|
|
|
Well, that doesn't seem to make any difference. I tried adding the style, and nothing happened. There must be something else I'm not doing right.
|
|
|
|
|
This is a complete guess, but do you call EnableToolTips() before or after creating the dynamic controls?
Roger Allen
Sonork 100.10016
I have a terminal disease. Its called life!
|
|
|
|
|
Well, they are created after the EnableToolTips call. It's a good guess, though.
|
|
|
|
|
It looks like it has nothing to do with the way I am creating the controls after all. I tried doing the exact same thing in another project, a simple dialog app, with the same dynamically created control, and it works fine.
I am putting the created controls inside a frame. I think this is messing things up. If I move the frame so it's around some of the controls and not others, then the ones out of the frame get the TTN's, and the ones in it don't.
But I don't want to get rid of the frames, cuz the make the dialog look pertty. Now what? DOes this mean the frame is on top of the controls? Both the frmae and the controls are direct children of the form.
Now I'm confused . . .
|
|
|
|
|
How can I start application, which name is starting from "home" using ShellExecuteEx()?
If I try to run "homesite5" it brings me an IE window with "homesite5" as an url. It does the same for all names, starting from "home". It isn't depends of such file existance and availability via %PATH%.
And as I found, "Start"->"Run..." acts the same way. Just type "home<something>" there...
p.s. I'm using win2k sp2. win98 seems to have the same bug (or feature?)
With the best regards, Vitaly.
|
|
|
|
|
i had never noticed this before.. it seems your best bet is to put it in quotes with an absolute path.. like "c:\homesite5.exe"
still a newb.. cut me some slack :P
-dz
|
|
|
|
|
quotes will not help...
absolute path will, but i don't know it. the reason I'm using ShellExecuteEx() is cause I need to start different apps knows only their names not paths. winword, notepad etc...
With the best regards, Vitaly.
|
|
|
|
|
There are registry keys for installed apps : hklm/software/microsoft/windows/currentversion/app paths
How low can you go ? (MS rant)
|
|
|
|
|
Anyone know of any articles on "How to" add a icon to your status bar?
Do I have to custom draw the status bar to acomplish this?
|
|
|
|
|
Never mind I just figured it out..
|
|
|
|
|
Is there a way to change the default (preferred)audio devices on Windows NT/2000/XP from an application?
In other words, how can I accomplish the same thing from my application as when I change the Control Panel -> Sounds and Multimedia -> Audio -> Preferred Playback/Record Device settings?
|
|
|
|
|
I'm having a problem with my animation control. I'm loading a 175 Kb AVI file on my WM_INITDIALOG routine, and I immediately start playing it. However, sometimes when I go to run the software, the AVI takes a while to start playing, so nothing shows on the screen for a couple of seconds. Do I need to wait for the load and/or play routines to complete successfuly before continuing? If so, how would I accomplish that...the WaitForSingleObject routine?
Or is there something else that needs to be done, such as placing the first frame image on the dialog for x number of seconds, then showing and starting the video after x amount of time has passed.
Brigg Thorp
Software Engineer
Timex Corporation
|
|
|
|
|
In the new PocketPC 2002 system the background of my dialogs are white and not gray like in the old PocketPC system.
So, how can I change the background color of my dialogs on the PocketPC 2002 system to gray?
I need this, because I use the CCeButtonST v1.2 buttons from Davide Calabro (http://www.codeproject.com/ce/ccebuttonst.asp) and they look not very good on a white background!
(I am working with embedded Visual C++ 3.0 + PocketPC 2002 + MFC)
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
I am looking for the APIs which can show all shared files of a computer in a LAN. And how can I get all the computers' names connected to LAN. ( like LANster- a software for searching in LAN).
If anyone knows, please tell me.
vietdung
|
|
|
|
|
as i know, the answer to ur Q is one of secrets of microsoft, they will not let u know for free.
i am very interested in the Q, hope u get right reply.
good luck.
includeh10
|
|
|
|
|
I have tried the function : NetShareEnum, but it only showed all the directories that a computer shares. But I am looking for the functions that showed all the shared files.
vietdung
|
|
|
|