GetThemeRect fails

I am calling GetThemeRect to work out the size of the part my code wants to draw. I pass in a valid theme handle, part and state ID, and 5002 for the prop ID ( which is TMT_DEFAULTPANESIZE, I need this to work by delay loading functions from the dll, so I can use VC6 with no SDK updates ). I get back a failed HRESULT, with the value 'Element not found'. I've tried a variety of values, and always get the same result back




Answer this question

GetThemeRect fails

  • Ian Tien

    Hi Christian,

    Is that still an issue

    Thanks,
    Ayman Shoukry
    VC++ Team


  • John Chorlton

    Ok, I will mark your last post as an answer. Please feel free to unmark it if you find out that it is still an issue.

    Thanks,
    Ayman Shoukry
    VC++ Team


  • Klaus Pruckl

    have the same problem
    have code..
    RECT rct = {};
    HRESULT hr = CRSXpStylesManager::GetThemeRect (hTheme, BP_CHECKBOX, state, TMT_DEFAULTPANESIZE, &rct);
    hTheme is valid
    state is 1(CBS_UNCHECKEDNORMAL) and.. i recieve
    "Element not found" error :-[

  • Philip Wagenaar - Nashuatec

    Hi Ayman. I'm not sure, to be honest. My theme code is all working, if I just abandoned this or fixed it, I am not sure.



  • GetThemeRect fails