| Subject | : | os/2 dialogs |
| Author | : | arr |
| Date | : | 10 Apr, 2004 on 02:43 |
| I believe I already know the answer to this but I was wondering if it is possible to programmatically change the system menu icon of an individual os/2 dialog window or is that icon fixed and cannot be changed? regards, |
| Subject | : | Re:os/2 dialogs |
| Author | : | ChrisR roossien@gmail.com |
| Date | : | 10 Apr, 2004 on 13:57 |
| Thats very complicated.. You need some kind of tsr or class witch just sits and checks and waits for certain windows to open.. Most programs have more than one windows.. if fact some have dozens of windows.. And you need a list of window-names with coresponding icons.. When you have a good resource editor its a lot easier to change the icons in the programs/dlls itself.. Chris |
| Subject | : | Re:os/2 dialogs |
| Author | : | arr |
| Date | : | 10 Apr, 2004 on 19:09 |
| Let me go into some more detail on this, I am using drdialog and I was wondering if there was a way with REXX and an api call at run-time to change the system menu icon of an individual dialog to another icon. It's not a big deal if it cannot be done, was just wondering if it was possible or is it a system-wide fixed thing with os/2's dialog box engine. Just wondering if someone new off hand; if not, I will check through my vp api docs to see myself. No big deal. regards, |
| Subject | : | Re:os/2 dialogs |
| Author | : | zoron |
| Date | : | 13 Apr, 2004 on 09:52 |
| I am not that familar with DrDialog but it looks like its window functions do not provide any method to change the system icon. So you would need to use either a rexx dll or an external program to do this. VP provides an example rexx dll in rexxext.pas, gcc also has some sample code. To load and change the icon you would use WinLoadPointer & WM_SETICON eg: To find the window handle of your dialog you could use WinBeginEnum to find all the open programs and then match on the dialog name or process id. I do not know whether it is possible to add additional (icon) resources to a DrDialog res file, you may need to experiment a little. Where you call your new function from within your drrexx program will depend on what you want to do. You could try adding it to the init routine but whether this works would depend on where in the dialog creation process (before, during or after) the init stuff is read. Just some ideas. |
| Subject | : | Re:os/2 dialogs |
| Author | : | arr |
| Date | : | 13 Apr, 2004 on 12:45 |
| Thanks zoron, I'll give that a try. No, there doesn't seem to be a way at design time to change the system menu icon so that's what I was looking to do it with code at run-time using api calls. regards, |
| Subject | : | Re:os/2 dialogs |
| Author | : | zoron |
| Date | : | 15 Apr, 2004 on 19:48 |
| I did actually try changing the icon with an external program called from the init event and it worked ok. In my earlier post I suggested adding the icon resource to the drrexx program it should really be in a dll or external program so you can access it easily. |