Checking bit value from an integer


How do i get a value of a certain bit from a 32bit integer For example i want to get the value of the 30th bit from this lParam: lParam [in] Specifies the repeat count, scan code, extended-key flag, context ...
Posted On: Sunday 25th of November 2012 08:48:56 PM Total Views:  94
View Complete with Replies

RELATED TOPICS OF Delphi Programming PROGRAMMING LANGUAGE




32-bit on 64-bit

 I have an app written in D7 that refuses to run on XP Pro x64 or Vista x64. It dies with "The application has encountered a problem and must close..." and it does this before anything shows. The app doesn't do anything particularly fancy but it does use 125+ forms. I've done about all I know to do make it UAC compliant, even adding a UAC manifest. In the project dpr the first thing it does is to determine the path to the installed app using ParamStr(0), followed by the path to 'user\Application Data' folder using SHGetSpecialFolderLoction. With this latter path it reads a bool value from an ini file to decide whether to display a splash screen. It then displays or doesn't display the splash screen depending on the return bool. The app doesn't even get to the splash screen display. I thought maybe there was something going on in an initialization section in one of the units 'used' in the dpr but I can't see anything that looks suspicious. Can someone point me in the direction I should be looking
VIEWS ON THIS POST

87

Posted on:

Wednesday 19th September 2012
View Replies!

64-bit Delphi integers and FP

Will 64-bit Delphi have a 128-bit integer, ****ogous to the current int64 What will the format of the floating point numbers be -- Replace you know what by j to email
VIEWS ON THIS POST

50

Posted on:

Wednesday 26th September 2012
View Replies!

32 bit RAD2007 DLL on Vista 64 bit?

I have a Windows shell extension written and compiled using RAD2007 that works perfectly on Vista 32 bit. But, as far as I understand it, such a 32 bit shell extension cannot under any circumstances run on Vista 64 bit. Is that statement 100% true Or are there any tweaks that one could undertake to persuade a RAD2007 dll to work under Vista 64 (e.g. WOW) Otherwise what do you suggest (Other than wait 2 years until CG delivers a 64 bit compiler...) AndrewFG
VIEWS ON THIS POST

96

Posted on:

Friday 28th September 2012
View Replies!

[Error] E2161 RLINK32: Unsupported 16bit resource in file "C:\MyProject\FORMS\Form1.dfm"

Recently I was hit by this error message. Have tried out everything but in vain to overcome it. Can anybody help Compiling with delphi 2005 - Borland Developer Studio for Microsoft Windows Version 9.0.1935.22056 Update 3 --- posted by geoForum on http://delphi.newswhat.com
VIEWS ON THIS POST

120

Posted on:

Friday 28th September 2012
View Replies!

Problems with resizing of forms/frames on Windows Vista 64-bit

I am seeing problems with resizing forms/frames on Windows Vista 64-bit. The same executable works just fine on 32-bit operating systems (both Windows XP and Windows Vista). The controls on a form/frame that are set to align=client don't resize properly, the seem to be stuck in the size they were designed. I've tried to anchor them to all sides but this does not help either. To me this looks like a 64-bit issue. To illustrate the issue I've posted a message in .attachments Has anyone else seen this, perhaps have a solution/workaround Any help is greatly appreciated. Best
VIEWS ON THIS POST

175

Posted on:

Friday 28th September 2012
View Replies!

Xor bitmaps together?

What would be the best way to xor 2 bitmaps together At the moment I am using the code below. But it's a little bit slow stepping through each pixel a byte at a time. Are there any GDI functions that would make this more efficient Also I'm simplifying by converting each bitmap to 256 color. Is there an elegant way of compensating for different color depths
VIEWS ON THIS POST

60

Posted on:

Monday 1st October 2012
View Replies!

Delphi and 64 bit machines

I am a hobby developer that has had delphi enterprise versions for years and now am looking to pick up a Vista 64 bit machine. Is there any way I can run Delphi7 enterprise on a box like that with that operating system I'm not looking to develop 64 bit apps. With all of the time I've invested in Delphi is that going to still be a viable environment in the next few years. TIA RT
VIEWS ON THIS POST

77

Posted on:

Wednesday 3rd October 2012
View Replies!

64bit o/s

Hi D7 are there any issues with running 32bit Delphi applications created in D7 on a 64 bit computer with 64 bit o/s [win xp pro]
VIEWS ON THIS POST

67

Posted on:

Tuesday 9th October 2012
View Replies!

Copying individual TImageList bitmaps to the clipboard

In order to prepare a Help document, I wish to copy and paste individual icon bitmaps from a TImageList component into the Help document. In D7 is it possible to copy individual image bitmaps to the clipboard from within the TImageList editor Or is the only option to Export them one by one to .bmp files, and then individually load the images from the files into the Help document
VIEWS ON THIS POST

69

Posted on:

Tuesday 16th October 2012
View Replies!

Xor bitmaps together?

What would be the best way to xor 2 bitmaps together At the moment I am using the code below. But it's a little bit slow stepping through each pixel a byte at a time. Are there any GDI functions that would make this more efficient Also I'm simplifying by converting each bitmap to 256 color. Is there an elegant way of compensating for different color depths
VIEWS ON THIS POST

61

Posted on:

Tuesday 16th October 2012
View Replies!

Subrange Set property accepts enumerated values outside of subrange

I'm having problems with a field that is a set type. The set type is declared as a set of a subrange of an enumerated type. In my code if I try to add another value from the enumeration to the set, it compiles. My feeling is that because the value is outside of the subrange (and hence the allowable types in the set) it should not compile. Any views or explanations are welcome. D type TCTReason = (srStarted, srTimedOut, srTerminated, srSuspended, srResumed); TCTStatusFlag = srStarted .. srTerminated; TCTStatusFlags = set of TCTStatusFlag; .... TCTObject = class private FStatusFlags: TCTStatusFlags; public procedure Update; end; ..... procedure TCTObject.Update; begin // the following line compiles !! It shouldn't because srResumed is outside of the subrange TCTStatusFlag FStatusFlags := FStatusFlags + [srResumed]; end; David Moorhouse Moorhouse Works ltd www.moorhouse.co.nz
VIEWS ON THIS POST

178

Posted on:

Tuesday 16th October 2012
View Replies!

Find the nearest value of an array

, To avoid reinventing the wheel I would like to know in Delphi if such function exists : Let's say I have an array of integer of N values, I have an integer X I need something like Function GetTheIndexOfTheArrayThatHasTheNearestValue(ValueTocompare:integer):integer;
VIEWS ON THIS POST

229

Posted on:

Tuesday 16th October 2012
View Replies!

How to over-write values in a log file

Hi , I have a log file I am writing to during a process I am running. Each line lists a table and a value at the end. The value will always be a 3 digit number as in : Start Log At 4:15 PM Table1 026 Table2 056 What I need to do is update the value as the process runs. But I don't know how many times the number will be updated. So what I want to do is write the value, and then if it is updated, write the new value over the top of the old one. How can I do this. I am using TextFiles and using Append to add to the file. In the above example, if a new value for Table2 was received, I want to over-write the 056 and replace it with 078 (or what ever). I will only ever update the last table in the log file. Once I move to another table, the previous table is finished with. And I'll write the value with Write (and not WriteLn). Any ideas how I can do this Cheers, Paul
VIEWS ON THIS POST

169

Posted on:

Tuesday 16th October 2012
View Replies!

canvas.textheight return value problem

canvas.textheight(str) always seems to return the same value, regardless of the string parameter used. That is, except for '' (where it returns 0), using 'jT' or '.' makes no difference. what could be wrong Frank. PS: I'm trying to 'correct' canvas.TextWidth when using fsItalic
VIEWS ON THIS POST

248

Posted on:

Tuesday 16th October 2012
View Replies!

Saving list box values to the registry

Hi , whats the best way to save a list boxes values to the registry. I know I could cycle through each one, but i think there's a better way. Any ideas Cheers, Paul...
VIEWS ON THIS POST

136

Posted on:

Saturday 10th November 2012
View Replies!

FileExists, Windows XP Pro 64-bit, and a CFG file in System32

I created a file "futura.cfg" down in the System32 directory and then created a sample application that i will put up in the attachments group. The sample application simply tries to use FileExists, FindFirst, and even a simple TStringlist.LoadFromFile ...
VIEWS ON THIS POST

102

Posted on:

Thursday 15th November 2012
View Replies!

DFM: 16bit reource

Hi with Delphi 5 I am generating my *.pas and *.dfm external. which worked rather good up to now when I got this error trying to compile [Fehler] RLINK32: Unsupported 16bit resource in file "C:\Programme\Borland\Delphi5\Projects\AUFTRAG\aForms.DFM" any hint
VIEWS ON THIS POST

45

Posted on:

Thursday 15th November 2012
View Replies!

Will there be a Delphi for 64 bit Windows?

I just tried it in Firefox and it worked perfectly. Perhaps a temporary problem. -- Bill Todd (TeamB)...
VIEWS ON THIS POST

49

Posted on:

Thursday 15th November 2012
View Replies!

strange conversion result value code = 2

, Using value(string, zahl, code) I am used to get 0 for a successful conversion and 1 for a negativ result. But this time, using 'EA' as string (Electron) I got the result code := 2 !!! What does this ...
VIEWS ON THIS POST

131

Posted on:

Thursday 22nd November 2012
View Replies!

Set as integer value

Alexander Halser wrote: > I need to save a set as an integer value and I would like to convert > this more easyily than I do now. The set is a set of constants, > something like this: > ...
VIEWS ON THIS POST

93

Posted on:

Sunday 25th November 2012
View Replies!