Click here to Skip to main content
16,006,065 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ShellExecute Pin
8-Oct-01 4:20
suss8-Oct-01 4:20 
GeneralRe: ShellExecute Pin
Maer7279-Oct-01 2:20
Maer7279-Oct-01 2:20 
Generalhttp download Pin
Peter Molnar6-Oct-01 14:08
Peter Molnar6-Oct-01 14:08 
GeneralFormatMessageW for 95/98/ME Pin
Tim Smith6-Oct-01 12:47
Tim Smith6-Oct-01 12:47 
GeneralSticky Notes Pin
shadowplayer6-Oct-01 10:19
shadowplayer6-Oct-01 10:19 
GeneralExtra menu on right click Pin
6-Oct-01 10:14
suss6-Oct-01 10:14 
GeneralRe: Extra menu on right click Pin
Tim Smith6-Oct-01 12:55
Tim Smith6-Oct-01 12:55 
GeneralRe: Extra menu on right click Pin
Wolfram Steinke6-Oct-01 12:59
Wolfram Steinke6-Oct-01 12:59 
In your handler for the right click use TrackPopupMenu.
Below is a piece of code I pinched from one of my applications. You will probably have to play with the value of pt which will determine the position of the to top left of the menu.

CPoint pt;
GetCursorPos(&pt);
CMenu* pM = new CMenu;
pM->CreatePopupMenu();
CString str;
str.LoadString(IDS_EDITIMAGE);
pM->AppendMenu(MF_STRING, IDM_EDITIMAGE, (LPCTSTR)str);
str.LoadString(IDS_DELETE);
pM->AppendMenu(MF_STRING, IDM_DELETE, (LPCTSTR)str);
str.LoadString(IDS_PRINTIMAGE);
pM->AppendMenu(MF_STRING, IDM_PRINTIMAGE, (LPCTSTR)str);
if(GetDocument()->IsMailAvailable())
{
pM->AppendMenu(MF_SEPARATOR);
str.LoadString(IDS_SENDPICTURE);
pM->AppendMenu(MF_STRING, IDM_SENDPICTURE, (LPCTSTR)str);
}
pM->AppendMenu(MF_SEPARATOR);
UINT nID = IsThereExtraFileType( hItem, IDB_NOTES ) ? IDS_EDITNOTES : IDS_ADDNOTES;
str.LoadString( nID );
pM->AppendMenu(MF_STRING, IDM_ADDNOTES, (LPCTSTR)str);
nID = IsThereExtraFileType( hItem, IDB_VOICE ) ? IDS_REPLACEVOICE : IDS_ADDVOICE;
str.LoadString( nID );
pM->AppendMenu(MF_STRING, IDM_ADDVOICE, (LPCTSTR)str);
// if( IsThereExtraFileType( hItem, IDB_VOICE ))
// {
// str.LoadString( IDS_PLAYVOICE );
// pM->AppendMenu(MF_STRING, IDM_PLAYVOICE, (LPCTSTR)str);
// }
pM->AppendMenu(MF_SEPARATOR);
str.LoadString(IDS_PROPERTIES);
pM->AppendMenu(MF_STRING, IDM_PROPERTIES, (LPCTSTR)str);
pM->TrackPopupMenu( TPM_LEFTALIGN|TPM_LEFTBUTTON, pt.x, pt.y, this );
pM->DestroyMenu();
delete pM;


Happy programming!!
GeneralConnection Question Pin
6-Oct-01 10:10
suss6-Oct-01 10:10 
GeneralRe: Connection Question Pin
Shadi Al-Kahwaji7-Oct-01 0:32
Shadi Al-Kahwaji7-Oct-01 0:32 
QuestionHow to create modal windows? Pin
Pipe6-Oct-01 5:09
Pipe6-Oct-01 5:09 
AnswerRe: How to create modal windows? Pin
Christian Graus6-Oct-01 9:58
protectorChristian Graus6-Oct-01 9:58 
AnswerRe: How to create modal windows? Pin
Tomasz Sowinski8-Oct-01 1:46
Tomasz Sowinski8-Oct-01 1:46 
GeneralRe: How to create modal windows? Pin
Pipe8-Oct-01 6:51
Pipe8-Oct-01 6:51 
GeneralRe: How to create modal windows? Pin
Tomasz Sowinski8-Oct-01 7:18
Tomasz Sowinski8-Oct-01 7:18 
AnswerRe: How to create modal windows? Pin
Fazlul Kabir8-Oct-01 7:12
Fazlul Kabir8-Oct-01 7:12 
GeneralRe: How to create modal windows? Pin
Tomasz Sowinski8-Oct-01 7:22
Tomasz Sowinski8-Oct-01 7:22 
GeneralRe: How to create modal windows? Pin
Fazlul Kabir8-Oct-01 14:18
Fazlul Kabir8-Oct-01 14:18 
Generalbitmap image problem Pin
parag6-Oct-01 3:08
parag6-Oct-01 3:08 
GeneralRe: bitmap image problem Pin
Christian Graus6-Oct-01 10:00
protectorChristian Graus6-Oct-01 10:00 
GeneralOracle and ADO Pin
Mr_Byte5-Oct-01 23:19
Mr_Byte5-Oct-01 23:19 
GeneralRe: Oracle and ADO Pin
Michael P Butler6-Oct-01 7:02
Michael P Butler6-Oct-01 7:02 
GeneralRe: Oracle and ADO Pin
Mr_Byte6-Oct-01 7:14
Mr_Byte6-Oct-01 7:14 
GeneralRe: Oracle and ADO Pin
Michael P Butler6-Oct-01 7:24
Michael P Butler6-Oct-01 7:24 
GeneralRe: Oracle and ADO Pin
Mr_Byte6-Oct-01 8:16
Mr_Byte6-Oct-01 8:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.