visual-studio-2008

large images on toolbar

Hi to all. Is it possible to have a 32x32 images on toolbar while keeping 16x16 in menu. I created toolbar resource (IDR_TOOLBAR1) and set it's button size as 32x32 and load it: if (!m_wndToolBar.CreateEx(this,...) || !m_wndToolBar.LoadToolBar(IDR_TOOLBAR1 )) { ... } When started toolbar correctly shows large btn images but menu is a...

Catch Exception in Application Startup (VS.Net)

I'm getting a System.NullReferenceException when my application starts up (after a small login screen) which doesn't crash the entire app but prevents it from loading correctly. How can I get the VS.Net debugger to stop at the error so I can fix it? The output I'm getting in the Immediate Window is: A first chance exception of type 'S...

How can I use a stored procedure in Entity FrameWork where I need 2 or more entities columns together?

How can I use this stored procedure in Entity Framework? I need to call it from like that : foreach (SalesOrderDetail order in objCtx.GetOrderDetails(soHeaderNumber)) Console.WriteLine("Header#: {0} " + "Order#: {1} ProductID: {2} Quantity: {3} Price: {4}", ...

How to add existing SQL Server database to app_data folder of asp.net MVC project

I have an existing database in SQL Server. I am trying to create an asp.net mvc project around this db. For this purpose I need to add the db to app_data folder of asp.net MVC project How do I achieve this? Note: The SQL Server is in another system and I do not have rights to install SQL Server Express on my machine as well :( ...

use MFC in static library compile errors vs2008

Hi, when all working project get modified by statically linking MFC (before was shared) this errors raised trough compiling: Error 36 error LNK2001: unresolved external symbol __imp____p__iob mysys.lib Error 37 error LNK2019: unresolved external symbol __imp____p__iob referenced in function __db_push_ libmysql.lib Error 38 error ...

User control attributes at design-time

I'm testing a simple User Control in Visual Studio 2008: A Panel named Wrapper with some controls inside. Can Visual Studio handle this at design time? public partial class TestControl : System.Web.UI.UserControl { [Description("Css class of the div around the control.")] [CssClassProperty] public string CssClass { ...

Outlook Folder Browse Dialog???

Hello there, I'm hoping someone could help me with a quick point in the right direction. ALL I NEED is the Outlook folder browser dialog call. I am developing some plugins for Outlook using C# and this is a crucial part for both plugins. Hopefully, it is like a standard DialogResult that passes back folder information (selected folder) ...

Executable size difference between VS C++ 2008 Express and Professional

We see a size difference here when building our application in VC 2008 Express vs. VC 2008 Professional (both SP1). The EXE built by VC 2008 Professional is about 10%+ smaller. We are using the exact same project files, so all the settings are the same and we're also building on the same OS with the same platform SDK, DLLs etc. installed...

how to use localtime function with VIsual Studio C++ 2008

Hi I am getting this error : "Unhandled exception at 0x00411690 in tim.exe: 0xC0000005: Access violation reading location 0x00000008" when I execute a program this is compiled and linked successfully and the problem is that localtime() function is not correctly recognized by Visual C++ 2008. (With VC++6, this program works fine). ... ...

Breakpoint when variable takes on a certain value.

I have something analogous to the following code... void function(int x) { // complicated operation on x blah blah } It all appears to be working fine except when x happens to be a particular value, say "273". But x being 273 is a rare event, 99.999% of the time it is some other value. Now I wish to observe the events whe...

how to use gettimeofday() or something equivalent with Visual Studio C++ 2008?

Hi, Could someone please help me to use gettimeofday() function with Visual Studio C++ 2008 on Windows XP? here is a code that I found somewhere on the net: #include < time.h > #include <windows.h> #if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64 #else #define DELTA_EPOCH_I...

Alternate cause of BadImageFormatException in .NET Assembly?

I'm working on a .NET 3.5 console application in C# which uses a VC++ unmanaged DLL. It ran without a problem when I worked on it a few weeks ago, but I'm coming back to it today and am now getting a BadImageFormatException ("An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)). My develo...

Boost 1.4.0, "assert" identifier not found

I'm trying to compile an old project that was originally written for linux on windows. It uses boost 1.4.0, and whenever I compile it throws error C3961: "assert" : identifier not found. I'm using Visual Studio 208 SP1 When I drill down into assert.hpp it includes this: # include <assert.h> // .h to support old libraries w/o <cassert> ...

testing database application remotely

With advice from users here I was able to deploy an application that connects with sql server 2008 database on to a server. I have the connection string with data source pointing to my machine since the database is stored on my machine temporarily. I do not have access to another machine and wanted to test the application so I remotely c...

How do I stop Visual C++ from using local machine locale settings in MFC .rc file generation?

When editing a resource in the Visual Studio resource view, I find that a lot of locale specific information is added to generated rc file. The locale information added is specific to whatever locale my machine is running at the time. It appears to be a project specific setting, because I don't have the same issue with other projects in ...

Visual Studio 2008 Setup Project - Include .NET Framework 3.5

I built a Visual Studio 2008 setup Project wich depends on .NET 3.5. I added Prerequisites like: .NET 3.5, Microsoft office interoperability, VS tools for office System 3.0 Run time, .etc. After that Selected "Download Prerequisite from Same location as my application" in Specify install location for Prerequisite. I Built the setup and f...

How do I link a VS2008 C++ project as a DLL instead of a LIB?

I have the C++ source code in a Visual Studio project from another developer that compiles into a static lib. I need to change it so that it builds a dll from that code so that I can call it from C#. I went into the project properties in Visual Studio and changed the configuration type to a DLL. However, it now gives lots of linker er...

C# Constructor & List Question

Ohk, I am doing a c# program, and I get everything but this, I just can't understand what it is asking. I know how to create a list.. and how to create a constructor.. but this is where i get confused.. its probably way simple but i am missing it. I created 2 lists .. now i should create a constructor here is one my lists List<Perso...

Compile Error: Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks. Parameter name: ticks

I have a Visual Studio 2008 solution that when I build, returns the following error: Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks. Parameter name: ticks There is no reference file/line/column in the error. Becoming quite frustrating as the solution builds in the end, however I cannot debug. In the solut...

Can I change how Visual Studio 2008 comments selection?

I know that C-k C-c comments a selection, and currently it works as thus in C++: AwesomeCode(); MoreAwesomeCode(); //AwesomeCode(); //MoreAwesomeCode(); However, I would like it to comment it as such: // AwesomeCode(); // MoreAwesomeCode(); Is this possible? ...