stevencbk's Q&A profile
Visual C++ Odd HWND Behavior
Hi, I'm using MS Vis Studio .NET 2003 and I am experiencing some odd behavior with HWND pointers. I have the following code in my application HWND hWnd; hWnd = CreateWindow(nom_app, "Reco Fr", WS_DLGFRAME, CW_USEDEFAULT, CW_USEDEFAULT, 200, 200, NULL, NULL, inst, NULL ); Sometimes CreateWindow will return a good HWND, however other times it will return something like this: hWnd {HWND__} { unused=<undefined value> } HWND__* I also get the same odd behavior when I reinterpret_cast a System::IntPtr to a HWND as follow ptr = CreateWindow(nom_app, "Reco Fr", WS_DLGFRAME, CW_USEDEFAULT, ...Show All
.NET Development how to store and read .doc file in a table of sql server using C#.
I would like to store and read .doc file in a table of sql server using C#. Thanks & Regard, Padam Kumar Tripathi Next link with sample sould help you http://support.microsoft.com/kb/326502/en-us ...Show All
Visual Studio 2008 (Pre-release) Console Hello program
Hi, I was just doing the exercise from the book "Programming Indigo" Specifically, hello1 exercise from chapter 3 where we are trying to write cosole based service and client. I downloaded the code from the web site and run it. Actually, you can see the tutorial right here http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnlong/html/progindigoch3.asp When I try to run it, I get errors on the following code. ServiceHost<HelloService> and WSProfileBinding the error messages are Error 1 The non-generic type 'System.ServiceModel.ServiceHost' cannot be used with type arguments and ...Show All
Visual Studio Team System Target against a specific .Net version?
Hi, I've just got a nightly build automation process set up using TFSBuild.exe and supplying it with the appropriate server, project, and BuildType paramaters. Is there any way to specify that I want the particular build to be under .net version 1.1 or 2.0 I am assuming that as I have installed VS 2005, SQL Server 2005, and now the trial of VSTS etc that it will automatically think it is building for 2.0, but is there a way to do 1.1 as well Is this feature also available via the gui, either in Visual Studio, or in team suite Regards, Peds You can check out this blog to target 1.1 assemblies with Team Build. Let me kn ...Show All
Software Development for Windows Vista LocalPort
Hi Would anyone happen to know how LocalPort or its equivalent can be used in VC++ without ActiveX. We are writing an application where we need to write an Http client and specify the inbound port along with the server port (80 in most cases). Any help would be greatly appreciated. Thanks, Sonia. ...Show All
Visual Studio Team System I suppose I could do that but that really isn't as useful as I'd like
What is the best alternative for tracking developer hours against work items in Team Foundation Server Any third party tools It would be nice to have more details on what do you exactly want, but I think for tracking the hours and tasks in Team system, the best would be use the work items in Team Foundation Server, together with Microsoft Project for tracking task dependencies and hours worked in a task. ...Show All
Visual C++ Compile error C1083
Hello all, I got the following error when building a Visual C++ MFC application using Visual Studio 2003 on Windows 2000. Compiling... stdafx.cpp c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afx.h(182) : fatal error C1083: Cannot open include file: 'stddef.h': No such file or directory Does anybody know where can I get that file Thank you, Following is the compile log: Build Log ------- Build started: Project: MyProject, Configuration: Debug|Win32 ------- Command Lines Creating temporary file "c:\Documents and Settings\Administrator.GABY.000\My Documents\Visual Studio Project ...Show All
Visual C++ ATLComTime.h and alignment
Hello! I have the following problem: ATLComTime.h file breaks an alignment somehow. Steps to reproduce: Create an EMPTY Win32 Console project in Visual C++ 2003/2005, without precompiled headers. Add new .cpp file with the following code: #include <ATLComTime.h> #include <comdef.h> #include <activeds.h> int main() { // Compile time assert: fails to compile if alignment of ADSVALUE struct differs from 8 typedef char MYASSERT[ __alignof (ADSVALUE) == 8 1 : 0]; return 0; } Try to compile. It will fail with " t est.cpp(8) : error C2466: cannot allocate an array of constant size 0 ". That ...Show All
Visual Studio 2008 (Pre-release) Go live for LINQ/DLINQ before Orcas?
There seems to be a lot of activity on this forum and it has me wondering...are all these questions coming from applications that aren't going to launch until after Orcas ships OR is it "OK" to create apps today that are targetting .NET 2.0 using LINQ/DLINQ :) Is there any chance there will be a Go Live license for LINQ/DLINQ before Orcas ships Whats the latest on when Orcas is expected to ship Basically, when can we expect that we'll be able to use LINQ for real ...Show All
Visual Studio 2008 (Pre-release) X509 Certificates between a web service and another service
Using X509 certificates between a user and a web service seems "failry" stright forward. However, how does one configure the X.509 certificates to work between a web service (running a network service by default) and another WCF service I have trief everything using tools to the likes of FindPrivateKey and MakeCert ... to no avail. The trusted people store was my downfall. Thanks for your invaluable assiatance! ...Show All
Visual Studio Team System Extracting attribute value
How do i extract some particular part of attribute. Not all attribute! For example i want to extract value of BlockId from this fragment of html code: </script></head> <body> <form name="form1" method="post" action="Default.aspx ScreenKey=AccidentScreen&BlockId=f6f225aa-9d76-4271-ad60-1b0d91a6ab80&IsModal=False" id="form1"> <div> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTQ2NDkyNzY1MGRkNaUHtemu/tIdfTqL25NpNHI83Xw=" /> </div> <div> <div id="defaultHost" styl ...Show All
SQL Server How to encorporate IF
How can I put an If statement saying If # RECORDS returned from the query below IF # records returned is > 1 then SUM(rmstranamt) AS rmstranamt10 ELSE rmstranamt AS rmstranamt10 here's my statement ------------------------- SELECT RMSFILENUM, rmstranamt AS rmstranamt10 <-----If statement goes here base on if the amount of records found in select is >1 or not FROM RFINANL WHERE RMSTRANCDE = '10' GROUP BY RMSFILENUM, rmstranamt ) AS rf10 ON rf10.RMSFILENUM = rm.RMSFILENUM ...Show All
Windows Forms equivalent of Datagrid.CurrentRowIndex in DatagridView 2.0?
DatagridView.CurrentRow.Index does not work the same as Datagrid.CurrentRowIndex. How to get the equivalent Example: If you scrolled to a row using the arrow keys in a Datagrid in 1.x and using ProcessCmdKey to capture the enter key you could get that row number in Datagrid.CurrentRowIndex But in 2.0 if you attempt the same operation the DatagridView.CurrentRow.Index returns the row that you previously were on not the row you moved to and hit enter on. I tried it out your suggestion but from the DGView_RowEnter event the old row index is picked up, and not the new one the cursor is currently on. ...Show All
Visual Studio 2008 (Pre-release) Equality
According to the docs you are using the Equals static method in System.object, what if I do the following public sealed class MyClass : System.Collections.Generic. EqualityComparer < MyClass > and override the Equals... will it still use the Equals from object or my overriden equals This question is specifically for EqualAll but I suppose applies to anything you call equal on. object.Equals(object a, object b) uses object.Equals(object obj) to compare objects. That means you can just override Equals(object obj) in MyClass to achieve the functionality you want. ...Show All
Visual C++ Why destructor cannot be a friend function?
Why destructor cannot be a friend function Can someone help me out.. bye bond Marinus I think you have the notion of friend-ship reversed: what James wants to do is something like the following: class X { public: void mf(); }; class A { public: ~A(); }; class B { friend A::~A(); private: static X* pX; }; A::~A() { B::pX->mf(); } He want's the destructor of A to be able to access the private members of B. James: the code above compiles with the Beta-2 release of Visual C++ 2005 Express Edition. Which version are you using and what errors are you seeing ...Show All
