How to dynamically show and hide Title bar?
Window api's is key for every thing
, Use ModifyStyle and SetWindowPos api achieve same
This will hide the title:
ModifyStyle(WS_CAPTION,0);
::SetWindowPos(m_hWnd,HWND_TOP,0,0,0,0,SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOMOVE);
To show it Again
ModifyStyle(0,WS_CAPTION);
::SetWindowPos(m_hWnd,HWND_TOP,0,0,cx,cy,SWP_SHOWWINDOW | SWP_NOSIZE |SWP_NOMOVE);
How to resize the application according to Screen Resolution?
You can resize your window using these two api: GetSystemMetrics and MoveWindow api's.
HWND hWnd= hWnd is Handle to Current/Application Window;
TCHAR szString[100] ={0};// Get Screen X and Y
int cx=GetSystemMetrics(SM_CXFULLSCREEN);
int cy=GetSystemMetrics(SM_CYFULLSCREEN);
sprintf(szString,"your Current Window Resolution is %d * %d",cx,cy);//now to resize according to screen resolution
MoveWindow(hWnd,0,0,cx,cy,TRUE);
Now you might be thinking, why i don't call directly call ShowWindow(SW_MAXIMIZE)..., because using above method,we can cover the taskbar too.
How to Copy and Paste Data from ClipBoard ?
Use these Api's :-
  1. OpenClipboard : The OpenClipboard function opens the clipboard for examination and prevents other applications from modifying the clipboard content
  2. GetClipboardData: the GetClipboardData function retrieves data from the clipboard in a specified format. The clipboard must have been opened previously
  3. SetClipboardData: The SetClipboardData function places data on the clipboard in a specified clipboard format. The window must be the current clipboard owner, and the application must have called the OpenClipboard function.
  4. CloseClipboard: Closes the clipboard
Copy a bitmap to Memory
HANDLE hDib= any Image Handle
if(OpenClipBoard(NULL)!=NULL)
{
SetClipboardData(CP_DIB,hDib);
}
Copy data from memory
HANDLE hDib;
if(OpenClipBoard(NULL)!=NULL)
{
hDib=GetClipboardData(CP_DIB);
}
How to reterive computer IPAddress and computer name?
1. GetHostName: for reteriving local host name.
 [Code Snippet]
 TCHAR szHostName[200] ={0};
 GetHostName(HostName,199);
2. GetHostByName: For Resolving IP Address
[Code Snippet]
 hostent *p;
 p=::gethostbyname(HostName);
 TCHAR *IP=inet_ntoa(*(struct in_addr*)*(p->h_addr_list));
 Â
  IP contain the ipaddress of computer
How to Get the Size Of Current Desktop Window?
Desktop window size could be determine from these two api's :-
1. SystemParametersInfo:
        The SystemParametersInfo function retrieves or sets the value of one of the system-wide parameters. This function can also update the user profile while setting a parameter.
[Code Snippet]
RECT DeskopRect = {0};
 ::SystemParametersInfo(SPI_GETWORKAREA,0,(LPVOID)&DeskopRect,0);
2. GetSystemMetrics
        The GetSystemMetrics function retrieves various system metrics (widths and heights of display elements) and system configuration settings. All dimensions retrieved by GetSystemMetrics are in pixels.
[Code Snippet]
 int Cx=::GetSystemMetrics(SM_CXFULLSCREEN);
 int Cy=::GetSystemMetrics(SM_CYFULLSCREEN);
For Client Window could be detemine by using GetClientRect and GetWindowRect api!-
How to Tackle Defective ClassWizard List of Classes ?
Here are step you should follow :-
- close the project solution or workspace!
- open project directory
- Delete project.clw and project.ncb files (worry not Visual studio will generate it again)
- Reopen Project Solution..
 your defective classwizard now working fine. Actaully .clw file contain the Class list and there function and variable list, which sometimes get corrupted. so to instruct the Visual Studio to create it again you have to delete the previous one.
How to hide & show menu bar dynamically?
For Hiding the MenuBar Dynamically:-
void CDerivedClass:OnHideMenu()
{
// Remove and destroy the old menu
SetMenu(NULL);
::DestroyMenu(GetMenu()->GetSafeHmenu());
}
For Showing the MenuBar Dynamically:-
void CDerivedClass::OnShowMenu()
{
// Load and add the new menu
CMenu mMainMenu;
mMainMenu.LoadMenu(IDR_MENU1);
ASSERT(mMainMenu);
SetMenu(&mMainMenu);
}