News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Having trouble with EM_GETIMECOLOR!!!

Started by xandaz, February 28, 2021, 10:40:07 PM

Previous topic - Next topic

HSE

By default I use Richedit20   :biggrin:. No charformat2.
Equations in Assembly: SmplMath

TouEnMasm


<>       ;------ATCHOUM---------
must be the covid !
Fa is a musical note to play with CL

TouEnMasm

To use properly the common contols structures, you need to know:
* The version of the windows system
* The version of richedit.
* ++++++++++++++
Fa is a musical note to play with CL

xandaz

   Sorry for the long reply. Your answers helped. I git over it. I have an issue tho. I have a button witha string and awnted to change the for to the general font used but the app. I send WM_SETFONT,hFont,TRUE but nothing happens. Any idea why. should i use BS_OWNERDRAW?

xandaz

QuoteYou should never use the + sign to compose flags!

Why this JJ? Isn't it the same as OR?

jj2007

Quote from: xandaz on March 07, 2021, 07:24:57 AM
QuoteYou should never use the + sign to compose flags!

Why this JJ? Isn't it the same as OR?

Test it:
  mov eax, WS_OVERLAPPEDWINDOW+WS_THICKFRAME
  mov ebx, WS_OVERLAPPEDWINDOW or WS_THICKFRAME

TouEnMasm

#21
+ isn't the same as or.
11 + 1 = 100b
11 or 1 = 11b
Fa is a musical note to play with CL

TouEnMasm

#22
Most of the time,windows constants are defined as follow:
OneConst equ 1 SHL 0      ;1b
TwoConst equ 1 SHL 1      ;10b       and so on so you can define 32 or 64 constants it's enough most of the time

This made that you can use the signe + or OR with no different results.
OneConst + TwoConst = OneConst OR TwoConst

It's the case for the WS_OVERLAPPEDWINDOW+WS_THICKFRAME

Quote
   Local phrase[100h]:BYTE
   invoke sprintf,addr phrase,TXT("WS_OVERLAPPEDWINDOW+WS_THICKFRAME %x,WS_OVERLAPPEDWINDOW or WS_THICKFRAME %x"),\
               WS_OVERLAPPEDWINDOW+WS_THICKFRAME,WS_OVERLAPPEDWINDOW or WS_THICKFRAME
   invoke MessageBox,NULL,addr phrase,TXT("titre"),MB_OK

Result is the same CF0000h



Fa is a musical note to play with CL

hutch--

xandaz,

Always use OR to combine styles, + works in some contexts but not all.

xandaz

   Thanks a lot guys. It's been helpful. Ty cu soon.