Standard C++ Carbon Application Template

I want to create a simple splash window and use carbon for that. I never created windows on the mac but i did quite a lot of win32 api programming. Using the template made by xcode i want to catch events like mousedown. I tried doing it like this, but it does not seem to work, "mouse down " is never printed on the screen, and all there is are two numbers, always the same, at every mouse click, resize etc:

AdrianM Wrote:I want to create a simple splash window and use carbon for that. I never created windows on the mac but i did quite a lot of win32 api programming. Using the template made by xcode i want to catch events like mousedown. I tried doing it like this, but it does not seem to work, "mouse down " is never printed on the screen, and all there is are two numbers, always the same, at every mouse click, resize etc:

Well, to begin with, printf goes to stdout, that is the console if available, usually to nowhere.

Just like in Win32, you need a port/context to draw in, and draw the text in that.

Also, I can't see the mouse down event being handled. You just handle the event for the window size being changed. Maybe you need a better template to work from? There is plenty of code around that does what you need.

Ingemar Wrote:Well, to begin with, printf goes to stdout, that is the console if available, usually to nowhere.

Just like in Win32, you need a port/context to draw in, and draw the text in that.

Also, I can't see the mouse down event being handled. You just handle the event for the window size being changed. Maybe you need a better template to work from? There is plenty of code around that does what you need.