Results 1 to 6 of 6

Thread: how to get hWnd or hDc etc. of Window????

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2000
    Posts
    95

    Question

    In VB you would use
    Code:
    SetPixel Me.hdc, 5, 5, vbBlack
    In C++ you would use???????

  2. #2
    Guest
    I would also like to know this

  3. #3
    Guest
    if your asking because that gave you an error, remember you need the Semi-Colon at the end of everline


    Code:
    int ProgramHwnd;
    ProgramHwnd = CWnd.m_hWnd;

  4. #4
    Guest
    Shouldn't it be:
    Code:
    HWND ProgramHwnd;

  5. #5
    Guest
    oh yeah,
    I am just starting C++ so i dont know all the data types yet.... thanks for correcting me

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Uh...Zej? Don't use CWnd.m_hWnd. You need to extract it from your CWnd-derived class...and as Megatron says, it's of type HWND.
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width