Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Rewbs
  • Order by date
  1. Rewbs

    MFC: virtual keys and the "extended" bit

    Hi all, I'm trying to add keyboard customisation to my app. I need some help understanding the relation between virtual key codes the "extended" bit. If a user associates numpad 3 with a command, my app will store the value VK_NUMPAD3 (0x63) against that command. If a user associates page...
  2. Rewbs

    ComboBox only showing one item

    Brilliant - that was the problem. Can't believe I spent so much time on this!! :) Cheers, Rewbs.
  3. Rewbs

    ComboBox only showing one item

    Hi all, I'm filling a ComboBox called f0ParamList with Addstring as follows: CString sParm; for (int i = 0; i < numParams; i++) { sParm.Format(&quot;%d: &quot;, i); int idx = (myDialog->m_f0ParamList).AddString(sParm); } At this point, (myDialog->m_f0ParamList).GetCount() returns 8 as...
  4. Rewbs

    Visual Studio error in Resource Editor

    Hi, When I right click a control in my dialog (Slider control, edit control, combo box etc..) in the resource editor and select &quot;Add event handler...&quot;, I get a popup with the following error message: Internet Explorer Script Error: An error has occurred in the script on this page...
  5. Rewbs

    Event handler problem in VC++ 7.0

    Hi all, Here's a sequence of events that seems OK but leads to an error on my system: 1. Start VS.NET, select new project. 2. Choose to start a Win32 Project 3. Set to dll, click finish 4. Go to Add resource, and add a dialog box. 5. Right click the OK button (or any button for that matter)...
  6. Rewbs

    Decimal Arithmetic

    Thanks for your reply. Could you possibly elaborate on this? What exactly does the Decimal class do that the decimal primitive doesn't?
  7. Rewbs

    Decimal Arithmetic

    Hi all, 2 points: 1. I'm looking for a calculation that would show the advantages of using the decimal primitive in C#, ie a calculation that would yield different results when using floats and decimals. I Java such calculations would be repeatedly dividing 9 by 10, or 0.70 * 1.05. With C#...
  8. Rewbs

    Help me collect less garbage!

    Isn't there a way I could just convince the CLR to allocate more memory to the heap? This would surely help as less GC would be required. Cheers, Robin
  9. Rewbs

    Help me collect less garbage!

    Hi, My C# app is running much slower than expected (about 3x slower than Java equivalent). Profiling with the AQTime profiler has revealed that the CLR is collected garbage from heaps Gen0, Gen1 and Gen2 every few second! I assume that this is what is slowing it down. How can I remedy this...
  10. Rewbs

    Perf Counters with Redistributable

    Hi all, I recently tried out my C# program on a system on which the .NET Framework Redistributable had been installed (as opposed to the Framework SDK). I expected it to run fine, but it threw an exception when trying to initialise a &quot;.NET CLR Memory&quot; / &quot;#Bytes in all...
  11. Rewbs

    why is mscorwks.dll dominant in profile?

    Hi, Thanks for your answer. I'm not writing a server app, but I may try mscorsrv.dll instead to see what happens. I'm not using any COM components. However I'm not using Visual Studio .NET - do you know how I can disable &quot;Register for COM Interop&quot; from the command line? Cheers, Robin.
  12. Rewbs

    why is mscorwks.dll dominant in profile?

    Hi, I recently profiled my C# app with Intel's VTune. A sample based profile revealed that over 50% of the clockticks are spent in mscorwrks.dll, executing mainly the following methods: GetCompileInfo CoInitializeCor CoEEShutDownCOM CorExeMain DllGetClassObjectInternal Does anyone know what...
  13. Rewbs

    String Comparison: C# vs Java

    Hi all, Has anyone else noticed the differences in values returned by string comparison in C# and Java? C#: Java*: &quot;1&quot;.CompareTo(&quot;2&quot;): -1 -1 &quot;b&quot;.CompareTo(&quot;a&quot;): 1 1 &quot;ant&quot;.CompareTo(&quot;art&quot;): -1 -4...
  14. Rewbs

    Unsigned Bit Shifting

    Got it! The solution is of course: x >>> y; becomes (uint) x >> y; If your x is a constant negative integer, you'll need to do: unchecked{ (uint) x >> y; } Best Regards, Robin
  15. Rewbs

    Unsigned Bit Shifting

    Hi all, I need to perform unsigned bit shifting on integers in a C# program. In Java you can do this with the >>> operator. There's no such operator in C#. Any ideas on how I could implement it? Cheers, Robin.
  16. Rewbs

    Extending the Image class

    Hi all, I'm trying to extend the Image class, but my constructor keep causing the following error: error CS0122: 'System.Drawing.Image.Image()' is inaccessible due to its protection level I'm assuming it's something to do with Image being abstract or not having a public constructor. Here's...
  17. Rewbs

    Equivalent of Java's getRuntime().totalMemory()

    Hi all, Anyone know what the C# equivalent of Java's getRuntime().totalMemory() and getRuntime().freeMemory() would be? The Process class has a load of memory related properties, but I don't know which would correspond best. Regards, Robin.
  18. Rewbs

    Specifying heap size in C#

    Hi all, In Java, you can specify the minimum and maximum heap sizes using the -Xms and -Xmx parametres as so: java -Xms<bytes> -Xmx<bytes> class How can this be done in C#? Cheers, Robin

Part and Inventory Search

Back
Top