flat assembler
Message board for the users of flat assembler.

Index > Windows > Bug/outdated constants on COMCTL32.INC

Author
Thread Post new topic Reply to topic
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 09 Dec 2006, 20:27
Code:
; Month calendar styles

MCS_DAYSTATE    = 1
MCS_MULTISELECT = 2
MCS_WEEKNUMBERS = 4
MCS_NOTODAY     = 8      

Should be
Code:
; Month calendar styles

MCS_DAYSTATE        = 1
MCS_MULTISELECT     = 2
MCS_WEEKNUMBERS     = 4
MCS_NOTODAY_PRE_IE4 = 8
MCS_NOTODAYCIRCLE   = 8
MCS_NOTODAY         = 16
    
Post 09 Dec 2006, 20:27
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 09 Dec 2006, 23:34
Code:
format PE GUI 4.0
include 'win32axp.inc'

start:
  push    ICC_DATE_CLASSES            ; dwICC
  push    sizeof.INITCOMMONCONTROLSEX ; dwSize
  invoke  InitCommonControlsEx,esp
  add     esp, 8
  invoke  GetModuleHandle,0
  invoke  DialogBoxParam,eax,bugProofDialog.id,HWND_DESKTOP,DialogProc,0
  invoke  ExitProcess,0

proc DialogProc hWndDlg, msg, wParam, lParam

  cmp     [msg],WM_CLOSE
  je      .WM_CLOSE
  xor     eax, eax
  ret

.WM_CLOSE:
  invoke  EndDialog, [hWndDlg], 0
  mov     eax,1
  ret
endp

align 4
data resource
  macro UID id*
  {
    if ~defined UID | ~UID
      UID = 0
    end if
    UID = UID+1
    id  = UID
  }

  directory RT_DIALOG,dialogs

  resource dialogs,\
           bugProofDialog.id,LANG_ENGLISH+SUBLANG_DEFAULT,calcDialog

  UID bugProofDialog.id
  dialog calcDialog,'Bug proof',0,0,580,100,WS_CAPTION+WS_POPUP+WS_SYSMENU+DS_MODALFRAME+DS_CENTER
    ; ***OLD
    MCS_NOTODAY         = 8
    dialogitem MONTHCAL_CLASS,'',-1,0,0,180,100,WS_VISIBLE+WS_BORDER+MCS_NOTODAY
    ; ***NEW
    MCS_NOTODAYCIRCLE   = 8
    MCS_NOTODAY         = 16
    dialogitem MONTHCAL_CLASS,'',-1,200,0,180,100,WS_VISIBLE+WS_BORDER+MCS_NOTODAY
    dialogitem MONTHCAL_CLASS,'',-1,400,0,180,100,WS_VISIBLE+WS_BORDER+MCS_NOTODAY+MCS_NOTODAYCIRCLE
  enddialog
end data

.end start    


Image
In the left most control I'm using all the constants related to NOTODAY provided by fasm standard package. Look how using MCS_NOTODAY it's not enough to hide everything related to today.
Post 09 Dec 2006, 23:34
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.