gafferuk's Q&A profile
Visual C++ I update my project from VC++6.0 to vc++2005, have a difficult question, fatal error C1189
1>C:\Program Files\Microsoft Visual Studio 8\VC\atlmfc\include\afx.h(23) : fatal error C1189: #error : Building MFC application with /MD (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD I tried many ways to fix it, but fail it's the same problem. the following is my command line: /Od /I "..\..\include\v2" /I "..\..\UToolBox\V2\Include" /I "..\..\CommonDlg\V2" /I "..\..\SDDllRes\V2" /D "_DEBUG" /D "WIN32" /D "_WINDOWS" /D "_USRDLL" /D "_WM_APPS" /D "UNICODE" /D "_WM_UMODULE" /D "_BUILD_UNICODE" /D "_VC80_UPGRADE=0x0600" /D "_AFXDLL" /D ...Show All
Visual C++ C2664
Hello I have a fuction that one of the parameters is address of another function : defenistion of callback function in my header file and a member of my class : BOOL CALLBACK EnumJoysticksCallback( const DIDEVICEINSTANCE* pdidInstance,VOID* pContext ); where i want use it: HRESULT CJoyDLL::InitDirectInput(HWND hDlg) { ... hr = g_pDI->EnumDevices( DI8DEVCLASS_GAMECTRL, &CJoyDLL::EnumJoysticksCallback, /*here fuction needs address of EnumJoysticksCallBack, but this code generate C2664 */ NULL, DIEDFL_ATTACHEDONLY ); if ( FAILED(hr) ) return hr; ...... } but when i define my function in my source file as a global function it works well : hr = g_pDI->EnumDevices( DI8DEVCLASS_ ...Show All
SQL Server dynamic query
Hello, Could anyone please tell me the error in my query...I use sql reporting 2005. select * from table1 T where (T.startdate >= Parameters!Startdate.value and T.startdate <= Parameters!Enddate.value) The report runs good but does not return any rows. Thanks, asiaindian ...Show All
SQL Server Last SQL Statement run on SQL Server
Hi All, Im just wondering if there is any way to get the last SQL Stmt or SP that was run on the server without using the SQL Profiler or third party software. Thanks and have a nice day to all. Thanks for the reply. Just only wondering if there is any alternate way using sql stmt on SQL Query Analyzer by not using the SQL profiler to get the SQL stmts. ...Show All
SQL Server How to determine whether a package is in design mode or run mode programatically
Hi, How to programatically get information from within a custom component, whether the package <that contains the component> is in design mode or in run mode [execution]. Looking through a list of system variables[ http://msdn2.microsoft.com/en-US/library/ms141788.aspx ], it was difficult to identify. Creating a user variable and setting the value in PreExecute() and resetting in CleanUp() did not work as the package is still executing, till the user clicks the stop in BID studio. Thanks in advance, Abraham V K ...Show All
Visual Studio Express Editions how can i add gradient color to a usercontrol and or panel backcolor from my.settings
Hi i'm new to programing. I would like to know how i can add gradient colors to a usercontrol and on a panel. i woul like to select the colors from the my.settings.topcolor and mysetings.bottomcolor. ahmedilyas helped me to set the forms back gradient color. how can i set the back color on a panel and usercontrol. see sample code below for the form gradient background color. i would like to instead of specifying the colors blue and white i would select them from the my.setting Protected overrides sub OnPaint(ByVal e as PaintEventArgs) Dim theBackground as System.Drawing.Drawing2D.LinearGradientBrush theBackground = new System.Drawing.Drawing2D.LinearGradientBrush(new Point(0, 0), new point(0, ClientSize.Height ...Show All
Visual Studio Express Editions I want to add progress bar
I want to add progress bar in form which display how much program is proceeded I have to functions like A(), B() my coding looks like this A() 'statement 'statement 'statement while B() end while 'statement 'statement end sub so i want to know where i put progress bar function which follow completion of fucntion A() please guide me how can i written code for progress bar Basically a progress bar determines how much of a thing has passed until it is completed so you need to determine what the maximum value is and how it is reached. Without details of your actual code and what you are showing progress for it is hard to provide an answer. For example if you ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Skin weight Transforms and Model Importer
Hey, where do you guys store the transform matrices for skin weights in the content pipeline It seems that they are merged with the bone matrices before they are passed to the processor. Also, is there any way to extend the .X file importer class There are a lot of situations in which this can be useful. If what you say is true, and we can not get the skin weight transforms from the SkinWeights { [...] } Nodes, then skinned animation is impossible without making a custom importer. I have conclusive evidence that shows that these transforms are not included in the animation data or the default bones. Please address this issue! ...Show All
SQL Server Attribute Hierachies
Hi there. I have a problem that I have been struggling to understand. Here is the situation. I will use a time dimension just as an example. If I build a time dimension containing 2 Years of dates from 2005 to 2006 with 3 attributes: Year, Month, Date and set my attribute relationships as Date ->Month and Month -> Year. In management studio I can drag over Month and then Year (in that particular order ) and it will give me the correct results. For example if I expand the Month of January 2006 the year column will show 2006. Now If I filter the year column for the year of 2006, you would expect that the month column would only contain the months of 2006, but it doesn't. It still has months for 2005. Now if I rebuild that dimensi ...Show All
.NET Development ConfigurationManages namespace
Hi I'm developing windows application. I want to use Appsettings in my application. For that i've included the following line in the begining of the class file. imports Imports System.Configuration .......but i'm getting warning that i should include System.Configuration.ConfigurationManager. But i couldn't include ConfigurationManager. So please help me Thanks and Regards Jackuline S Hi I'm using VB.net windows application. I got the answer by adding 'System.Configuration' reference in the project. Thanks ...Show All
Gadgets updating a text field in a sidebar gadget
I've written an app that is retrieving an integer value every second and writing it to an ASCII text file. I'd like my gadget to retrieve this value on a 10-second interval and write it to the gadget window. What's the correct syntax for the script that would retrieve the text (assuming it resides in "c:\temp\data.txt") Thanks! var sFile = "c:\\temp\\data.txt"; var iTimerID = window.setInterval(readFile, 10000); ... // Read the first line from a text file function readFile() { var sLine = ""; try{ var fTmp = oFSO.OpenTextFile(sFile, 1); sLine = fTmp.ReadLine(); fTmp.Close(); } catch(err) {System.Debug.outputString("readFile error: " ...Show All
Visual Studio Team System reset work items refnames
hi, i`m defining work-items with specific refnames. but i`m not satisfied with my naming conventions and want to change the names of some fields. but this is not possible and i get the following error: tfs does not support renaming of fields. i thought i just could delete the project where i imported the work-items. but the refnames are obviously remembered and i can`t redefine them. so my question is: is it possible to reset tfs relating to refnames of work-items maybe delete all projects ok i didn`t really deleted the project, i just removed it from team explorer :) TFSDeleteProject /Server:atvie-tfs01 /force test5 this cmd he ...Show All
Visual Studio 2008 (Pre-release) XLinq
Has anyone done much with XLinq [btw - in writing this i discoved a 36 page doc on XLinq which i'll read tomorrow] I have now listened to Anders Hejlsberg, the C# 3.0 videos and read some on this. Now, LINQ is an excellent technology, but i hear two things from XLinq. 1. It improves XPath queries. In numerous projects people have ran into issues with this, but moreso when namespaces are involved, or when you start doing some advanced XPath queries that work on descedents/ancestors. I'd like to know how easy people are finding doing this kind of advanced thing in XLinq. 2. Initializing the document. Now, i have read this for only a couple of days now, but although i can see the value in selecting via LINQ to create a new Xml ...Show All
Visual C++ How to get InnerException information in MFC/C++ Application
I wrote a test program that I am able to use the ConsolWrite to diplay the InnerException information. I need to be able to write out the same information to the EventLog in a NT Service. I have tried many different things trying to get the information but have been unsuccessful. I look into the class in debug but I cannot even find the string that diplays in the ConsoleWrite. Here is a code snippet from the test program and it's output. Console::WriteLine (S "In Main catch block. Caught: {0}" , e->Message); Console::WriteLine (S "Inner Exception is {0}" , e->InnerException); In Main catch block. Caught: Exception has been thrown by the target invocation InnerException is System.MissingMethodException: Method not found.. ...Show All
Visual C# Tab Controls
Can someone let me know how i can add a TAB CONTROL to an existing windows form application First off make sure you have a good back up of your project. Select everything on your main form. Cut it all. Add your Tab control, and paste all the controls you just cut into the tab page. If your Tab control was set to dock type of Fill you should have the exact same layout as was on your form. ...Show All
