#include <windows.h>
#include <commctrl.h>
#include <commdlg.h>
#include <richedit.h>
#include <stdio.h>
#include "header.h"

extern HINSTANCE hInstance ;

void doPopup(HWND hwnd, char *res)
{
  HMENU menu  = LoadMenu( hInstance, res ), popup;
	POINT pos ;
  popup = GetSubMenu( menu, 0 );
  GetCursorPos( &pos );
  TrackPopupMenuEx( popup, TPM_BOTTOMALIGN | TPM_LEFTBUTTON,
			pos.x, pos.y, hwnd, NULL );
  DestroyMenu( menu );
}