|
Cool Guide!!!!
very good has everything
thanks for showing me the way
|
|
|
|
|
Mr. Dunn already pointed you to his FAQ which is probably the best resource available on CP but just in case, here are some ways you can get it done. NOTE: These will only work if the BSTR does not contain embedded NULL's as would occur in a BYTE array. If you are sure you are dealing with null terminated strings in the BSTR like when using MSXML, these will get you by.
// Using the CString constructor
_bstr_t bstrTemp("This is a test\n");
CString sTemp1((BSTR)bstrTemp);
TRACE(sTemp1);
// For when you don't have the luxury of using the constructor
CString sTemp2;
sTemp2.Format("%s",(LPCTSTR)bstrTemp);
TRACE(sTemp2);
|
|
|
|
|
Thanks bob for the help and the info but u are right
that article Dunn gave me is more than helpful
Thanks again appreciate the help
|
|
|
|
|
antonaras wrote: Hi again guys
a simple guestion how can i convert(assighn) a variable of type _bstr_t to string
_bstr_t hi("alok");
std::string str((LPCTSTR)hi) ;
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
say I have
class A
{
int a;
int b;
A(int c, int d) { a=c; b=d;}
}
and <A a=2 b=3></A> tag in Xml
how can i simply parse the xml file that i get A(2,3) in my C++ program
which technology should i use? ms xml? is it good? can someone show a short example of using ms xml to the example above?
J
-- modified at 10:25 Saturday 3rd June, 2006
|
|
|
|
|
|
|
|
Hi
I am new to vc++. I want to know what is "resources" in vc++ context.
how can this be used with vc++ program I create.
waiting for reply
|
|
|
|
|
You know I am not sure, there is so many meanings that it boarders on the ridiculous.
1) Windows programming: memory, icons, bitmap, dialog boxes, I/0, and strings.
2) C++: memory, I/O.
Oh, 1 applies to Mac programming too.
A resource is anything that you must draw on to accomplish the goal, including dependency on outside resources such as the Web.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
In a Visual C++ program, visual elements in your program (menus, dialog boxes, bitmaps, icons, and some strings) are defined in a source file with the extension .RC, which is referred to as a resource script. This file is compiled and 'linked' into your program. The term "resources" refers to these visual elements.
Software Zen: delete this;
|
|
|
|
|
the DC functions: Ellipse, Rectangle ... are filled by current brush.
I hope they are draw only without been filled.
any idea to do this?
|
|
|
|
|
You can use from Graphic like this
<br />
SolidBrush Brush(Color(255,0,120,120));<br />
Pen pen(&Brush, 4.0f);<br />
Graphics graphics(GetDC()->m_hDC) ;<br />
graphics.DrawEllipse(&pen,100,100,200,200);<br />
whitesky
|
|
|
|
|
|
Can you be more specific
and you need to using namespace Gdiplus;
whitesky
|
|
|
|
|
|
I have vs2003 and you can see MSDN for Graphics
whitesky
|
|
|
|
|
I seen the reference to ‘graphics’ and understand we are at a crossroads between systems of programming for windows. That being said ignore it and select a NULL brush before drawing the ellipse.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Hi John R. Shaw,
you said that create null brush before draw ellipse in CDC
but in graphics if you run this code you see a ellipse with one stroke
whitesky
|
|
|
|
|
we target to win95/98 and use VC6.
NULL brush, I tried it before in this way:
CBrush*pb=0;
dc.SelectObject(pb);
but the select is ignored (previous brush is still working).
any comment about null brush?
|
|
|
|
|
That's not what he meant by null brush.
dc.SelectObject(GetStockObject(NULL_BRUSH));
|
|
|
|
|
Thanks hfry, I have been away and you and others pointed out what I was saying.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
|
how to select a null brush?
|
|
|
|
|
<br />
CPaintDC dc(this);
dc.SelectObject((HBRUSH)GetStockObject(NULL_BRUSH));<br />
dc.Ellipse(100,100,200,200);<br />
<br />
whitesky
|
|
|
|