Board index » cppbuilder » SetIconSm
Georges
![]() CBuilder Developer |
Georges
![]() CBuilder Developer |
SetIconSm2003-08-09 05:13:49 PM cppbuilder43 I'm trying to set the little icon (top left on the application window). (Bor-5.02) In some applications using TFrameWindow SetIconSm(GetApplication(), IDI_ICON1); works, and in some it doesn't. Any ideas anyone ? |
Roger Lindgren
![]() CBuilder Developer |
2003-08-09 05:54:31 PM
Re:SetIconSm
I'm using SetIconSm(GetModule(), TResId(IDI_ICON1));
but tried your version and it worked also, so I'm not sure it will help. Quote
|
Georges
![]() CBuilder Developer |
2003-08-11 02:54:56 AM
Re:SetIconSm
Roger Lindgren wrote:
QuoteI'm using SetIconSm(GetModule(), TResId(IDI_ICON1)); Georges {smallsort} |
Georges
![]() CBuilder Developer |
2003-08-11 05:17:14 PM
Re:SetIconSm
Roger Lindgren wrote:
Quotewell didn't think it would help, but you didn't give much information. by SetIconSm(GetApplication(), IDI_ICON1); As I said, it has worked just so in some previous aplications and I can see no difference! Bestwishes and thanks Georges |
Roger Lindgren
![]() CBuilder Developer |
2003-08-11 06:23:08 PM
Re:SetIconSm
The only thing I can think of, is that the proper place to use SetIconSm
should be in SetupWindow() after you called TFrameWindow::SetupWindow(); It can have something to do with creation order, that your SetIconSm gets overridden. But I did try in of my bigger apps to move around SetIconSm and SetIcon (I don't think you need SetIcon just a bad habit, that I use both I think) and it worked in constructors and applications initmainwindow after SetMainWindow, and in my SetupWindow of my clientwindow where it is normally. But I still think that the icon should be set after the frame is created. Other than that I can only think of that you don't have the correct icon, perhaps number of colors and size can matter (But tried a few different icons now and it worked anyway). You could try to paste in an icon from an app that do work in text edit mode and try setting that one instead. Do you have the icon in the .rc file or do you include an .ico file in the .rc file, then it could be that Borland C++ 5.02 can't read the icon format if it has been any additions to that format since 5.02 was released, but then it should complain about it I guess. And I'm presuming not working meaning that the standard application icon is showed. I do remember having some problems with icons many many years ago, just don't remember what the problem was. But all new apps I make it works perfect. And I change the application in runtime also with no problems. Both with 5.01a and 5.02, and BCB4 with OWL 5.4 Hope it can help, but feels that it should work like you have it already. |
Georges
![]() CBuilder Developer |
2003-08-12 08:52:28 PM
Re:SetIconSm
Jan Vernimmen wrote:
QuoteWhat about the following: TFrameWindow::SetupWindow works also! So now the problem is solved - thanks to both of you! Georges |