How to write on Windows desktop from C/C++ code ?  
Author Message
Ametis





PostPosted: Visual C++ Language, How to write on Windows desktop from C/C++ code ? Top

I want to display on my desktop some useful informations like my IP, MAC address, current time, etc.. Is it possible to write these informations directly on Windows desktop from C/C++ code

Any ideea



Visual C++16  
 
 
Marius Bancila





PostPosted: Visual C++ Language, How to write on Windows desktop from C/C++ code ? Top

First, why do you want to draw it on the desktop Doesn't look like a good idea for me.

You can get a handle to the desktop window with GetDesktopWindow().



 
 
Ametis





PostPosted: Visual C++ Language, How to write on Windows desktop from C/C++ code ? Top

Why do you think that is not a good ideea

In romanian language: Am un prieten care are un Internet Cafe si ma bate la cap de vreo cateva luni sa-i fac un program care sa-i scrie pe fiecare desktop cateva informatii. Nu sunt un mare programator. Si n-am mai incercat niciodata sa scriu pe desktop. Nici n-am stiu ca e posibil. Am intrebat doar :)


 
 
einaros





PostPosted: Visual C++ Language, How to write on Windows desktop from C/C++ code ? Top

If you do want to write there, you will have to intercept all painting calls aswell. Otherwise your output will be obscured / erased every time there's a repaint or invalidation.

Anyway, please direct this question to the UI newsgroup at http://msdn.microsoft.com/newsgroups/default.aspx dg=microsoft.public.win32.programmer.ui&lang=en&cr=US. This forum deals with C++ language questions, so unspecific concept discussions are better routed to the appropriate newsgroups.

BTW.: there's another application, Samurize (http://www.samurize.com/modules/news/), which does just about what you describe here. You could perhaps get away with using or writing a plugin for that.



 
 
Marius Bancila





PostPosted: Visual C++ Language, How to write on Windows desktop from C/C++ code ? Top

Why do you think that is not a good ideea

In romanian language: Am un prieten care are un Internet Cafe si ma bate la cap de vreo cateva luni sa-i fac un program care sa-i scrie pe fiecare desktop cateva informatii. Nu sunt un mare programator. Si n-am mai incercat niciodata sa scriu pe desktop. Nici n-am stiu ca e posibil. Am intrebat doar :)

OK. I had a slighly feeling it was about it. The thing is that everything is possible. Personally, I never wrote on the desktop directly. I think you should take a look at the program Einar pointed, Samurize. It's free and it may already have the kind of feature you need (I've seen something similar on the list of features).

PS: nice to see something in Romanian, but since this is an English forum, let's keep it in English.



 
 
Simple Samples





PostPosted: Visual C++ Language, How to write on Windows desktop from C/C++ code ? Top

There is something called an Active Desktop, at least that is what it was called in the past. It allows use of a HTML file for the desktop and then you have a very flexible way to customize the desktop. It has been a long time since I tried it so I might have the details wrong. You can ask in another forum or a newsgroup about this.

In XP, when I click on the desktop and select Properties I get a Display Properties box. When I go to the Desktop tab and click on the Customize Desktop button, then click on the Web tab (got that so far ) I get a box for entering web pages to be displayed on the desktop. That is probably worth exploring. If you have questions, ask elsewhere; the topic is out of scope for here and I don't remember much about it, even if it is what I remember using.