Jump to content

BitRemove


Recommended Posts

I basically want to remove a Style from the Current Style of the Control

This is what i want

ConsoleWrite(_RemoveBit(0x503310C4,0x1000)&@CR)
Func _RemoveBit($Original_Bits,$_ToRemove)
If BitAND($Original_Bits,$_ToRemove) Then
ConsoleWrite('Bit Is Present'&@CR)
Return BitOR(BitNOT($_ToRemove),$Original_Bits)
EndIf
Return SetError(1,0,-2)
EndFunc

I'm not good in BitWise Operations please help me out

Thnx for your time :)

Edited by PhoenixXL

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Link to comment
Share on other sites

Something like that?

Global $new = _RemoveBit(0x503310C4, 0x1000)
ConsoleWrite("0x" & Hex($new, 8) & @CR)
Func _RemoveBit($Original_Bits, $_ToRemove)
 If BitAND($Original_Bits, $_ToRemove) Then
  Return BitXOR($Original_Bits, $_ToRemove)
 Else
  Return $Original_Bits
 EndIf
EndFunc   ;==>_RemoveBit
Edited by funkey

Programming today is a race between software engineers striving to
build bigger and better idiot-proof programs, and the Universe
trying to produce bigger and better idiots.
So far, the Universe is winning.

Link to comment
Share on other sites

Thanks

It works !!

My code:

PredictText: Predict Text of an Edit Control Like Scite. Remote Gmail: Execute your Scripts through Gmail. StringRegExp:Share and learn RegExp.

Run As System: A command line wrapper around PSEXEC.exe to execute your apps scripts as System (LSA). Database: An easier approach for _SQ_LITE beginners.

MathsEx: A UDF for Fractions and LCM, GCF/HCF. FloatingText: An UDF for make your text floating. Clipboard Extendor: A clipboard monitoring tool. 

Custom ScrollBar: Scroll Bar made with GDI+, user can use bitmaps instead. RestrictEdit_SRE: Restrict text in an Edit Control through a Regular Expression.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...