Tom Lai's Site Index:
My Sharewares

Resume

Network Protocols

Real-Time OS/Network Platforms

Windows Device Drivers

Windows GUI

Vancouver Attractions

Other Links

 
 
Windows Graphical-User-Interface 





Hot Links: 

MFC Programmer's SourceBook
  (learn every fancy tricks of Windows programming and MFC)




How To's: 

How to drag/drop/cut/copy/paste files/directories between applications using the OLE clipboard?
Download Microsoft's example: FILEDRAG.EXE

Many people have wondered what exactly does the Windows shell cut/paste to the OLE clipboard. This example shows how to use the thinly documented clipboard format, CF_HDROP.

How to StretchBlt a bitmap transparently?
View my code snippet: TSBLT.TXT

There are known techniques for transparent BitBlt, either using memory DC/BITMAP, or image list. But transparent StretchBlt is a little bit more involved.

How to remove the application title from the task bar?
Have you wondered how an application window can make itself stealth by not appearing in the task bar? Well, one way is to fake its window destruction to the task bar:

void RemoveFromTaskBar(HWND hwnd)
{
  static const TCHAR szTrayClass[] = _T("Shell_TrayWnd");
  static const TCHAR szTaskClass[] = _T("MSTaskSwWClass");

  // Get the taskbar's window handle.
  HWND hwTray = ::FindWindowEx(NULL, NULL, szTrayClass, NULL);
  HWND hwTask = ::FindWindowEx(hwTray, NULL, szTaskClass, NULL);
  ASSERT(hwTask != NULL);

  // Get id of the shell's hook message.
  UINT nMsg = ::RegisterWindowMessage(_T("SHELLHOOK"));
  ASSERT(nMsg != NULL);

  // Fake destruction of the window.
  ::PostMessage(hwTask, nMsg, HSHELL_WINDOWDESTROYED, (LPARAM)hwnd);
}



My e-mail address:  
tlai@canada.com



Last updated November 28, 1999 

This page hosted by Get your own Free Homepage
1