Refreshing desktop wallpaper

Win32 Programming

    Next

  • 1. DrawTrackerRect for .NET?
    Anyone know of any code samples that show how to execute a tracking rectangle like DrawTrackerRect() in MFC used to do? I don't see any equivalent functionality in .NET, without rolling your own.
  • 2. EnumDisplaySettings for a Monitor?
    Hello, Does anyone know if it is possible to get the Devicesettings for a specific monitor (instead of an adapter) ? An adapter can have multiple montors attached, i am able to enumerate the monitors with the EnumDisplayDevices and EnumDisplaySettings. The device name for a monitor looks very much like the name for an adapter. (ie: \\.\DISPLAY1 for the adapter and \\.\DISPLAY1\Monitor0 for monitor 0 on that adapter. Calling EnumDisplaySettings with the Adapatername gives me all the settings, but giving the monitorname does nothing. The docs dont make it clear to me if it should be at all possible... Anyone knows how this works? - Thanks in advance - Jeroen
  • 3. gdiplus crash with small source.
    I have this small project consisting of legal (to the best of my knowledge) source which causes a GPF in gdiplus.dll. Please could somebody from Microsoft repond on this? I will continue to repost this message until such time. Thanks, Ben
  • 4. How to enable/disable TV-OUT ?
    Hi, I have tried to enable and disable the TV OUT on a graphic card by using the GDI function ChangeDisplaySettingsEx function and the VIDEOPARAMETERS struct, but it does seem to work. According to Microsoft/MSDN it should be possible to enable/disable TV OUT. They say: To enable TV output, the caller (not the miniport driver) should do the following: In dwFlags, set VP_FLAGS_TV_MODE and VP_FLAGS_TV_STANDARD. Clear all other flags. Set dwMode to either VP_MODE_WIN_GRAPHICS or VP_MODE_TV_PLAYBACK. Do not set both bits. Set dwTvStandard to the desired standard (for example VP_TV_STANDARD_NTSC_M). Do not set any other bits in dwTvStandard The VIDEOPARAMETERS struct contains the above members. I have tried the following (C++ ;-) VIDEOPARAMETERS vp = {0}; vp.Guid = GUID_VIDEOPARAMETERS; vp.dwCommand = VP_COMMAND_SET; vp.dwFlags = VP_FLAGS_TV_MODE | VP_FLAGS_TV_STANDARD vp.dwMode = VP_MODE_TV_PLAYBACK; vp.dwTVStandard = VP_TV_STANDARD_NTSC_M; LONG lResult = ChangeDisplaySettingsEx ("\\\\.\\Display1",NULL,0,CDS_VIDEOPARAMETERS,&vp); The function returns success (DISP_CHANGE_SUCCESSFUL), but it does not enable the TV OUT. Does anyone have any experience with this or any other idea on how to enable/disable the TV OUT on a graphic card?

Refreshing desktop wallpaper

Postby Jeffery Tyree » Wed, 14 Dec 2005 10:00:03 GMT

My application is written in C#.NET and will run on XP machines.  I would 
like to programmatically change the desktop wallpaper.  Reading and writing 
registry values is no problem but I'm having difficulty figuring out what 
the proper message is and how to send it to the system message queue so that 
the desktop is painted with the new wallpaper.  I ask that someone please 
provide some sample code for this.

TIA. 



Re: Refreshing desktop wallpaper

Postby Kellie Fitton » Wed, 14 Dec 2005 12:02:24 GMT

Hi,

You can use the following API to set the deskTop's wallPaper:

	SystemParametersInfo(SPI_SETDESKWALLPAPER,
			0,
			MyWallPaperFile,
			SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);

 http://www.**--****.com/ 

Hope these information helps,

Kellie.


Re: Refreshing desktop wallpaper

Postby Kellie Fitton » Wed, 14 Dec 2005 12:02:24 GMT

Hi,

You can use the following API to set the deskTop's wallPaper:

	SystemParametersInfo(SPI_SETDESKWALLPAPER,
			0,
			MyWallPaperFile,
			SPIF_UPDATEINIFILE | SPIF_SENDCHANGE);

 http://www.**--****.com/ 

Hope these information helps,

Kellie.


Re: Refreshing desktop wallpaper

Postby Jeffery Tyree » Wed, 14 Dec 2005 16:01:15 GMT

Thank you.  I'll begin studying these.

-J









Return to Win32 Programming

 

Who is online

Users browsing this forum: No registered users and 6 guest