visual-studio-2008

OpenGL: How to check if the user supports glGenBuffers()?

亡梦爱人 提交于 2019-12-22 12:07:48
问题 I checked docs, and it says OpenGL version must be at least 1.5 to make glGenBuffers() work. The user has version 1.5 but the function call will cause a crash. Is this a mistake in the docs, or a driver problem on the user? I am using this glGenBuffers() for VBO, how do i check if the user has support for this? Edit: im using glew with glewInit() to initialize VBO Edit2: I got it working on the user with glGenBuffersARB() function calls. But im still looking a way to find out when should i

Convert VARIANT to…?

扶醉桌前 提交于 2019-12-22 11:26:55
问题 Note: Attempting to invoke a method of an interface, of which the return type is _variant_t Code: _variant_t resultsDataString; _bstr_t simObjectNames; simObjectNames = SysAllocString (L"TEST example 3"); resultsDataString = pis8->GetSimObject (simObjectNames); inline function illustrated below, contained in .tli FILE: inline _variant_t IS8Simulation::GetSimObject ( _bstr_t Name ) { VARIANT _result; VariantInit(&_result); HRESULT _hr = get_SimObject(Name, &_result); if (FAILED(_hr)) _com

`Timer` Component not accurate enough, is there an alternative?

淺唱寂寞╮ 提交于 2019-12-22 11:24:23
问题 I need an event to occur every 0.03125 s The Timer control can only go to 0.031 s How can I create an event from the Stopwatch Component which is more accurate? 回答1: I found this, it is much more accurate and reliable than the Standard Timer! I cant believe it. http://www.codeproject.com/Articles/5501/The-Multimedia-Timer-for-the-NET-Framework To Quote: The Win32 multimedia timer services provide the greatest degree of timing accuracy. They allow you to schedule timing events at a higher

Visual Studio 2008: Use external Debug-DLL for Debug-Run and external Release-DLL for Release-Run

感情迁移 提交于 2019-12-22 11:18:16
问题 Short version: If running a program from VS2008 in Release mode, I want it to use pathA\externaldll.dll . If running a program from VS2008 in Debug mode, I want it to use pathB\externaldll.dll Long version: I have a programm that is linked against external dll-files (VTK). I have built the external application myself in both Debug and Release mode. The external dll-files are located like this: <some path>\Debug\externalDll.dll <some path>\Release\externalDll.dll (so they are called the same,

Different Fonts in one Label

混江龙づ霸主 提交于 2019-12-22 10:53:13
问题 does anybody know a way how to create a Label(WindowsForms) with two different Fonts or at least two different FontSizes? 回答1: I think you should override default label onPaint method and draw multiple text/fonts manually using Graphics. Take a look at this example. 回答2: Try to override or handle paint event (method) use classes from System.Drawing namespace. 回答3: You have to create your own drawing using GDI also try to find out if you can find any other third party controls that support

Multithreading and Critical Sections Use - C++

帅比萌擦擦* 提交于 2019-12-22 10:46:33
问题 I'm a little confused as to the proper use of critical sections in multithreaded applications. In my application there are several objects (some circular buffers and a serial port object) that are shared among threads. Should access of these objects always be placed within critical sections, or only at certain times? I suspect only at certain times because when I attempted to wrap each use with an EnterCriticalSection / LeaveCriticalSection I ran into what seemed to be a deadlock condition.

How to add FreeImage.dll to C# project

陌路散爱 提交于 2019-12-22 10:45:02
问题 I have successfully added other .dll files to other C# project this way: Right click Reference > Add Reference > Browse > Double click the .dll file but Microsoft Visual Studio 2008 issues the following complaint: A reference to ...\dll\FreeImage.dll could not be added. Please make sure that the file is accessible, and that it is a valid assembly or COM component. I am using .NET Framework 3.5. I believe this is a 32bit dll (it downloaded with FreeImage3151Win32) so I changed the

Visual Studio 2010 .NET framework 3.5 unavailable

。_饼干妹妹 提交于 2019-12-22 10:27:19
问题 I have installed Visual Studio 2010 Professional, and despite my tremendous urge to work on it since it is pleasing to the eye, it seems not to support .NET framework 3.5/3.0. Therefore, I have switched to Visual Studio 2008 rather relunctantly. How do I add .NET framework 3.0/3.5 to the top right combo box within the make new project? (Note: In the top right combo box within the make new project, I have only .NET framework 4.0 available.) 回答1: It should just work absolutely fine - but it

Why the option to use attributes in new ATL projects was removed from Visual Studio 2008?

扶醉桌前 提交于 2019-12-22 09:57:23
问题 This is the text from MSDN comment: "According to the book ATL Internals (2ed) the use of attributes is deprecated and should not be used in new ATL projects." But WHY?!! 回答1: In ATL these attributes were a compiler trick. They were not a core part of the platform like attributes in C#. They were also more confusing to debug than macros's and the method of dumping generated attribute code was a hassle. I suspect another issue is likely to have been C++ compiler compatibility and standards

What is the fastest method for rotating an image without clipping its edges with GDI+?

荒凉一梦 提交于 2019-12-22 09:49:04
问题 There are some looooong and hungry algorithms for doing so, but as of yet I haven't come up with or found anything particularly fast. 回答1: The fastest way is to this is to use unsafe calls to manipulate the image memory directly using LockBits . It sounds scary but it's pretty straight forward. If you search for LockBits you'll find plently of examples such as here. The interesting bit is: BitmapData originalData = originalBitmap.LockBits( new Rectangle(0, 0, originalWidth, originalHeight),