Draw directly to the screen (win32)

Hi,
I am attempting to draw directly to the screen in win32. The goal is to draw four small objects in each corner of the screen that will be painted on top of any existing windows, desktop objects and remain painted even after screen is refreshed. A screenshot overlay is not possible, it has to be real-time.
I've scoured for a java class to accomplish with little luck and haven't been able to find much in the way of win32 api options either.
Any advice given to point me in the right direction would be greatly appreciated.
Thanks!
-squirrellyj

In the windows API you can create a window and set it to be on top of all other windows
SetWindowPos(hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);
I think that in J2SE 5 or 6 you can do it from java directly but I'm not sure.
So just create 4 windows and put them in 4 corners of the screen.

Similar Messages

  • Drawing directly in the document window

    Can anybody provide sample code showing the basics of drawing directly in the document window? I'm thinking of something along the lines of the measure tool (pardon the pun).
    It looks like I'm supposed to use either the Annotator Suite or the Document View Suite to "invalidate" a rectangle in the document, followed by doing the actual drawing with the ADMDrawer Suite. But the documentation in this area is pretty sparse (for example GetDocumentViewInvalidRect and SetDocumentViewInvalidRect refer to a "fudged" invalid rect without explaining what that is) and I don't see anything in the Sample Code folder that explains this feature.
    Are the little text annotations ("path" "anchor") that pop up when using Smart Guides done using this method?
    Thanks,
    John

    (Sound of crickets chirping...)
    Boy, this forum is awfully dead in comparison to the InDesign SDK forum. Is no one writing Illustrator plug-ins anymore?
    But hey, I'll keep posting, if only for my own amusement, about my saga of writing a plug-in.
    I figured out some of the annotation stuff, but I'm still puzzled by some things.
    I started by simply trying to create a tool which would carry a 100x100 box around with it when moved on the screen -- no clicking or dragging yet -- much as the symbol sprayer, for example, has a nice circle (albeit of varying size) around it. I created the tool and added it as an annotator. When it receives a kSelectorAITrackToolCursor message, it simply captures the cursor location in a global and sets the PlatformCursor. When the tool receives a kCallerAIAnnotation message, I have this code:
    extern AIErr toolAnnotate( AIAnnotatorMessage *message ) {
        AIErr error = kNoErr;
        error = sView->ArtworkPointToViewPoint( message->view, &g->cursorPoint, &g->cursorPointScreen );
        g->annoBoundsScreen.top = g->cursorPointScreen.v - 50;
        g->annoBoundsScreen.bottom = g->cursorPointScreen.v + 50;
        g->annoBoundsScreen.left = g->cursorPointScreen.h - 50;
        g->annoBoundsScreen.right = g->cursorPointScreen.h + 50;
        ADMDrawerRef dr = sADMDrawer->Create(message->port, &g->annoBoundsScreen, kADMPaletteFont);
        ASRect myRect;
        myRect.top = 0;
        myRect.bottom = 100;
        myRect.left = 0;
        myRect.right = 100;
        sADMDrawer->SetDrawMode( dr, kADMXORMode );
        sADMDrawer->SetADMColor( dr, kADMBlackColor );
        sADMDrawer->DrawRect( dr, &myRect );
        sADMDrawer->Destroy( dr );
        sAnnotator->InvalAnnotationRect ( message->view, &g->annoBoundsScreen );
    This (should) convert the cursor location (in artwork coordinates) to screen coordinates, set the annotation boundaries based on this location, create the drawer reference, and draw the 100x100 rectangle within this reference. Finally, it invalidates this rectangle as per the Annotation suite documentation.
    I fired up the tool in Illy 10 and saw a single box created down at the 0, 0 point on the page. No box followed the cursor. Hmm. I added an sADMBasic->Beep() to the annotation code and realized what was happening -- my tool was getting an annotation message when first selected, but none when it was merely moved around the screen.
    After some futzing around I discovered that if I added a call to sView->SetDocumentViewInvalidDocumentRect in the TrackToolCursor code, I got an annotate message every time the mouse was moved! I captured the previous cursor position and invalidated the rectangle 50 points on all sides from it. and tried again. Success -- partially.
    At this point, the cursor could be moved around with the box following it. It suffers, however, from the following bugs:
    1) The SetDocumentViewInvalidDocumentRect is in artwork coordinates and so only works at 100% or greater. If I zoom out, my little box leaves trails all over the screen. In addition, if I zoom in, the cursor stutters noticeably -- I assume because Illustrator is forcing a redraw on large portions of the document. I think I can fix both these bugs by recalculating the SetDocumentViewInvalidDocumentRect into screen coordinates. However I note that the circle of the symbol sprayer can be made huge -- as large as the screen -- and it still moves smoothly. So maybe calling sView->SetDocumentViewInvalidDocumentRect is not the way to force annotations. But I haven't been able to discover another way.
    2) When the mouse moves into a palette, the square remains "hung up" at the last position where the cursor was in the document window. I think I can fix this by utilizing the Suspend and Resume notifiers and doing one last InvalAnnotationRect when I get the Suspend notification.
    3) For fun I tried clicking and dragging. Bad news. If I do this, thereafter the entire Illustrator window only redraws iself in the small rectangle that was set when I created the drawer port. By chance I found that if I use another tool that annotates such as the pencil *before* I use my tool, then everything is fine (although of course the box doesn't follow the cursor around anymore because my toolMouseDrag code is empty). How is using a previous tool "fixing" my code? I don't understand this one at all.
    Anyway, I suppose I could fork over a wad of cash and join the ADN and purchase a support case -- but hey, I'm just a hobbyist messing around at this point and facing some rather crappy documentation. Any tips will be much appreciated.
    John

  • How to draw text onto the screen?

    Hi,
    I'm looking for a way to draw a String directly onto the screen.
    Anybody have any ideas?
    Regards
    ABourke.

    Someone posted a nice example of what the OP wants a while ago on [java.net|http://forums.java.net/jive/thread.jspa?threadID=57353&tstart=30] : [CircleScroller (jnlp)|http://mac-systems.de/circlescroller/launch.jnlp].
    It uses the 6u10 [transparant window feature|http://java.sun.com/developer/technicalArticles/GUI/translucent_shaped_windows/], but he didn't post the code itself.

  • Woh to draw anywhere in the screen?

    Hi,
    This might be a silly question but I haven't practically any graphics programming on Java before.. I tried to google for a solution and also searched these forums but no help yet.
    I need to draw some text and images anywhere in the screen. That is, the drawing is done to an on top of another (non-Java) program. I would do this periodically few times a second so that if the other program repaints, the text&images come visible again.
    So, is there a way to acchieve this in Java?
    - Maybe using some transparency settings for a frame and disabling any focus?
    - Or maybe I can somehow manipulate the screen memory "directly"? In the Robot class there is a way to get the Colro of any pixel in the screen (Robot.getPixelColor). Is there a way to do it the other way around, that is, set the color of any pixel in the screen or draw tesxt in the screen?
    Thank you very much!
    BR,
    Kari

    I must have been sleeping when I wrote this (just saw the subject line)... :)
    Woh = How

  • Draw characters on the screen

    As we draw circles and other graphics, is there any way to
    draw characters on the screen or print characters on the
    screen?

    Do you mean you want to render Text with the drawing API?
    If so, there's no native way to do that, but it can be done
    by capturing a bitmapData copy of a TextField's contents and using
    it in a BitmapFill.
    But its much easier to use Degrafa with RasterText:
    http://www.degrafa.org/blog/2008/11/rastertext-for-advanced-text-graphics/

  • I am trying  to download itunes to my computer, when i hit the download button it goes directly to the screen that says now you have itunes......NOTHING HAS BEEN DOWNLOADED, i have been trying for two days to download and it is not working please help!

    I am trying to download itunes to my computer, when i hithe download button all it does is go to the "now that you have downloaded itunes" screen.....NOTHING HAS BEEN DOWNLOADED!!!!!!!!!......i have been trying for 2 days to do this, please help.....Thanks

    i have the same problem, i have a windows 7 and the little screen comes up saying statues: processing additional packages  help us

  • HT1212 While setting up using my home Wi-Fi I followed the direction on the screen, put in my Apple ID and password,& pass code that would lock my phone, now that it's activated I can't unlock it with the pass code! What do I do now?

    I  contacted my service provider and they told me to codec my iPhone to iTines on a computer, and follow the direction to set my hone back to the factory settings, I have nothing on it yet so I tried this,  the iTunes Icon comes up with a lock under it. The phone vibrates part way through the process and still won't unlock. Now what do I do?

    Sorry I didn't mean to hit the other button!   But I did that suggestion three different times yesterday and it didn't seem to work!  Still locked out of my phone! And when I turned it on just now it did the same thing, ( vibrated and wouldn't unlock)!  Only this time it told me to connect to iTunes!  But last night when I did this iTunes had a lock on it! 

  • How do i add text to the screen in java3d

    I have tried overiding the jpanel, but the paint and paintcomponents are not called.
    Is their a way i can draw directly to the screen, while using java3d in the background.

    That would be correct- if you want text in your Canvas3D it has to be added to the Java3D scene. Have you looked at the Text2D object?

  • Does some of you see little squares on his ipad3 screen, when bright light shines directly on the display?! Is this normal?

    Hey folks,
    I just got my iPad 3, and when the display is almost white like on the google homepage i noticed there were small squares or a grid visible all over the screen (when a light is shinning directly on the screen). I just want to know if it is just on my device or some of you also have experienced the same. If you cannot see the grid just tilt the ipad a bit when you are on a white background (as it is most visible on a white background). In addition I recognized that my ipad has a much "warmer" colour setting than my colleague's one. His one is "whiter" or "colder".
    For any ideas, experiences, suggestion: thanks in advances!

    Look like the plastic molding process is not perfect in your top shell surface, or some component might attach to that area that make the layer that block the light from lcd is not covering those area.
    I don't have my MacBook with me so I cannot give you any idea or comparison, hope somebody will post either they have same issue or they inform you that they dont have any of that.
    Just discuss this with you apple store or apple dealer if you feel this is annoyed, bring your picture along with your MacBook and even better print this thread so they now you are serious and not faking it.
    Actually it is kinda cool when you drew up small layout of the spot, it makes your MacBook one of a kind. If you post this thread on 6/6/06, it might give me goose bump, just kidding.

  • What is wrong with my 30" Cinema Display?  The USB and FireWire ports still work, but the screen is pitch black. When you plug it into the computer, it detects that it's a Cinema Display.

    When you plug it into the computer, it detects that it's a Cinema HD but the screen is pitch black.
    For some reason, the USB and FireWire ports still work.

    If you shine a really bright light directly into the screen can you then see a faint image on the screen? If so, that would indicate the backlight has died (hardware failure) and the unit needs repairing.

  • "Smudges" on the screen, can't get rid of them.

    I've been mostly satisfied with Macbook Pro 15" but about a month ago I noticed this "smudge" on the screen. I didn't make much of it, and when I got home I cleaned it, following Apple's instructions. With the MBP turned off, it seemed my screen was spotless. Surprise, surprise, I open it the next day at work and find the smudge still there, unchanged. Weird. I tried cleaning it again, perhaps I hadn't done as good a job as I thought, but after the second (and third, and fourth) attempt to clean the screen, still, the smudge remained. And now there's two of them! I have no idea what caused them, I'm quite careful with my MBP and nobody else uses it besides me.
    A detail that might or might not have anything to do with the unknown origin of these smudges: they're mostly on the same horizontal line and at almost the same distance from the screen margins. With the lid closed, the right smudge corresponds to the ; (above the right apple key, Portuguese keyboard) and the left one over the X.
    The following link is a photo of the right side smudge. It is most visible when over a bright white background.
    By itself this is VERY annoying, every 10 seconds my eyes are diverted from the work I'm doing and noticing those ugly things. Adding to that, I'm a designer, working heavily with illustration, print, web and video, so you can have an idea of what crystal clear images mean to me.
    I've been doing some research but haven't found anyone with the same problem. Seen some images of screen problems, but they didn't seem to be the same thing. Has anyone had a similar problem? Thanks in advance.
    Macbook Pro 15"   Mac OS X (10.4.9)   Bought November 06, 2Gb RAM

    Water is one of the worst things to use, especially if you live in a hard water area, as I do. The CaCO₃ in hard water is slightly abrasive and will scratch the delicate coating on the screen.
    Apple's own recommendation (emphasis mine):
    "How To Clean an LCD Panel
    This article describes the best way to clean an LCD panel such as those used on PowerBook computers and Apple flat panel displays.
    To clean the LCD:
    1. Turn off the computer or display. You may need to turn off the computer in order to turn off some Apple displays.
    2. Dampen a clean, soft, lint-free cloth or paper with water only.
    3. Wipe the screen. Do not spray liquid directly on the screen.
    You may also use a mild glass cleaner that contains no alcohol or ammonia. Most office supply stores sell cleaning kits specifically designed for this purpose."
    I doubt very seriously that any water delivered to anyone's house would be so abrasive, especially in the small amount one would use to clean an LCD screen, would be sufficiently abrasive as to damage a screen. The cloth or other wipe used is going to be far more abrasive that any water that's drinkable by humans. I think Apple (and every other LCD vendor I checked) would not recommend the use of water if it could be a problem. Problems with hard water come more from scaling, not abrasion, and scaling is unlikely to be a problem just from a damp cloth.

  • Macbook Pro w/ Retina Display produces small white spots, how do I clean the screen?

    How do I remove the white spots from the Macbook Pro display? The cleaning cloth takes out few of the spots, but I don't want to apply so much pressure on the display, as it may damage it. I'm a little nervous about using liquids, should I? Any solutions? Cloths? Liquids? Etc.

    I've noticed that people offer various personal advice on this, but nobody references the engineers who actually designed and built the screen.  I'm assuming Apple did consult the engineers on this issue and they actually took the time to write about it in the "MacBook Pro Important Product Information Guide."  They probably thought it was important or something. ;-)
    I'll quote page 2 from the 2012 rMBP version:
    "Cleaning the McBook Pro Screen  To clean your MacBook Pro screen, first shut down your MacBook Pro and unplug the power adapter. Then dampen the included cleaning cloth with just water and wipe the screen. Do not spray liquid directly on the screen." (Emphasis added.)
    Coming from a machining background, I would recommend using a swirling motion to avoid wearing the screen in a uniform manner.  Take note that this is not explicitly stated in the guide, and is probably not necessary considering the included cloth is so soft that it probably wouldn't affect the screen this way.

  • Connecting iPod directly to computer screen for video

    Hi everyone
    I would like to connect my iPod directly to my computer screen at work for watching videos after hours. Is there anyway (cable/adapter) to connect the iPod directly to the screen (DVI or VGA)?
    I can't connect the iPod directly to the computer nor do I have a TV...
    Many thanks

    Depends on your screen. Some have ability to take RCA inputs. If yours does then get an iPod dock that supports RCA transfer.

  • How do i clean the screen of my macbook with retina display?

    how do i clean the screen of my macbook with retina display?

    To clean the screen on your MacBook, MacBook Pro, or MacBook Air, first shut down the computer and unplug the power adapter. Dampen the included cleaning cloth with just water and wipe the screen. Do not spray liquid directly onto the screen.
    Important: The bottom case of the MacBook (13-inch, Late 2009) and MacBook (13-inch, Mid 2010) uses a soft nonslip material. Use a 3M Gray Microfiber or soft dye-free, lint-free cloth to clean the bottom case.
    http://support.apple.com/kb/ts1544

  • I'm trying to make a logo animate onto the screen - is there a technique for that?

    I'm editing a TV spot for a client and want to animate their logo, by making it "draw" itself onto the screen. Any recommendations for how to do that?

    depends on how the logo looks like and what kind of 'appearance' you want ...
    drop-dead-simple:
    use any paint.app which supports psd-layers (recommending Pixelmator …), 'split' the diff. elements into separate layers (needs perhaps some retouch) and fade in/move in each layer. (made that for some other request awhile ago : http://youtu.be/uEDjHtADYj8 )
    not-that-complicated:
    in Motion, matte tool, paint some lines, which cover the logo, use the write-on behavior... (thousands of tuts at YT ... )
    all-bells-and-whistles:
    use tools as Blender, Cinema4D or mObjects (=the 3D-plugin for Motion) to re-enact the logo in 3D, flying, tumbling, lens flares, chrome shine, fire balls, Hollywood!

Maybe you are looking for

  • K9N Platinum bios version & cpu support

    Hi! I need some help to clear up some questions regarding my MB. MB: K9N Platinum, Cpu-z states my bios version is 080014, but i cant see it in the bios list for my MB, so what version is it? Im currently running with a Athlon X2 5200+ Windsor, and i

  • Warning page on Cisco Wireless Lan Controller for guest access

    Hi, We have an Cisco wireless LAN controller 4400 in our organization, and lots of guest using our Wi-Fi network. I would like to configure a warning and terms and condition page when guest using first time our network. Can you please let me know is

  • Motion Menus not playing properley

    I'm creating a dvd with quite a few submenus. I've chosen the 5.0 theme sliding panes where 7 photos slide across the screen. Although some of the menus work properley the majority just load up on the last two photos and do no show the other photos m

  • Difference in storage method for DMS and Services for Object

    Hi- Our R/3 version is: 4.7 Enterprise. In most (if not all) of the transactions users execute, there is a feature where they can attach a file using "Services for Object" from their PC to the associated record (i.e. material master, purchase orders,

  • Slow connection for downloading dot-dmg file

    Have 20-inch iMac G5 with Tiger OS. I had wanted to download a 30-day free trial of Stuffit Deluxe so that I can compress several 5MB jpgs into a smaller file; something easy to transmit by email as attachment. The download time for less than 200 MB