Author Topic: Manifest problem  (Read 299 times)

0 Members and 1 Guest are viewing this topic.

Offline Zlatko Vid

  • Full Member
  • ***
  • Posts: 204
  • User-Rate: +0/-0
Manifest problem
« 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

Offline Charles Pegge

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 772
  • User-Rate: +31/-1
    • Charles Pegge
Re: Manifest problem
« Reply #1 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
Code: [Select]
/*
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)


Offline Zlatko Vid

  • Full Member
  • ***
  • Posts: 204
  • User-Rate: +0/-0
Re: Manifest problem
« Reply #2 on: June 02, 2022, 09:08:03 PM »
thanks Charles
I will try it !

Offline Chris Chancellor

  • Sr. Member
  • ****
  • Posts: 349
  • User-Rate: +0/-0
Re: Manifest problem
« Reply #3 on: June 04, 2022, 04:58:20 AM »
Well done Charles
O2 is very flexible and can use c headers !!