Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Changing a Region Cursor: (2 Items)
   
Changing a Region Cursor  
I'm trying to change a region cursor and am getting an error from PhRegionChange. Here is the code snippet.

{
  int rc;
  
  PhRegion_t info;
  PhRect_t rect;

  info.rid = rId;
  
  info.cursor_color = PgRGB(255,255,255);
  info.cursor_type = cursorId;
  
  //fprintf(stderr, "changing cursor to %d\n", cursorId);
  
  rc = PhRegionChange(Ph_REGION_CURSOR, 0, &info, NULL, NULL);
}

Two questions:

1) Is this the proper way to change a region's cursor? If not what is?

2) On any of the photon functions that can return  a -1 error indicator, is there some what (errno) to identify what 
kind of error?

Thx,
Bill
Re: Changing a Region Cursor  
The obvious reason for PhRegionChange() to fail is an invalid RID.
Please take a look at the attached sample app that creates a region, and then changes its cursor.
-Misha.
Attachment: Text region-cursor.c 1.94 KB