- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Steve:
Can you also confirm the usage for RGB Macro as I am unable to get it compile without error on type required for RGB?
JMN
[cpp]integer*4 function fullapi() !dec$objcomment lib:"user32.lib" !dec$objcomment lib:"gdi32.lib" !dec$objcomment lib:"advapi32.lib" !dec$objcomment lib:"wsock32.lib" !dec$objcomment lib:"comdlg32.lib" !dec$objcomment lib:"shell32.lib" !dec$objcomment lib:"version.lib" !dec$objcomment lib:"mpr.lib" !dec$objcomment lib:"lz32.lib" !dec$objcomment lib:"winspool.lib" !dec$objcomment lib:"winmm.lib" !dec$objcomment lib:"scrnsave.lib" fullapi = 0 end[/cpp]The include file fullapi.f90 has the code shown above. Can you confirm that if I call this function I get the full api available in the program unit?
Can you also confirm the usage for RGB Macro as I am unable to get it compile without error on type required for RGB?
JMN
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - MacNeacail
Dear Steve:
Can you also confirm the usage for RGB Macro as I am unable to get it compile without error on type required for RGB?
JMN
[cpp]integer*4 function fullapi()The include file fullapi.f90 has the code shown above. Can you confirm that if I call this function I get the full api available in the program unit?
!dec$objcomment lib:"user32.lib"
!dec$objcomment lib:"gdi32.lib"
!dec$objcomment lib:"advapi32.lib"
!dec$objcomment lib:"wsock32.lib"
!dec$objcomment lib:"comdlg32.lib"
!dec$objcomment lib:"shell32.lib"
!dec$objcomment lib:"version.lib"
!dec$objcomment lib:"mpr.lib"
!dec$objcomment lib:"lz32.lib"
!dec$objcomment lib:"winspool.lib"
!dec$objcomment lib:"winmm.lib"
!dec$objcomment lib:"scrnsave.lib"
fullapi = 0
end[/cpp]
Can you also confirm the usage for RGB Macro as I am unable to get it compile without error on type required for RGB?
JMN
No, that is not the way you do it. IVF supplies Win32 API interface modules in the default search path, which may be USEd by your program. You can simply USE ifwin, or select subsets of ifwin:
[cpp]MODULE globals ! these are the contents of ifwin, omitting wsock32; ! this program's winsock module USEs ws2_32.f90 instead, ! and we thus need to avoid conflicts with wsock32.f90 USE advapi32 USE comdlg32 USE ifwbase USE gdi32 USE kernel32 !use lz32 !use mpr ! WNet connection APIs, not used by this program USE shell32 USE user32 !use version !use winmm ! Windows multimedia APIs, not used by this program USE winspool ! Win32 types and defines USE ifwinty[/cpp]
The Win32 function RGB transforms 3 INT(1) arguments into a single INT(4) result. Perhaps this will be clearer from the reverse transform:
[cpp]! extract the components from the supplied colorRef red = RSHFT(IAND(RGB, Z'00FF0000'), 16) green = RSHFT(IAND(RGB, Z'0000FF00'), 8) blue = IAND(RGB, Z'000000FF') [/cpp]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Since you addressed this post to Steve, just wanted to let you know he will be out for a couple of days. Looks though like you have had some good help on this.
Wendy
Wendy

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page