Click here to Skip to main content
15,923,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Icons Pin
Sarriss30-Sep-08 5:00
Sarriss30-Sep-08 5:00 
The Code you said worked pretty well

I used a variation through API

WNDCLASSEX wc;
....
wc.hIcon = static_cast<hicon>(LoadImage(  hInstance,
                                              MAKEINTRESOURCE(IDI_ICON1),
                                              IMAGE_ICON,
                                              255,
                                              255,
                                              LR_DEFAULTCOLOR));
........................................................................
wc.hIconSm = static_cast<hicon>(LoadImage(  hInstance,
                                              MAKEINTRESOURCE(IDI_ICON1),
                                              IMAGE_ICON,
                                              16,
                                              16,
                                              LR_DEFAULTCOLOR));
</hicon></hicon>



Also a note to be taken in this, I could only get images up to 255 to work not 256, it completly rejects the file if you have any 256 in there. Thought i might just mention that.


There is also an issue with alpha blend in Visual studio, some mentioned a way around that and i quote,

"If you have an icon with alpha blend, visual studio will get rid of it straight away, so to get around that,

-->Put the icon in your /res/ folder
-->import the file via your resource editor
-->close the file in the resource editor so its not in view
-->save the project
-->copy the .ico with alpha blend over the top of the one in your res folder
-->rebuild your application
-->and you should have alpha blend,

you will not be able to open the icon in resource editor againbecause it will get rid of the alpha blend again."


This is my findings in working on my initial question, i hope it helps anyone else looking for this.
QuestionCompression in C# Pin
RYU^^30-Sep-08 1:23
RYU^^30-Sep-08 1:23 
AnswerRe: Compression in C# Pin
RYU^^30-Sep-08 1:23
RYU^^30-Sep-08 1:23 
JokeRe: Compression in C# Pin
ThatsAlok30-Sep-08 1:34
ThatsAlok30-Sep-08 1:34 
AnswerRe: Compression in C# Pin
Hamid_RT30-Sep-08 4:47
Hamid_RT30-Sep-08 4:47 
GeneralRe: Compression in C# Pin
RYU^^30-Sep-08 23:49
RYU^^30-Sep-08 23:49 
GeneralRe: Compression in C# Pin
Hamid_RT1-Oct-08 8:42
Hamid_RT1-Oct-08 8:42 
Question__stdcall compile error? Pin
George_George30-Sep-08 1:07
George_George30-Sep-08 1:07 
AnswerRe: __stdcall compile error? Pin
CPallini30-Sep-08 1:49
mveCPallini30-Sep-08 1:49 
GeneralRe: __stdcall compile error? Pin
George_George30-Sep-08 2:00
George_George30-Sep-08 2:00 
GeneralRe: __stdcall compile error? Pin
CPallini30-Sep-08 2:23
mveCPallini30-Sep-08 2:23 
GeneralRe: __stdcall compile error? Pin
George_George30-Sep-08 21:56
George_George30-Sep-08 21:56 
AnswerRe: __stdcall compile error? Pin
toxcct30-Sep-08 2:02
toxcct30-Sep-08 2:02 
GeneralRe: __stdcall compile error? Pin
George_George30-Sep-08 21:55
George_George30-Sep-08 21:55 
GeneralRe: __stdcall compile error? Pin
toxcct30-Sep-08 21:59
toxcct30-Sep-08 21:59 
GeneralRe: __stdcall compile error? Pin
George_George30-Sep-08 22:04
George_George30-Sep-08 22:04 
QuestionRe: __stdcall compile error? Pin
Matthew Faithfull30-Sep-08 3:37
Matthew Faithfull30-Sep-08 3:37 
AnswerRe: __stdcall compile error? Pin
Mark Salsbery30-Sep-08 4:59
Mark Salsbery30-Sep-08 4:59 
AnswerRe: __stdcall compile error? Pin
George_George30-Sep-08 21:57
George_George30-Sep-08 21:57 
QuestionRe Question about folder copy Pin
Davitor30-Sep-08 1:07
Davitor30-Sep-08 1:07 
AnswerRe: Re Question about folder copy Pin
Michael Schubert30-Sep-08 1:31
Michael Schubert30-Sep-08 1:31 
GeneralRe: Re Question about folder copy Pin
Davitor30-Sep-08 1:46
Davitor30-Sep-08 1:46 
GeneralRe: Re Question about folder copy Pin
Michael Schubert30-Sep-08 2:20
Michael Schubert30-Sep-08 2:20 
GeneralRe: Re Question about folder copy Pin
David Crow30-Sep-08 3:21
David Crow30-Sep-08 3:21 
GeneralRe: Re Question about folder copy Pin
Davitor1-Oct-08 2:38
Davitor1-Oct-08 2:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.