Click here to Skip to main content
16,007,443 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: message encapsulation Pin
detect29-Jul-02 4:35
detect29-Jul-02 4:35 
QuestionHow To Write Code To Change The Printer Resolution Pin
ooosawaddee327-Jul-02 7:43
ooosawaddee327-Jul-02 7:43 
AnswerRe: How To Write Code To Change The Printer Resolution Pin
l a u r e n28-Jul-02 0:35
l a u r e n28-Jul-02 0:35 
GeneralRe: How To Write Code To Change The Printer Resolution Pin
Branislav28-Jul-02 4:38
Branislav28-Jul-02 4:38 
Generalindex not within bounds? Help !! Pin
nss27-Jul-02 7:18
nss27-Jul-02 7:18 
GeneralRe: index not within bounds? Help !! Pin
nss27-Jul-02 8:01
nss27-Jul-02 8:01 
GeneralRe: index not within bounds? Help !! Pin
Ravi Bhavnani27-Jul-02 8:02
professionalRavi Bhavnani27-Jul-02 8:02 
GeneralRe: index not within bounds? Help !! Pin
nss27-Jul-02 8:40
nss27-Jul-02 8:40 
Wonder why the loop got mangled in the mail

 DWORD __stdcall MEditStreamInCallback(DWORD dwCookie, LPBYTE pbBuff, LONG cb, LONG *pcb)<br />
{<br />
	CString *psBuffer = (CString *)dwCookie;<br />
	TRACE(*psBuffer);<br />
TRACE("cb is %d",cb);  //debugger says its 4092<br />
<br />
TRACE("getlength is %d",psBuffer->GetLength()); debugger says its 9, correct<br />
<br />
<br />
<br />
	//if (cb < psBuffer->GetLength()) cb = psBuffer->GetLength(); //never gets done cause cb is so big!<br />
<br />
//MSDN says loop until length-1, so I forcibly set<br />
<br />
cb =9;<br />
<br />
	TRACE("length is %d",cb);<br />
<br />
	for (int i=0;i<cb;i++)<br />
<br />
	<br />
	{<br />
<br />
			TRACE("index i is %d", i);<br />
		*(pbBuff+i) = psBuffer->GetAt(i);<br />
	}<br />
<br />
	*pcb = cb;  \\this looks weird. cb never changes....not that I can see<br />
<br />
	*psBuffer = psBuffer->Mid(cb);<br />
<br />
	return 0;<br />
}



I'm trying your idea now...
Thanks.Smile | :)
Generalyikes! It did it again!! Pin
nss27-Jul-02 8:42
nss27-Jul-02 8:42 
GeneralRe: yikes! It did it again!! Pin
nss27-Jul-02 8:43
nss27-Jul-02 8:43 
GeneralRe: yikes! It did it again!! Pin
Ravi Bhavnani27-Jul-02 8:45
professionalRavi Bhavnani27-Jul-02 8:45 
GeneralRe: yikes! It did it again!! Pin
Ravi Bhavnani27-Jul-02 8:44
professionalRavi Bhavnani27-Jul-02 8:44 
General\n in TRACE() Pin
Ravi Bhavnani27-Jul-02 8:58
professionalRavi Bhavnani27-Jul-02 8:58 
GeneralRe: index not within bounds? Help !! Pin
Bill S27-Jul-02 8:47
professionalBill S27-Jul-02 8:47 
GeneralRe: index not within bounds? Help !! Pin
nss28-Jul-02 6:54
nss28-Jul-02 6:54 
Generaltrying out your idea Pin
nss28-Jul-02 7:34
nss28-Jul-02 7:34 
GeneralRe: index not within bounds? Help !! Pin
Anonymous28-Jul-02 4:49
Anonymous28-Jul-02 4:49 
GeneralPort Numbers Pin
Waleed Eissa27-Jul-02 6:31
Waleed Eissa27-Jul-02 6:31 
GeneralRe: Port Numbers Pin
Anders Molin27-Jul-02 7:42
professionalAnders Molin27-Jul-02 7:42 
QuestionTimer Function Prototype ? Pin
hongheo7627-Jul-02 5:51
hongheo7627-Jul-02 5:51 
AnswerRe: Timer Function Prototype ? Pin
Michael Dunn27-Jul-02 6:09
sitebuilderMichael Dunn27-Jul-02 6:09 
AnswerRe: Timer Function Prototype ? Pin
includeh1027-Jul-02 7:10
includeh1027-Jul-02 7:10 
AnswerRe: Timer Function Prototype ? Pin
Branislav28-Jul-02 5:21
Branislav28-Jul-02 5:21 
GeneralChanging a static picture Pin
Anonymous27-Jul-02 5:04
Anonymous27-Jul-02 5:04 
GeneralRe: Changing a static picture Pin
Michael Dunn27-Jul-02 6:26
sitebuilderMichael Dunn27-Jul-02 6:26 

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.