Thread: mfc question

  1. #1
    i want wookie cookies the Wookie's Avatar
    Join Date
    Oct 2002
    Posts
    455

    mfc question

    how do i get the handle of a window element?

    i added a 'picture box', but i can't get a variable assigned to it (i dont know why), so i could just do it through api but i need the handle....how do i get the handle of something like IDC_STATIC1 (ive searched but couldnt find anything)

    thanks

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    1,348
    One solution is GetSafeHandle().

    Kuphryn

  3. #3
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    Or you could use GetDlgItem( hWnd, IDC_STATIC1 );

  4. #4
    i want wookie cookies the Wookie's Avatar
    Join Date
    Oct 2002
    Posts
    455
    okidokey, thats what it was. thanks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. MFC check box question
    By MyglyMP2 in forum Windows Programming
    Replies: 2
    Last Post: 03-09-2009, 05:47 PM
  2. MFC simple question
    By dole.doug in forum Windows Programming
    Replies: 5
    Last Post: 09-26-2008, 06:11 AM
  3. Window Resize question (MFC)
    By IfYouSaySo in forum Windows Programming
    Replies: 2
    Last Post: 11-16-2005, 12:34 PM
  4. MFC UI question
    By naruto in forum Windows Programming
    Replies: 1
    Last Post: 04-21-2005, 10:10 PM
  5. MFC Dialog App Screen Refresh Question
    By Scotth10 in forum Windows Programming
    Replies: 2
    Last Post: 10-18-2002, 02:07 PM