The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: masmfreak on December 05, 2005, 02:58:21 AM

Title: Irregular windows icon problem
Post by: masmfreak on December 05, 2005, 02:58:21 AM
this project has a problem and doesnt load the icon into the taskbar or alt-tab menu. Any1 here know how to correct this? Also how could i give it a sysmenu when right clicked on the start menu?

[attachment deleted by admin]
Title: Re: Irregular windows icon problem
Post by: Mincho Georgiev on December 05, 2005, 04:29:35 AM
Did you mean Icon from resource, be more specific!
If it's so,the you have to do the next one:

in the rc:

500 ICON DISCARDABLE "example.ico"

in the source:

.IF     uMsg == WM_CREATE
      invoke LoadIcon,hInstance,500
      invoke SendMessage,hWin,WM_SETICON,ICON_BIG,eax
...

And it will appear in the both - taskbar and alt-tab menu!


Title: Re: Irregular windows icon problem
Post by: masmfreak on December 05, 2005, 04:58:55 AM
thanks for that how can i add a system menu to it for when right clicked on the start menu also the icon doesnt show up on the taskbar just alt tab
Title: Re: Irregular windows icon problem
Post by: Mincho Georgiev on December 05, 2005, 05:02:49 PM
Ok , if you mean a right click popup-men (it does not a "system menu") and if i understand everything correctly,
the example below is what you need, take some time to study the code - that's your job now, that's why i didn't
put any comments it's very simple infact. Take a look to the Iszelion's examples and the help in masm32 package as well.
Bye for now!  :U

[attachment deleted by admin]
Title: Re: Irregular windows icon problem
Post by: masmfreak on December 06, 2005, 12:01:50 AM
thats good but i meant when u right click on the taskbar.
Title: Re: Irregular windows icon problem
Post by: Mincho Georgiev on December 06, 2005, 04:03:45 PM
:) ok. If the style of the window is only WS_POPUP you cannot have mini/maximize menu in the taskbar. The style have to be WS_POPUPWINDOW,then will appear. You have to do a small corection of the bitmap image after that kind of style change.
Here it is:

[attachment deleted by admin]
Title: Re: Irregular windows icon problem
Post by: masmfreak on December 08, 2005, 12:58:52 AM
tnx for the example there ive learned alot from it. Just out of curiodity how did u get the messagebox to open as a child ie nothing shows up on the taskbar when open and the window behind is disabled until cliking ok on the messagebox.

How did you do this?

When compile i get a error

Also i transferred your code to a dialog program

Now when i compile i get alot of errors like

Undefined symbol p
and others

please ignore the first download.

Also how do you adjust the bitmap accordingly?




[attachment deleted by admin]
Title: Re: Irregular windows icon problem
Post by: Mincho Georgiev on December 08, 2005, 04:24:41 PM
There is your source without the errors ,BUT ,you have to make a general changes if you want to do it by a Dialog!
I suggest you to start learning the differences between the Dialog boxes and the regular windows. Iszelion's tutorials
will be a good start for you (or any WIN32 programming books).
The changes for the MessageBox are generated by WS_POPUPWINDOW style of the window. The bitmap adjustment too. (if there is any adjustment),so the taskbar minimize menu too.
I wish you 'studdy luck' !
Bye for now!

[attachment deleted by admin]
Title: Re: Irregular windows icon problem
Post by: rodderswank on December 08, 2005, 04:47:08 PM
.