|
Something like this :-
<br />
CInternetSession conn;<br />
CHttpConnection *phttpconn;<br />
<br />
phttpconn= conn.GetHttpConnection(m_server,<br />
(INTERNET_PORT )80); <br />
<br />
CHttpFile* phttpfile = phttpconn->OpenRequest("GET",<br />
cmd); <br />
<br />
BOOL b1=phttpfile->SendRequest();<br />
<br />
<br />
CFile f2(s,CFile::OpenFlags::modeCreate | CFile::OpenFlags::modeWrite); <br />
while(true)<br />
{<br />
n=phttpfile->Read(buff2,127);<br />
buff2[n]=0;<br />
f2.Write(buff2,n); <br />
if(n<127)<br />
break;<br />
}<br />
f2.Close();<br />
<br />
Regards,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Nishie, you are showing them how to write html filters... And later you'll complain...
How low can you go ? (MS retrofuck)
|
|
|
|
|
|
Hello,
I have a question regarding Replaying of events captured from a CHTMLView . I want to know if there is any way by which i can replay an event (like a mouseclick on a button or on a href link in a webpage) captured from a webcontrol in a application. If so i would appreciate your help.
I have been able to capture the event but now i dont know how to replay it back. Its an MFC based application with view class derived from CHTMLView.
Prasad
Thanks again.
|
|
|
|
|
Have a look at the
WH_JOURNALPLAYBACK and
WH_JOURNALRECORD hooks available through the SetWindowsHookEx function.
Dave.
|
|
|
|
|
How can i get a filename from url that is not explicitly include filename.
E.g from http://www.microsoft.com/anypage/anypage.asp?hg=987&k=9792
I would like to get filename like abc.exe.
Thanks.
itblue
|
|
|
|
|
One solution is to do a search for *.exe on data the server sends back.
Kuphryn
|
|
|
|
|
It is difficult to get a filename when folder name or file extension is not known.
Is there another solution?
thanks.
|
|
|
|
|
Not sure what you mean. You want to get a filename from a URL that doesn't contain a filename?
--Mike--
"I'd rather you just give me a fish today, because even if you teach me how to fish, I won't do it. I'm lazy." -- Nish
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Check out the UrlGetPart API. I'm not sure it does what you want but you might try to use it and/or PathFindFileName. Then again, if you are using ATL7 that ships with Visual Studio.NET you have the CUrl class that almost certainly can do what you want.
Hope this helps.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
i have both Lparam and Param of a perticuler message
that might be keborad message i also have a hwnd of an edit box.
how to get a key message (that is in lparam and param)into an edit box using postmessage method?
r00d0034@yahoo.com
|
|
|
|
|
Hi I am using the legacy concept to copy stuff into the clipboard and it works fine. The problem is that when I want to copy for example 5 line of text, I just concatenate them together with '\n' between them into the buffer of the clipboard.
Sounds nice, yes, and it also works for pasting into Word for example, but when I try to paste into Notepad, it comes as one long line, why doesn't it recognize the '\n' ?
Any idea or suggestion ?
PS
I tried adding 0xa and 0xc between and no help
|
|
|
|
|
You Notepad you will need CR LF. ie. 0x0xd 0x0a or \r\n
Neville Franks, Author of ED for Windows. www.getsoft.com
|
|
|
|
|
i have an edit box HWND.
i want to send a message of a keydown for example U
and u (key)is typed into edit box ?
can any body tell using postmessage example with its correct parameters?
r00d0034@yahoo.com
|
|
|
|
|
The messages sent are WM_KEYDOWN, WM_CHAR and WM_KEYUP. I don't know if sending WM_KEYDOWN causes WM_CHAR to occur, I believe it does. You should look up those messages in the MSDN and try to create an LPARAM and WPARAM that match the values in the documentation, and see what happens.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
lets i have both lparam and param and hwnd of edit box then how to send message?
can u tell the correct parameters of postmessage ?
r00d0034@yahoo.com
|
|
|
|
|
I'm confused - do you realise that msdn.microsoft.com has the answer ? ::SendMessage ( from memory ) takes the HWND, the message, the LPARAM and the WPARAM, so it's
::SendMessage(MyHWND, WM_KEYDOWN, MyLParam, MyWParam);\
I presume PostMessage takes the same.
We had a big discussion in the lounge the other day about people who seem unwilling to do any research for themselves. I'd recommend in future you look up some online resources before asking basic questions. Both I and many other people here are always happy to help, but might I suggest it would be good for your personal growth to try to find out for yourself before asking questions that would take 30 seconds on the MSDN site to answer ?
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
thanks for advise.
but i have seen that thing many time.i am developing project.
first of all i recorded messages of keboard and mouse and after recording i was replaying the same events.i have no problem by posting mouse messages but i have problem with keboard messages.
i have both lparam and wparam but i have to store it first for that purpose i typecast it into int32 lparam and int32 wparam that is why E_to_Match->lparam is int32.
In if condition mouse messages work correctely where E_to_Match->message is also int32 but let me tell you how i get message in it
LPEVENTMSG lpEvent= (LPEVENTMSG)lParam;
E_to_Match->message=(int32)lpEvent->message;
in the same way i have stroed lparam and wparam.
plz see that code.
><
if(E_to_Match->message==WM_LBUTTONUP)
{
::SetCursorPos(fp.x,fp.y);
PostMessage(h,WM_LBUTTONDOWN,0,0);
PostMessage(h,WM_LBUTTONDOWN,0,0);
::Sleep(500);
PostMessage(h,E_to_Match->message,0,0);
}else
{
::Sleep(2000);
PostMessage(h,E_to_Match->message,(WPARAM)E_to_Match->wParam,(LPARAM)E_to_Match->lparam);
}
else condition dont work when that postmessage line executed i dont know why but one thing i know that the following line display 777 into that editbox (of hwnd h).
thats mean mine hwnd is correct.
PostMessage(h,E_to_Match->message,103,(LPARAM)E_to_Match->lParam);
now plz tell i will be very thankful i am also trying my best effort too.
r00d0034@yahoo.com
|
|
|
|
|
I have two dialog bars in a CFrameWnd derived class.
Each of the dialogbars have child controls. Is it possible to set a taborder through both the dialog bars? ie, tab on last of dlg1 goes to first of dlg2; and tab on last of dlg2 goes to first of dlg1.
modified 29-Aug-18 21:01pm.
|
|
|
|
|
Try to override PreTranslateMessage and do the right thing when VK_TAB is pressed and focus in on last control in dialog bar.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
I have a PropertySheet an some propertypages, the problem is that when i click in one of the propertypages (and only this one , lets call it "bad one"), it disappears.
No Error , no crash,nothing ,it just disappears.
This is only in the win98, it the win200 and winXP it runs ok.
When the propertysheet is created , all the propertypages are created and including the "bad one" , if even runs the "bad one::contructor".
But when I click on it , it does not run the "bad one::OnInitDialog".
one more strange thing is that it runs the destructor.
Any one of you had a problem like this??
Any hints?
_______________________________
Portal Imoguia Software Imoguia
MSN:maxsnts@hotmail.com
|
|
|
|
|
It may be a control which of non-registered Windows' class. Make a backup copy of your property page and remove controls one by one. Start with nonstandard ones, if they are there.
Tomasz Sowinski -- http://www.shooltz.com
*** Purgamentum init, exit purgamentum ***
|
|
|
|
|
thanks,
it was a richedit control. i have updated the dll in the Win98 and it works
_______________________________
Portal Imoguia Software Imoguia
MSN:maxsnts@hotmail.com
|
|
|
|
|
I've spent most of today trying to get double buffering working in a dialog box.
I know the theory behind it, create an area in memory - draw to that then copy that to the display....
I've tried using other peoples code which all seems to be aimed at the OnDraw() handler with its CDC object, but in OnPaint() you've got to create your own CDC.
This is the core of the code from my OnPaint handler, there's an OnTimer event that Invalidates() the display very quickly so it's flickering like mad.
AFAIKTell it's right, I create a compatible CDC, assign a bitmap to it, draw on that then BitBlt it to the main CPaintDC.
Can anyone please help me out, I'm nearly in tears here. :-/
// Get the size of the client rectangle.
CRect cr;
GetClientRect(&cr);
int m_nDisplayWidth = cr.Width();
int m_nDisplayHeight = cr.Height();
CPaintDC dc(this); // device context for painting
CBitmap bmp, *poldbmp;
CDC memdc;
int bitplanes = dc.GetDeviceCaps(PLANES);
int bitspixel = dc.GetDeviceCaps(BITSPIXEL);
bmp.CreateBitmap(m_nDisplayWidth, m_nDisplayHeight, bitplanes, bitspixel, NULL);
memdc.CreateCompatibleDC( &dc );
poldbmp = memdc.SelectObject( &bmp);
COLORREF col;
int sp;
CPoint s;
for(int i = 0; i < m_nNumStars; i++){
sp = 255;
col = RGB(sp,sp,sp);
s.x = rand() % m_nDisplayWidth;
s.y = rand() % m_nDisplayHeight;
memdc.SetPixel(s, col );
}
dc.BitBlt(0,0, m_nDisplayWidth, m_nDisplayHeight, &memdc, 0,0, SRCCOPY);
memdc.SelectObject(poldbmp);
|
|
|
|
|
David_Jenkins wrote:
bmp.CreateBitmap(m_nDisplayWidth, m_nDisplayHeight, bitplanes, bitspixel, NULL);
try CreateCompatibleBitmap. otherwise, the code looks ok.
-c
Alcohol is the anesthesia by which we endure the operation of life.
-- George Bernard Shaw
|
|
|
|