English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. C/C++

 
 
Thread Tools
Old 18 October 2014, 16:50   #1
Yesideez
(2b)||!(2b)
 
Yesideez's Avatar
 
Join Date: Mar 2007
Location: Cranbrook, Devon, UK
Age: 50
Posts: 241
OpenScreenTagList

Hi again!

Trying to follow the tutorials here: http://www.pcguru.plus.com/tutorial/screens.html

I'm having a real problem opening a screen because this:
Code:
     myScreen = OpenScreenTagList(NULL,
     SA_Left, 0, SA_Top, 0, SA_Width, 640, SA_Height, 480,
     SA_Depth, 8, SA_Title, "My New Screen",
      SA_Type, PUBLICSCREEN,
      SA_SysFont, 1,
      TAG_DONE);
Doesn't like the number of parameters being passed to the function. It should only have two values (window and taglist)

How can I set up a tag list proper please?

I've tried this:
Code:
struct TagList *MyScrTags={
  SA_Top,0,SA_Left,0,SA_Width,640,SA_Height,256
}
But it doesn't like more than two tag items because TagList structure in the h files is only two pairs of longwords.
Yesideez is offline  
Old 18 October 2014, 18:03   #2
thomas
Registered User
 
thomas's Avatar
 
Join Date: Jan 2002
Location: Germany
Posts: 7,035
The first code is wrong. You either have OpenScreenTagList (newscreen,taglistptr); or OpenScreenTags(newscreen,tag1,data1,tag2,data2,....,TAG_END);

In the second code part, struct TagList does not exist. It's struct TagItem. And it should be

Code:
struct TagItem MyScrTags[]={
  {SA_Top,0},{SA_Left,0},{SA_Width,640},{SA_Height,256},{TAG_END}
}
Never forget TAG_END (a.k.a. TAG_DONE) at the end of a tag list!
thomas is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:57.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.09823 seconds with 12 queries