|
|
it is SHBrowseOfFolder(), i want GetOpenFileName(), to select file, not directory
|
|
|
|
|
GetOpenFileName() lets you set a 'hook' function. Inside that hook function, you would need to intercept and prevent navigation outside the desired directory structure.
Software Zen: delete this;
|
|
|
|
|
hi all i need to write a routine where i need to know the speed of the internet at any given time. i.,e the actual speed the user is getting from his provider, i have referred the article,"traffic watcher"from codeproject.com but i cudnot run it .
thanks in advance
regards
sudhir m
|
|
|
|
|
sudhir.marni wrote: i cudnot run it .
Why not? What happened?
|
|
|
|
|
Hey Friends
I am writing a program in which i have IP address but i need to know Server Name.
Is there any way in c++ to acheive that?
Regards
|
|
|
|
|
Hey Vikrant,
try gethostbyaddr
MSDN gethostbyaddr[^]
Jubjub
"If you're too careful, your whole life can become a f---in' grind." - Mike McD ( Rounders)
|
|
|
|
|
I need to send an XML document to a web service running Apache Axis. I have been attempting to POST it using XMLHTTP:
HRESULT hr = CoInitialize(NULL);<br />
...<br />
IServerXMLHTTPRequestPtr pXMLHTTPReq = NULL;<br />
hr = pXMLHTTPReq.CreateInstance(__uuidof(ServerXMLHTTP40));<br />
hr = pXMLHTTPReq->open( _bstr_t("POST"), bstrURL, _variant_t(VARIANT_FALSE) );<br />
CComBSTR xmlString;<br />
m_spXMLDoc->get_xml( &xmlString );
hr = pXMLHTTPReq->setRequestHeader(_bstr_t("Content-Type"), _bstr_t("text/xml; charset=utf-8"));<br />
hr = pXMLHTTPReq->setRequestHeader(_bstr_t("SOAPAction"), _bstr_t(""));<br />
hr = pXMLHTTPReq->send( (_variant_t)xmlString );<br />
long status = pXMLHTTPReq->Getstatus();<br />
_bstr_t bstrResponse = pXMLHTTPReq->GetresponseText();<br />
...
Before I added the line:
hr = pXMLHTTPReq->setRequestHeader(_bstr_t("SOAPAction"), _bstr_t(""));
I was connecting but getting a No Soap Action error. But having added ths line when execution tries to run at that line it raises an exception. I would appreciate any advice anyone can give me on how I can POSt xml through to an Apache Axis web service successfully.
|
|
|
|
|
Hi,
I want to change the font of context menu items and it's sub menu items.
How to do it?Should I use owner drawn context menu?If so then can I have any snippet of code for it?
With Regards
Neeraj Sinha
|
|
|
|
|
Neeraj Sinha wrote: How to do it?Should I use owner drawn context menu?
That should work!
See the section "Creating Owner-Drawn Menu Items" here: Using Menus[^]
For possible code samples, maybe CodeProject articles like
How to create owner drawn menus - Step by Step[^]
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
|
How can I retrieve text from a static text control
that has wrapped the text , I want to get the
text with the line breaks that the control added ,
or I would like to know the number of lines
the wrapped text is printed on . I would also
want to know what text is not displayed because
it has "overflowed" off the viewing area .
Thanks for reading this .
Davey
|
|
|
|
|
I don't see any way to get this info from a static control. The wrapping is probably done
at the time the text is rendered.
You could parse the text yourself and calculate wrap positions using GetTextExtentExPoint()
and render the text youself.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
There are articles on this site that illustrate this technique.
|
|
|
|
|
The DrawText [^] GDI function might be of some help here.
Software Zen: delete this;
|
|
|
|
|
Can any body help me how to store dynamic changes in grammar to cause permanent changes to beutilized every time in future evevn if the application is restarted. I mean how to save the changes dynamically made into rammar.
Regards
Zia
|
|
|
|
|
Hi,
I have to use CTcxMsgBox (http://www.codeproject.com/dialog/tcxmsgbox.asp[^])class in my project with customized background color for MessageBox dialog and buttons on it.
I need to show the message box and buttons in a different color then default color. Is it possible? if yes then plz give some hints.
Best regards,
Cyber Friend.
-- modified at 10:39 Saturday 12th May, 2007
|
|
|
|
|
Does it support with this class if yes you can,whats problem now?
|
|
|
|
|
The same methods you'd use to do this in any window should apply...
For the window itself, you can specify a brush when registering the window class or handle the
WM_ERASEBKGND message and draw the background yourself. To do this, derive a class from the
window class in the article and either register a custom class for the window or add a
WM_ERASEBKGND handler.
For buttons, you'll need to owner-draw them.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hi,
CTcxMsgBox class is derived from CDialog so there is no WM_ERASEBKGND messsage to add the message handler.How to add a different background color for CDialog based class? There is no dialog resource associated for CTcxMsgBox class and it produces the MessageBox using the function
CDialog::InitModalIndirect( (LPCDLGTEMPLATE)_dlgData, m_pParentWnd );
When I put the function
SetDialogBkColor(RGB(206,207,206));
in the CWinApp derived application class's InitInstance() then MessageBox is being shown in new background color but buttons and CRichEditCtrl (which is for text message) are not shown in that color.
Now How to draw the Buttons in different background color?
best regards,
Cyber Friend
|
|
|
|
|
how to find mouse is over on a particular control.
|
|
|
|
|
CPoint point;
GetCursorPos(&point);
CPoint clientPoint = point;
ScreenToClient(&clientPoint);
GetClientRect(&rectClient);
if (rectClient.PtInRect(clientPoint))
{
...
}
|
|
|
|
|
May you can use TrackMouseEvent function and capturing WM_MOUSEHOVER (&WM_MOUSELEAVE).
If u can Dream... U can do it
|
|
|
|
|
Apparently that wasn't an acceptable solution: Click[^]
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Hello !
I'm trying to have a CListCtrl having the same behwvior as in the task manager (when you list the active processes). I set the view to report (to have the different columns). But currently, I can only select a line by clicking on the items in the first column. I would like to be able to click anywhere in the list control and having the line under my cursor to be selected.
Any idea how I can do that ?
Thanks
|
|
|
|