Manifest problem

Started by Zlatko Vid, May 29, 2022, 04:28:58 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zlatko Vid

hello Charles
hello to all other members too

I often have problem with xp manifest..how?
I usually use external manifest file  as well known .xml

when i compile my program to exe
with manifest to same folder(directory)
with same name ..like :
myprog.exe
myprog.exe.manifest

then manifest work and styles are fine

but when i move or better to say copy that exe and manifest to
another folder visual styles gone ...
why is that happened ?
is there any simple solution ?

i read Jose explanation here:
http://www.jose.it-berater.org/smfforum/index.php?topic=4372.msg15184#msg15184

but i simply don't know how to transfere this to OxygenBasic code
any help?
thanks in advance

Charles Pegge

Hi Aurel,
The functions referred to by José are from UxTheme.dll. Full C header attached below

/*
SetWindowTheme(
    _In_ HWND hwnd,
    _In_opt_ LPCWSTR pszSubAppName,
    _In_opt_ LPCWSTR pszSubIdList
    );
'returns hTheme
OpenThemeData(
    _In_opt_ HWND hwnd,
    _In_ LPCWSTR pszClassList
    )
CloseThemeData(
    _In_ HTHEME hTheme
    );
DrawThemeBackground(
    _In_ HTHEME hTheme,
    _In_ HDC hdc,
    _In_ int iPartId,
    _In_ int iStateId,
    _In_ LPCRECT pRect,
    _In_opt_ LPCRECT pClipRect
    );
DrawThemeText(
    _In_ HTHEME hTheme,
    _In_ HDC hdc,
    _In_ int iPartId,
    _In_ int iStateId,
    _In_reads_(cchText) LPCWSTR pszText,
    _In_ int cchText,
    _In_ DWORD dwTextFlags,
    _In_ DWORD dwTextFlags2,
    _In_ LPCRECT pRect
    );

*/
/*
extern lib "UxTheme.dll"
! SetWindowTheme
! OpenThemeData
! CloseThemeData
! DrawThemeBackground
! DrawThemeText

end extern

'example:

sys  hwndList
...
SetWindowTheme(hwndList, L"Explorer", NULL)



Zlatko Vid

thanks Charles
I will try it !

Chris Chancellor

Well done Charles
O2 is very flexible and can use c headers !!