Click here to Skip to main content
16,005,114 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Application icon problem Pin
Hans-Georg Ulrich17-Apr-03 4:00
Hans-Georg Ulrich17-Apr-03 4:00 
GeneralRe: Application icon problem Pin
Bartosz Bien17-Apr-03 7:43
Bartosz Bien17-Apr-03 7:43 
GeneralRe: Application icon problem Pin
Joel Lucsy17-Apr-03 4:13
Joel Lucsy17-Apr-03 4:13 
GeneralRe: Application icon problem Pin
Hans-Georg Ulrich17-Apr-03 4:30
Hans-Georg Ulrich17-Apr-03 4:30 
Generalproblems with button messages Pin
sandrine17-Apr-03 3:09
sandrine17-Apr-03 3:09 
GeneralRe: problems with button messages Pin
Maximilien17-Apr-03 3:21
Maximilien17-Apr-03 3:21 
GeneralRe: problems with button messages Pin
sandrineV17-Apr-03 4:20
sandrineV17-Apr-03 4:20 
GeneralRe: problems with button messages Pin
Rage17-Apr-03 4:36
professionalRage17-Apr-03 4:36 
In your message loop, get the WM_NOTIFY message which is sent by your pushing the button.
WM_NOTIFY 
    idCtrl = (int) wParam; 
    pnmh = (LPNMHDR) lParam; 


Cast the lParam on a LPNMHDR (like done here on pnmh), and you have a pointer on a NMHDR structure :

typedef struct tagNMHDR { 
    HWND hwndFrom; 
    UINT idFrom; 
    UINT code; 
} NMHDR; 


check if the pnhm->idFrom correspond to your IDC_PAUSEBUTTON (or whatever ID you gave to the button), and if yes, your button has sent the Message (ouf).

BUT ...

I would recommend you to let the video display using its own thread, so the rest of the buttons keep available for the user (this is pseudo code):

Main
  if (pause) boolean PAUSE=1
  if (play)  boolean PAUSE =0, boolean PLAY=1
  if (stop)  boolean STOP=1
...


VideoThread
    while (not STOP)
  if (PLAY) display next frame
  if (PAUSE) while (not PAUSE)
...


~RaGE();
GeneralKeyboard handling Pin
jitesh8017-Apr-03 2:26
jitesh8017-Apr-03 2:26 
GeneralRe: Keyboard handling Pin
Rage17-Apr-03 3:33
professionalRage17-Apr-03 3:33 
GeneralRe: Keyboard handling Pin
jitesh8017-Apr-03 16:49
jitesh8017-Apr-03 16:49 
Questionhow to write into a resource file? Pin
vcseeker17-Apr-03 1:32
vcseeker17-Apr-03 1:32 
AnswerRe: how to write into a resource file? Pin
David Crow17-Apr-03 2:34
David Crow17-Apr-03 2:34 
AnswerRe: how to write into a resource file? Pin
Rage17-Apr-03 3:27
professionalRage17-Apr-03 3:27 
AnswerRe: how to write into a resource file? Pin
HardStone21-Apr-03 2:09
HardStone21-Apr-03 2:09 
AnswerRe: how to write into a resource file? Pin
vcseeker21-Apr-03 22:14
vcseeker21-Apr-03 22:14 
GeneralRAS-Communication Pin
ZarrinPour17-Apr-03 1:30
ZarrinPour17-Apr-03 1:30 
GeneralRe: RAS-Communication Pin
João Paulo Figueira17-Apr-03 5:13
professionalJoão Paulo Figueira17-Apr-03 5:13 
Generaldata conversion Pin
andyg.10117-Apr-03 0:26
andyg.10117-Apr-03 0:26 
GeneralRe: data conversion Pin
Rage17-Apr-03 0:58
professionalRage17-Apr-03 0:58 
GeneralRe: data conversion Pin
Anonymous17-Apr-03 1:03
Anonymous17-Apr-03 1:03 
GeneralRe: data conversion Pin
Rage17-Apr-03 1:11
professionalRage17-Apr-03 1:11 
GeneralRe: data conversion Pin
David Crow17-Apr-03 4:49
David Crow17-Apr-03 4:49 
GeneralRe: data conversion Pin
Toni7817-Apr-03 19:02
Toni7817-Apr-03 19:02 
GeneralI search something like a table control Pin
Anonymous17-Apr-03 0:19
Anonymous17-Apr-03 0:19 

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.