Search:

Type: Posts; User: JAAFAR

Page 1 of 13 1 2 3 4

Search: Search took 0.07 seconds.

  1. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    Thanks.

    It will be a while before I wrap my mind around these topics.
  2. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    Hi dilettante,
    Thanks for taking the time to help. I will take a look at the example and see if I can adapt it to my needs.
  3. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    Ok, I see ...Thanks for the advice.
    I quick search on this api came up with this old code of yours. I will take a close look at it and see what I can learn from it.

    Thanks.
  4. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    What I have in mind is to make that color as the background color of the menu bitmap in the last argument of the SetMenuItemBitmaps API so that the bitmap background looks transparent when the user...
  5. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    Hi wqweto,

    You nailed it !! :thumb:

    I successfully read the correct color. (Note: This time, passing the menu handle in the OpenThemeData hwnd arg didn't work. I had to pass 0 like you...
  6. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    Thanks Steve ... That is indeed the correct color but I need to get it programmatically as the color varies from one user machine to another depending on the machine color theme currently applied.
  7. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    The following light-blue color is the one I am trying to read programmatically.

    The highlighted menu is the menu that is currently HOT ie:=active ie:= under tthe mouse pointer.

    Obviously, that...
  8. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    @wqweto

    Didn't work for me. I had to pass the menu handle in order for it to work.

    I have tried many constant combinations but none of them give me the exact highlight color.

    @dilettante.
    ...
  9. Re: OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    I have just passed the Menu Handle to the OpenThemeData API and have tested the following constants in the GetThemeColor API arguments.

    PartID=> VSCLASS_MENU
    StateID=> MENU_POPUPITEM
    PropID=>...
  10. OpenThemeData For Getting Background Color Of Context Menu Item ? (uxtheme.dll)

    Hi there,

    Windows 10

    I have created a right-click context menu (CreateMenu Win32 API) with 3 menu entries\items. The 3 menu items have all a light-grey background color but, when I point the...
  11. Re: SetMenuItemBitmaps ...LR_CREATEDIBSECTION (Transparent Background)

    How will I paint the background ?
    Will I need to create a temp memory bitmap for that and then use AlphaBlend to blend the 2 bitmaps ?

    Thanks.
  12. Re: SetMenuItemBitmaps ...LR_CREATEDIBSECTION (Transparent Background)

    Thanks.
  13. SetMenuItemBitmaps ...LR_CREATEDIBSECTION (Transparent Background)

    sFile = "C:\Temp\MyBMP.bmp"
    hDib = LoadImage(0, sFile, IMAGE_BITMAP, 16, 16, LR_LOADFROMFILE Or LR_CREATEDIBSECTION)
    Call SetMenuItemBitmaps(hMenu, 1, MF_BYPOSITION, hDib, hDib)


    Hi,

    Trying...
  14. Replies
    0
    Views
    281

    Late binding CUIAutomation

    I have the following code which uses IAUtomation to get me the bounding rects of the tabs in a MultiPage control... The code works fine because it uses early binding.

    I can't seem to make this...
  15. Replies
    8
    Views
    501

    Re: Check if Pointer is valid ?

    I will probably do that (Also, same suggestion offered by wqweto)
    Thanks.
  16. Replies
    8
    Views
    501

    Re: Check if Pointer is valid ?

    Thanks... I thought about that but I wanted to make this foolprof so that if the vba project was reset by accident and there was a state loss and therefore the class Terminate-event wouldn't cleanup...
  17. Replies
    8
    Views
    501

    Re: Check if Pointer is valid ?

    Ok- let me explain what I am trying to do.

    Basically, I have a class and I have some code that is meant to be ran upon initializing the class (ie:- inside the Class_Initialize event).

    The issue...
  18. Replies
    8
    Views
    501

    Check if Pointer is valid ?

    Hi,

    Is there a way of figuring out if an object pointer is valid ? (ie:- points to a valid instanciated object)

    Thanks.
  19. Re: Stuck with this Language Detection Service code

    @wqweto, @dilettante
    Thank you.

    @peterst
    Thanks, I will take a look at the links
  20. Re: Stuck with this Language Detection Service code

    Bump.
  21. Replies
    7
    Views
    467

    Re: CopyMemory ByVal\ByRef confusion

    Thanks Steve Grant.
    Yes. I know that API and have used it before.

    The confusion about my OP is not cleard up yet though.
  22. Replies
    7
    Views
    467

    Re: CopyMemory ByVal\ByRef confusion

    Thanks.

    That doesn't seem to be the case with non-strings

    Example for getting a Long value from its pointer:

    Function ValFromPtr(ByVal Ptr As Long) As Long
    CopyMemory ByVal...
  23. Replies
    7
    Views
    467

    CopyMemory ByVal\ByRef confusion

    Here is this simple StrFromPtr function to get a string from its pointer:



    Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" _
    (Destination As Any, Source As Any, ByVal Length As...
  24. Re: Stuck with this Language Detection Service code

    Ok, here is simpler and much smaller code (for easier reading) that is supposed to get all Els installed services and fill the array of MAPPING_SERVICE_INFO stuctures with corresponding information....
  25. Re: Stuck with this Language Detection Service code

    The MappingGetServices second argument expects the Address of a pointer to an array of MAPPING_SERVICE_INFO udts ... You are wrongly passing a pointer to a MAPPING_ENUM_OPTIONS udt.
  26. Re: Stuck with this Language Detection Service code

    Yes. I noticed that before which seemed dodgy but why does MappingGetServices return S_OK and dwServicesCount returns the count of installed services ?

    I thought that a successful call to...
  27. Re: Stuck with this Language Detection Service code

    Thanks guys for taking a look and offering your suggestions.

    I have already tried every combination I could think of ( ByRef, ByVal ...Regular variable instead of Const ect ...). Nothing seems to...
  28. Stuck with this Language Detection Service code

    Hi,

    I am experimenting with this code which uses the native Elscore.lib (Windows 7 and later versions)

    The following C code excerpt comes from here :...
  29. Replies
    4
    Views
    363

    Re: "As Any" in a UDT ?

    Thanks for the explanation :)
  30. Replies
    4
    Views
    363

    Re: "As Any" in a UDT ?

    Sorry, See late Edit .
  31. Replies
    4
    Views
    363

    "As Any" in a UDT ?

    I am trying to translate some C code into VB.

    There is a C Structure where one of the members is declared "As Any"

    VB doesn't accept "As Any" as a data type for UDT members.

    What is the...
  32. Re: (Excel)____ VarType returning "wrong" result !

    Cool !:)

    Thanks.
  33. Re: (Excel)____ VarType returning "wrong" result !

    Hi wqweto,

    Do those first 2 extracted Bytes correspond to the following ? :

    From the Variant Type Documentation:
    A variable of variant type, for brevity called a "variant", as defined in...
  34. Re: (Excel)____ VarType returning "wrong" result !

    I had a similar workaround ... Thanks very much for your interest.
  35. Re: (Excel)____ VarType returning "wrong" result !

    Thanks.

    I am aware of that but I suppose that using the Set keyword would resolve the variable to an object type.

    Also, this issue happens only with the Application object ... Tried with...
  36. (Excel)____ VarType returning "wrong" result !

    Does anybody know why VarType returns vbString when it should be returning vbObject ?

    Sub Test()

    Dim v As Variant 'As Object

    Set v = Application
    MsgBox VarType(v) '<==...
  37. Re: Change text color with SetTextColor but without TextOut or DrawText.

    Thanks ... I will take a look at the file.
  38. Re: Change text color with SetTextColor but without TextOut or DrawText.

    Thanks.

    I have found these GetPaletteEntries\SetPaletteEntries api functions - Am I in the right direction?
  39. Re: Change text color with SetTextColor but without TextOut or DrawText.

    Would that change the color palette system-wide or just for the relevant window ?

    Thanks.
  40. Re: Change text color with SetTextColor but without TextOut or DrawText.

    That doesn't seem to be a problem when brush painting (ie: when changing the window background color)

    Thanks.
Results 1 to 40 of 500
Page 1 of 13 1 2 3 4



Click Here to Expand Forum to Full Width