JonPom's Q&A profile
Software Development for Windows Vista Win32/MFC: Ownerdraw MenuItem - Never receives ODS_SELECTED
Hi, I've run into a serious problem here with Vista Beta 2 build 5308: When using an ownerdraw menu the menuitem never receives the ODS_SELECTED state. All other states work fine though. Neither my own Win32 code nor any MFC sample code ("OfficeXP Style Menu" and so on) from sites like codeproject.com do work on Vista. But all do work on 2K, XP. Now, Is this a (known ) bug in Vista A driver problem What can i do Thanks in advance, ...Show All
Visual Studio 2008 (Pre-release) Media Player-Like Application
I'm trying to throw together a simple media player application. I would like to set the source (URI) of a media file to play and have controls over playback. The MediaPlayer class obviously does all the heavy work. I would like to have Sliders for Position, SpeedRatio and Balance. I can hook these all up in code, but it appears that none of those properties are Dependency properties and therefore Binding doesn't appear to work. I noticed that Sp ...Show All
.NET Development No typelib generated
namespace Interfaces { [System.Runtime.InteropServices. ComVisible ( true )] public interface IBaseballStats { double CalcBattingAvg( int atBats, int hits); } } I have this one interface declared in a project that has the "Make assembly COM-visible" and "Register for COM interop" check boxes checked. When i build the app, i get a warning saying the dll "does not contain any ...Show All
Windows Forms How can I get IP address ?
Get IP address C# code. using System.Net; IPHostEntry hostEntry = Dns.Resolve("www.windowsforms.com"); IPAddress address = hostEntry.AddressList[0]; ...Show All
Windows Forms WS-Security
<a href="http://msdn.microsoft.com/webservices/building/wse/">wse</a> Hi all, I'm overhauling my web services to use the extensions - especially security - I don't feel that passing the ticket in as a parameter is the right way to go. We should overhaul&nb ...Show All
.NET Development How to send custom made datagram packets in C#
The requirement is to sent custom made datagram packets using TCP to custom made ftp server. The datagram should have custom header field such as version,type,payload length(custom fields). It should also have a custom payload portion. Any idea how to create this custom packet and send it over tcp Regards, Hema. Sending a custom payload in the body of a TCP packet is pretty simple with the S ...Show All
Game Technologies: DirectX, XNA, XACT, etc. Basic shader questions used with Managed DirectX
I'm for the moment learning the shaders, but keep on "blocking" on one ot two thing that I don't understand. My first question : I'm rewritting my Managed DirectX code with shader basicaly to render a mesh without any other thing that just render it. I still have in my C# this type of code : ... myDevice.SetTexture(0, myTexture); Render calls ... In the shader (where it seems that I don't have to pass the texture), I have under th ...Show All
Visual Studio Team System Package Load Failure - PerformancePackage
Has anyone seen the Package Load Failure dialog for the PerformancePackage Thank you, J Pursell Issue: Description: Under certain conditions the PerformancePackage fails to load. The Developer is presented with the Package Load Failure dialog. Environment: (see Note [1] below) Steps to Reproduce: Start Visual Studio Team Edition f ...Show All
Software Development for Windows Vista Unable to enumerate TrueType Fonts (only) in common font dialog
I need to enumerate only truetype fonts in the common font dialog. Here is my code: CHOOSEFONT cf; LOGFONT lfStatic; // logical font structure // // Initialize CHOOSEFONT // memset(&cf,0, sizeof (cf)); memset(&lfStatic,0, sizeof (lfStatic)); cf.lStructSize = sizeof (cf); cf.hwndOwner = m_hWnd; cf.lpLogFont = &lfStatic; HDC hdc = GetDC(); cf.hDC = hdc; cf.Flags = CF_TTONLY; // | CF_SCREENFONTS; if (ChooseFont(&a ...Show All
Visual C++ VC++ Directories not saved and reloaded properly in VC++ 2005
I use the Import and Export Settings wizard to import settings into VC++ that have been previously exported. When performing the export, I explicitly told the export wizard to export the VC++ Directories (it is deselected by default). The VC++ Directories have some custom additions that have been made for include, lib, source, and executable files. After performing the import I can verify that all settings have been imported in ...Show All
Visual C# timer problem
I've a timer (interval = 1000) in my app. When the timer is working parallelly a big loop is also working. but I found out untile this loop not finished the timer won't work. How can I force the timer to alwasy work every second I found this article about using threads in c# ( http://abstractvb.com/code.asp A=1028 ) but when I tried to compile this sample the compiler return this error: The type or namespa ...Show All
Visual C# static method inheritance
I am trying to derive a class such that I can reuse methods & operators from the base class. E.g., in the base class, I can write Base b1 = new Base(); Base b3 = 3.0 * b1; because I’ve written the ‘Scale’ method and ‘operator *’. (see below) When I try to do this in a class derived from Base, I fail utterly. The compiler hints that “an explicit cast exists; am I forgetting it ”, but I have no idea where ...Show All
Visual Studio Team System Broken FAQ for TFS
Hello -- I went to read the TFS technical FAQ (usually a nice thing to do before posting), but the links to the answers all led back to the top of the page with the questions. You can see this at: http://msdn.microsoft.com/vstudio/teamsystem/support/faqs/foundation_techfaq/default.aspx Sorry to have to post about this, but didn't see any better place to make it known. Cheers, Skip He's right. It works in IE (or ...Show All
Visual C++ Can you use VS 2005 and still target .NET 1.1?
I have a VC++ project from VS2003, and I would like to start using 2005, but I need to compile to .NET version 1.1 for my customers. I have other C# projects, where I have figured out to do this, but VC++ is not built with MSBuild. So I would like to know, is this possible at all ...Show All
Visual C# Threads problem
I have moved the call to Renderloop to the form's Shown event and now everything goes as intended - except that it doesn't. As long as I have breakpoints, my time display gets updated, but as soon as I remove the breakpoints it doesn't anymore .... OK, I got my time display running by wrapping all the threading in an outer loop. What happens is that I now let the threads run for one second, at which po ...Show All
