Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. Question about draw my own object in Word.

Question about draw my own object in Word.

Scheduled Pinned Locked Moved ATL / WTL / STL
helpquestionc++hostingcloud
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    whiteclouds
    wrote on last edited by
    #1

    Hi, everyone! I had encounter a problem while I am developing a add-in for Word. I make a class derived from IViewObject and implement my own OnDraw. In OnDraw, I create a compatible DC from the parameter with OnDraw whose type is ATL_DRAWINFO. But the compatible DC can't be created correctly in most time. The error code I get is 183 (The file is existed and it can't be created). I don't know the reason. I guess maybe Microsoft don't allow others to do that, isn't it? After then, I try to get a DC by GetDC or GetWindowDC. But the object I draw through them isn't in the client area of Word. Maybe I need to get the DC of Client-area of Word. But I don't know how to get it. Even I doubt whether the DC of Client-area is exist. I hope someone could be kind to tell me how to resolve this problem. Thx! :-D Whiteclouds.

    There is some white cloud floating on the blue sky. That's the landscape I like.

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups