NO

Author Topic: SS_REALSIZEIMAGE  (Read 260 times)

Offline HellOfMice

  • Member
  • *
  • Posts: 224
  • Never be pleased, always improve
SS_REALSIZEIMAGE
« on: December 21, 2024, 08:25:03 PM »
I try to have an image on on window using ImageControl
It is a bitmap in resources
Code: [Select]
        xor     ecx,ecx                                 ; No extended style
        mov     [rsp + 58h],ecx                         ; lParam
        lea     rdx,szControlStaticClass + rip          ; Class Static
        xor     r8d,r8d                                 ; Titles
        mov     r9d,WS_VISIBLE OR WS_CHILD OR SS_BITMAP OR SS_CENTERIMAGE OR SS_REALSIZEIMAGE   ; Styles
        mov     DWORD PTR [rsp + 20h],1000              ; X
        mov     DWORD PTR [rsp + 28h],16                ; Y
        mov     DWORD PTR [rsp + 30h],144               ; W
        mov     DWORD PTR [rsp + 38h],280               ; H
        mov     [rsp + 40h],rbx                         ; hParent
        mov     DWORD PTR [rsp + 48h],BMP_MSDOS_HEADER  ; BITMAP ID (HMENU)
        mov     [rsp + 50h],r13                         ; hInstance
        call    CreateWindowExA

In the resource file it is defined as
Code: [Select]
CONTROL BMP_MSDOS_HEADER, 4001, "Static", SS_BITMAP|SS_CENTERIMAGE|SS_REALSIZEIMAGE, 19, 19, 144, 280
I would like to know what is wrong in my code
Have you an idea?

Thanks
« Last Edit: December 21, 2024, 08:30:30 PM by HellOfMice »
--------------------------------
Kenavo

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2155
Re: SS_REALSIZEIMAGE
« Reply #1 on: December 21, 2024, 09:08:43 PM »
May the source be with you