hi,
I am a new user to Mac OS.I need to port a C project from Mac os 9 to Mac os 10.4.So while porting it to xcode I found that few API's which we used in our project has been deprecated.One such API is DrawString() to print text on the screen.In the Apple developer reference document they have asked to use ATSU or Quartz as an alternative.I used CGContextShowatPoint() API but it is not printing the text.Please help me with this.
Code I used is:
-------------
#include <ApplicationServices/ApplicationServices.h>
char str[100];
sprintf(str,"Press any key to exit");
CGContextRef context;
CGContextShowTextAtPoint(context,400,300,str,strle n(str)-1);
The above code doesn't print anything on my screen.
Please tell me what is wrong in the above code.
It is a carbon application.Please help me out.
I am a new user to Mac OS.I need to port a C project from Mac os 9 to Mac os 10.4.So while porting it to xcode I found that few API's which we used in our project has been deprecated.One such API is DrawString() to print text on the screen.In the Apple developer reference document they have asked to use ATSU or Quartz as an alternative.I used CGContextShowatPoint() API but it is not printing the text.Please help me with this.
Code I used is:
-------------
#include <ApplicationServices/ApplicationServices.h>
char str[100];
sprintf(str,"Press any key to exit");
CGContextRef context;
CGContextShowTextAtPoint(context,400,300,str,strle n(str)-1);
The above code doesn't print anything on my screen.
Please tell me what is wrong in the above code.
It is a carbon application.Please help me out.