Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 23rd, 2006, 04:42 PM
Registered User
Join Date: Dec 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Help getting desktop handle

Hello everyone,

Could someone please help me get started with how I might go about placing text on the actual windows desktop in my form project using c++ and make it stay there and not be covered up by any other windows that might get opened. As a starting point I've tried using code like this just to get the required handles.

HDC hdcScreen;
HDC hdcCompatible;

hdcScreen = CreateDC(TEXT("DISPLAY"), NULL, NULL, NULL);
hdcCompatible = CreateCompatibleDC(hdcScreen);

But when ever I run this with the debugger my variable have values of this;

hdcCompatible {HDC__} { unused=<undefined value> } HDC__*
hdcScreen {HDC__} { unused=<undefined value> } HDC__*

I'm am assuming these variables don't have valid values (as I'm new to 2003 .net programming). Am I at least in the right area for doing this or should I maybe looking for another way.

Thank you

Similar Threads
Thread Thread Starter Forum Replies Last Post
New desktop creation in C# satya.namburu C# 4 August 5th, 2008 11:30 PM
Remote Desktop Connection hari raghav Windows Server 3 June 9th, 2008 12:46 PM
security for Desktop application mattphung Pro VB.NET 2002/2003 5 May 30th, 2008 12:32 PM
Desktop sharing in .NET pamurugesan .NET Framework 2.0 0 May 29th, 2008 01:56 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.