Thread: [win32] - about child controls with text and image

  1. #16
    Registered User
    Join Date
    Aug 2013
    Posts
    451
    theres another way:
    c++ - How to enable visual styles without a manifest - Stack Overflow


    Code:
    ULONG_PTR EnableVisualStyles(VOID)
    {
        TCHAR dir[MAX_PATH];
        ULONG_PTR ulpActivationCookie = FALSE;
        ACTCTX actCtx =
        {
            sizeof(actCtx),
            ACTCTX_FLAG_RESOURCE_NAME_VALID
                | ACTCTX_FLAG_SET_PROCESS_DEFAULT
                | ACTCTX_FLAG_ASSEMBLY_DIRECTORY_VALID,
            TEXT("shell32.dll"), 0, 0, dir, (LPCTSTR)124
        };
        UINT cch = GetSystemDirectory(dir, sizeof(dir) / sizeof(*dir));
        if (cch >= sizeof(dir) / sizeof(*dir)) { return FALSE; /*shouldn't happen*/ }
        dir[cch] = TEXT('\0');
        ActivateActCtx(CreateActCtx(&actCtx), &ulpActivationCookie);
        return ulpActivationCookie;
    }
    maybe is there, in internet another function.
    these function is called when we create the button(before or after?!? please test it).
    these code give you the XP style, then that SendMessage() functions add the image in position 0,0. i had tested with another similar function.
    i hope these helps you too
    Last edited by joaquim; 05-29-2014 at 02:39 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Child Window Text/Buttons Missing [WIN32 API/C++/VS 2010]
    By William Putnam in forum Windows Programming
    Replies: 3
    Last Post: 07-22-2013, 09:53 PM
  2. Child Window Text/Buttons Missing [WIN32 API/C++/VS 2010]
    By William Putnam in forum C++ Programming
    Replies: 0
    Last Post: 07-22-2013, 11:47 AM
  3. Tab Orders (Child Controls)
    By (TNT) in forum Windows Programming
    Replies: 6
    Last Post: 07-14-2006, 07:11 AM
  4. Method of placing child window controls
    By Garfield in forum Windows Programming
    Replies: 4
    Last Post: 01-13-2002, 11:09 PM
  5. Child window controls & fonts
    By chomper in forum Windows Programming
    Replies: 0
    Last Post: 10-03-2001, 05:09 AM