Click here to Skip to main content
15,897,122 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: is it possible to convert wav file to text file using vc++6.0 Pin
Cedric Moonen24-Nov-09 20:32
Cedric Moonen24-Nov-09 20:32 
General[Message Deleted] Pin
eswar pothula24-Nov-09 22:25
eswar pothula24-Nov-09 22:25 
GeneralRe: is it possible to convert wav file to text file using vc++6.0 Pin
Cedric Moonen24-Nov-09 23:04
Cedric Moonen24-Nov-09 23:04 
QuestionRe: is it possible to convert wav file to text file using vc++6.0 Pin
CPallini24-Nov-09 20:49
mveCPallini24-Nov-09 20:49 
JokeRe: is it possible to convert wav file to text file using vc++6.0 Pin
Cedric Moonen24-Nov-09 21:12
Cedric Moonen24-Nov-09 21:12 
AnswerRe: is it possible to convert wav file to text file using vc++6.0 Pin
KarstenK24-Nov-09 21:08
mveKarstenK24-Nov-09 21:08 
AnswerRe: is it possible to convert wav file to text file using vc++6.0 Pin
Chris Losinger25-Nov-09 5:42
professionalChris Losinger25-Nov-09 5:42 
QuestionGet an exception while opening a file Pin
V K 224-Nov-09 18:01
V K 224-Nov-09 18:01 
AnswerRe: Get an exception while opening a file Pin
«_Superman_»24-Nov-09 18:04
professional«_Superman_»24-Nov-09 18:04 
GeneralRe: Get an exception while opening a file Pin
V K 224-Nov-09 18:30
V K 224-Nov-09 18:30 
QuestionRe: Get an exception while opening a file Pin
«_Superman_»24-Nov-09 19:13
professional«_Superman_»24-Nov-09 19:13 
AnswerRe: Get an exception while opening a file Pin
V K 224-Nov-09 23:25
V K 224-Nov-09 23:25 
AnswerRe: Get an exception while opening a file Pin
Michael Schubert25-Nov-09 1:59
Michael Schubert25-Nov-09 1:59 
QuestionI have hooked the WSARecv function and get the packet . But how can i resend it to the program? Pin
reichtiger24-Nov-09 17:24
reichtiger24-Nov-09 17:24 
AnswerRe: I have hooked the WSARecv function and get the packet . But how can i resend it to the program? Pin
Adam Roderick J24-Nov-09 22:07
Adam Roderick J24-Nov-09 22:07 
QuestionPopmenu in View class Pin
Anu_Bala24-Nov-09 17:09
Anu_Bala24-Nov-09 17:09 
AnswerRe: Popmenu in View class Pin
JohnCz7-Dec-09 19:26
JohnCz7-Dec-09 19:26 
AnswerRe: Popmenu in View class Pin
JohnCz7-Dec-09 19:52
JohnCz7-Dec-09 19:52 
GeneralRe: Popmenu in View class Pin
shanmugarajaa9-Dec-09 15:56
shanmugarajaa9-Dec-09 15:56 
AnswerRe: Popmenu in View class Pin
JohnCz9-Dec-09 19:08
JohnCz9-Dec-09 19:08 
I will be straightforward and do not get upset.
Many posts start the same way yours did. You describe things assuming that I post responder knows every detail of your project. Unfortunately, nobody has a crystal ball, therefore reading intensions is not possible.
Second thing: I have asked some questions and most likely by answering them you would clarify your problem more. You have chosen to ignore all of my question and yet you expect me to answer yours.
Please help me to help you.
What I know is you are using what you describe as a dialog. From your description, it maybe is a CFormView.
Based only on assumption (modeless dialog) and unknown type of the application, not knowing how you invoke views (switching, creating new) , and assuming that you are using default MFC command message routing, I will be able only to point your mistakes that are obvious.

First, get rid of line sending command message from CMainFrame::OnUpdateFpgroup. I presume this is an update command UI handler. It is used to enable/disable or set/clear check or radio mark for a specific menu.
You are getting it after menu invoked by TrackPopupMenu is dismissed, only because you bypass or violate MFC routing mechanism.
You should use command message handler not update UI handler. Choose COMMAND not UPDATE_COMMAD_UI when you insert handler.

When you call TrackPopupMenu, you pass CWnd pointer received by the handler. Again frame window receives this message only because command routing is confused.

Most likely you do the same in a view, and that is causing undesirable behavior. Last parameter of the TrackPopupMenu call tell what window is supposed to handle this message. To properly route command you should pass a pointer to a first window that has a chance to handle it. If it does not, routing will continue. From top command i.e. Main frame down to first active child (frame or view) document, doc template (OLE stuff if registered) application).
Hence, in both cases, your call to TrackPopupMenu should be written like this:
CMenu mnuPopup;
mnuPopup.LoadMenu(IDR_POPUP_EDIT);

CMenu *mnuPopupMenu = mnuPopup.GetSubMenu(0);
ASSERT(mnuPopupMenu);

mnuPopupMenu->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y, AfxGetMainWnd());


Get rid of checking if point is in the rectangle.

JohnCz
MS C++ MVP

QuestionProblem with mousewheel Pin
Rozis24-Nov-09 13:02
Rozis24-Nov-09 13:02 
AnswerRe: Problem with mousewheel Pin
«_Superman_»24-Nov-09 13:22
professional«_Superman_»24-Nov-09 13:22 
GeneralRe: Problem with mousewheel [modified] Pin
Rozis25-Nov-09 14:21
Rozis25-Nov-09 14:21 
QuestionHow to ask the user to choose a directory/folder? Pin
Anthony Appleyard24-Nov-09 11:06
Anthony Appleyard24-Nov-09 11:06 
AnswerRe: How to ask the user to choose a directory/folder? Pin
Maximilien24-Nov-09 12:08
Maximilien24-Nov-09 12:08 

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.