Click here to Skip to main content
15,908,437 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Explain the Output Pin
VickyMD26-Dec-03 22:15
sussVickyMD26-Dec-03 22:15 
GeneralDestruction of static object Pin
Anonymous26-Dec-03 18:02
Anonymous26-Dec-03 18:02 
GeneralRe: Destruction of static object Pin
Monty226-Dec-03 20:39
Monty226-Dec-03 20:39 
GeneralRe: Destruction of static object Pin
Tim Smith27-Dec-03 3:05
Tim Smith27-Dec-03 3:05 
GeneralRe: Destruction of static object Pin
Gary R. Wheeler27-Dec-03 6:35
Gary R. Wheeler27-Dec-03 6:35 
GeneralRe: Destruction of static object Pin
Tim Smith27-Dec-03 13:27
Tim Smith27-Dec-03 13:27 
GeneralRe: Destruction of static object Pin
Michael Dunn27-Dec-03 7:38
sitebuilderMichael Dunn27-Dec-03 7:38 
GeneralButton Control Pin
Best Friend26-Dec-03 17:13
Best Friend26-Dec-03 17:13 
GeneralRe: Button Control Pin
shultas26-Dec-03 17:52
shultas26-Dec-03 17:52 
GeneralI'm not a programmer, but looking for help Pin
junkyx26-Dec-03 12:26
junkyx26-Dec-03 12:26 
GeneralRe: I'm not a programmer, but looking for help Pin
Marek Grzenkowicz27-Dec-03 1:10
Marek Grzenkowicz27-Dec-03 1:10 
Generalfocus different views and timer Pin
(Steven Hicks)n+126-Dec-03 11:19
(Steven Hicks)n+126-Dec-03 11:19 
GeneralRe: focus different views and timer Pin
Monty226-Dec-03 20:59
Monty226-Dec-03 20:59 
GeneralRe: focus different views and timer Pin
(Steven Hicks)n+127-Dec-03 13:15
(Steven Hicks)n+127-Dec-03 13:15 
Generalauto start program when load Pin
Vietnight26-Dec-03 10:57
Vietnight26-Dec-03 10:57 
GeneralRe: auto start program when load [modified] Pin
Marek Grzenkowicz27-Dec-03 1:14
Marek Grzenkowicz27-Dec-03 1:14 
GeneralRe: auto start program when load Pin
Vietnight27-Dec-03 6:37
Vietnight27-Dec-03 6:37 
GeneralRe: auto start program when load [modified] Pin
Marek Grzenkowicz27-Dec-03 20:21
Marek Grzenkowicz27-Dec-03 20:21 
GeneralRe: auto start program when load Pin
Vietnight27-Dec-03 22:33
Vietnight27-Dec-03 22:33 
chopeen wrote:
I guess that this happens when you press the Go button:
case IDSTART:
timerid=timeSetEvent(current->delay,current->delay,TimeProc,0,TIME_PERIODIC);
return TRUE;

Am I right? If yes, put the timerid=timeSetEvent... line in WM_INITDIALOG. You will have something like this:
case WM_INITDIALOG:
timerid=timeSetEvent(current->delay,current->delay,TimeProc,0,TIME_PERIODIC);
return TRUE;

This should do the trick. If it does, let me know. And if it doesn't, you can send me the code and I'll work it out.


Hi chopeen,
Yes, you are right it happen when you press the Go button: i have try to use your method and it didn't work it compile and when i try to run the app i get and Application Error
"The instruction at "0x00401447" referenced memory at "0x00000008". The memory could not be "read".

here is what i add to the code:
switch (message) {<br />
    case WM_INITDIALOG:<br />
        timerid=timeSetEvent(current->delay,current->delay,TimeProc,0,TIME_PERIODIC);<br />
        return TRUE;


maybe i try it again tomorrow, right now is 4:00 AM and i just get back home from work and check the message and try it see it work but not.

here is a block section of the code that the DIALOG INIT

// message loop<br />
BOOL CALLBACK DialogProc (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)<br />
{<br />
	if(wParam==SYSTRAYBUTTON&&(lParam&3)==3) {<br />
<br />
		Shell_NotifyIcon(NIM_DELETE,&nidata);<br />
		ShowWindow(hDialog,SW_SHOW);<br />
		<br />
		SetForegroundWindow(hDialog);<br />
	}<br />
<br />
    switch (message) {<br />
		case WM_INITDIALOG:<br />
			return TRUE;<br />
		case WM_COMMAND:<br />
			switch(LOWORD(wParam)) {<br />
				case IDRELOAD:<br />
					timeKillEvent(timerid);<br />
					load_cfg();<br />
					curtimes=0;<br />
					curframes=0;<br />
					curtime=0;<br />
					curframe=0;<br />
					change=0;<br />
					timerid=timeSetEvent(current->delay,current->delay,TimeProc,0,TIME_PERIODIC);<br />
					return TRUE;<br />
				case IDHIDE:<br />
					ShowWindow(hDialog,SW_HIDE);<br />
					Shell_NotifyIcon(NIM_ADD,&nidata);<br />
					return TRUE;<br />
				case IDEXIT:<br />
					PostQuitMessage(0);<br />
					return TRUE;<br />
				case IDSTOP:<br />
					timeKillEvent(timerid);<br />
					return TRUE;<br />
				case IDSTART:<br />
					timerid=timeSetEvent(current->delay,current->delay,TimeProc,0,TIME_PERIODIC);<br />
					return TRUE;<br />
				case IDCLEAR:<br />
					timeKillEvent(timerid);<br />
					{<br />
						char *buf;<br />
						buf=calloc(64,1);<br />
						refresh(buf);<br />
						free(buf);<br />
					}<br />
					return TRUE;<br />
				default:<br />
					return FALSE;<br />
			}<br />
		case WM_DESTROY:<br />
		case WM_CLOSE:<br />
			PostQuitMessage(0);<br />
    }<br />
    return FALSE;<br />
}<br />


Thank you the help

Thanh
GeneralRe: auto start program when load [modified] Pin
Marek Grzenkowicz27-Dec-03 22:56
Marek Grzenkowicz27-Dec-03 22:56 
GeneralRe: auto start program when load Pin
Vietnight28-Dec-03 7:05
Vietnight28-Dec-03 7:05 
GeneralRe: auto start program when load Pin
valikac27-Dec-03 5:45
valikac27-Dec-03 5:45 
GeneralRe: auto start program when load Pin
Vietnight27-Dec-03 6:39
Vietnight27-Dec-03 6:39 
GeneralProject always out of date ?! Pin
ldaoust26-Dec-03 10:30
ldaoust26-Dec-03 10:30 
GeneralRe: Project always out of date ?! Pin
ldaoust26-Dec-03 11:15
ldaoust26-Dec-03 11:15 

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.