Click here to Skip to main content
16,012,025 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: about font in a dialog Pin
Anthony_Yio24-Jun-04 20:15
Anthony_Yio24-Jun-04 20:15 
Questionhow to realize after my login dialog end and follow a image coming out for a while? Pin
vividtang24-Jun-04 12:31
vividtang24-Jun-04 12:31 
AnswerRe: how to realize after my login dialog end and follow a image coming out for a while? Pin
Anthony_Yio24-Jun-04 20:22
Anthony_Yio24-Jun-04 20:22 
Questionif i do not write special class to realize hyperlink,is there a more simpler way to solve it? Pin
vividtang24-Jun-04 12:27
vividtang24-Jun-04 12:27 
AnswerRe: if i do not write special class to realize hyperlink,is there a more simpler way to solve it? Pin
Michael Dunn24-Jun-04 12:36
sitebuilderMichael Dunn24-Jun-04 12:36 
Questionin a function can i use ExecuteSQL using the same database connection more than two times not using CRecordset object? Pin
vividtang24-Jun-04 12:23
vividtang24-Jun-04 12:23 
AnswerRe: in a function can i use ExecuteSQL using the same database connection more than two times not using CRecordset object? Pin
Antony M Kancidrowski25-Jun-04 0:11
Antony M Kancidrowski25-Jun-04 0:11 
QuestionHow to idle the program for seconds? Pin
pnpfriend24-Jun-04 11:13
pnpfriend24-Jun-04 11:13 
Hello All, I have client and server programs. They used NamedPipe to communicate.
Here little bit about what each program does.
Server:
- has 2 buttons, print and stop
- Once the print button get pressed, create the thread and call the thread function.
here the thread function,
<br />
UINT PrintingThreadFunction(LPVOID lParam)<br />
{  <br />
CServerDlg *s = ((CServerDlg *)lParam);<br />
 s->m_smain.OpenNewPipe(); <br />
 while(!stopprinting)<br />
  {	 <br />
	  s->m_smain.ClientPrinting();  // printing all checked files.    	  	  <br />
    if(stopprinting == (int)YES)<br />
	{<br />
		s->m_smain.CloseThePipe(); <br />
		break;<br />
	}<br />
  }   <br />
  stopprinting = (int)NO; // to stop printing...  <br />
  return (0);<br />
}<br />

The ClientPrinting() calls ConnectNamedPipe() which waits for the client to connect and then once the client connect to the pipe, it returns.

Client:
Client gets the file name from database and print it out. Then send the file name to Server using the same pipe.

Server has no problem Client's getting connected and sending a printed file name for 9 times. But at 10th time, Server get error message at ConnectNamePipe() which is
Unhandled exception at 0x0043e4cb in Server.exe: 0xC0000005: Access violation reading location 0x000000e4.

How can I eliminate this error?
I am thinking of using PostMessage(). But how the program also listen to the user click on Stop button?

Is stopping what the programs is doing for 10 seconds so the user can click on the quit button will help?


Thank you
AnswerRe: How to idle the program for seconds? Pin
Anthony_Yio24-Jun-04 21:05
Anthony_Yio24-Jun-04 21:05 
GeneralBacklight Control Interface Pin
Blake Miller24-Jun-04 11:01
Blake Miller24-Jun-04 11:01 
GeneralExponents Pin
RedDragon2k24-Jun-04 10:51
RedDragon2k24-Jun-04 10:51 
GeneralRe: Exponents Pin
User 665824-Jun-04 11:07
User 665824-Jun-04 11:07 
GeneralRe: Exponents Pin
RedDragon2k24-Jun-04 11:24
RedDragon2k24-Jun-04 11:24 
GeneralRe: Exponents Pin
User 665824-Jun-04 11:37
User 665824-Jun-04 11:37 
GeneralRe: Exponents Pin
Jeremy Falcon24-Jun-04 11:39
professionalJeremy Falcon24-Jun-04 11:39 
GeneralRe: Exponents Pin
gamitech24-Jun-04 12:49
gamitech24-Jun-04 12:49 
GeneralUsers running network app!!! Pin
24-Jun-04 10:47
suss24-Jun-04 10:47 
GeneralRe: Users running network app!!! Pin
David Crow24-Jun-04 10:51
David Crow24-Jun-04 10:51 
QuestionLoadLibrary via HTTP? Pin
that_24-Jun-04 10:02
that_24-Jun-04 10:02 
Questionwhat is the difference between sscanf and atof in cast cstring into float? Pin
vividtang24-Jun-04 9:29
vividtang24-Jun-04 9:29 
AnswerRe: what is the difference between sscanf and atof in cast cstring into float? Pin
David Crow24-Jun-04 10:19
David Crow24-Jun-04 10:19 
AnswerRe: what is the difference between sscanf and atof in cast cstring into float? Pin
Steve Mayfield24-Jun-04 10:40
Steve Mayfield24-Jun-04 10:40 
Questionabout dialog color? Pin
vividtang24-Jun-04 9:19
vividtang24-Jun-04 9:19 
AnswerRe: about dialog color? Pin
Arman S.26-Apr-07 2:45
Arman S.26-Apr-07 2:45 
Questionabout dialog color? Pin
vividtang24-Jun-04 9:10
vividtang24-Jun-04 9:10 

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.