Interactive PowerBasic Forum

IT-Consultant: Charles Pegge => OxygenBasic => Topic started by: Zlatko Vid on May 29, 2022, 04:28:58 PM

Title: Manifest problem
Post by: Zlatko Vid on May 29, 2022, 04:28:58 PM
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
Title: Re: Manifest problem
Post by: Charles Pegge on June 02, 2022, 01:12:39 PM
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)


Title: Re: Manifest problem
Post by: Zlatko Vid on June 02, 2022, 09:08:03 PM
thanks Charles
I will try it !
Title: Re: Manifest problem
Post by: Chris Chancellor on June 04, 2022, 04:58:20 AM
Well done Charles
O2 is very flexible and can use c headers !!