|
One is a new language that is based strongly on C++, VB and Java, the other is a common contraction where Visual C++ is meant. Visual C++ is an IDE from Microsoft for programming in the C++ language.
Why do you ask ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
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
|
|
|
|
|
Christian Graus wrote:
Why do you ask ?
It was on his test.
|
|
|
|
|
I am trying to get a certain date variable to be converted to a text so I can then display it in the window of my windows program. Any suggestions will be accepted.
Thanks
Elvis8900 forever
|
|
|
|
|
ostringstream will do it, and I have an article on CP that explains how.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
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
|
|
|
|
|
|
LOL
1. Get an account here so that people will take such a question remotely seriously.
2. If you don't know what it is, why do you want to learn it ?
3. As Chris said above, there is no such thing as Visual C. You probably mean Visual C++, and you probably want to learn C++. If you don't know what it is, you'd be better off with VB, where you can't hurt yourself.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
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
|
|
|
|
|
Christian Graus wrote:
you'd be better off with VB
Headlines : CP Times
--------------------
Ruthless Christian attacks VB world again
Junkie
"* Code till death *"
http://www.askarya.com
|
|
|
|
|
Christian Graus wrote:
you'd be better off with VB, where you can't hurt yourself
He/she may not hurt him/herself but is quite likely to hurt others. Surely it's unwise to recommend VB even in such a circumstance as this??
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
I couldn't think of anything worse. Logo, maybe ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
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
|
|
|
|
|
I want to learn how to program games but I don't know where to start. Should I learn OpenGL or DirectX, and are there any game programming website equivilants to CP? Any good books to get me started?
There's always one more bug.
|
|
|
|
|
The nehe.gamedev.net site is the best for OpenGL, there IS a game programming site, but the name escapes me. Before you start, how much C++ do you know ? Don't try to learn C++ and game programming at the same time, that would be worse than learning C++ and Windows API or MFC at the same time.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
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
|
|
|
|
|
There are a number of gamedevelopment sites including www.gamedev.net and flipcode.com. There is a game development search engine at http://www.gdse.com/.
As far as what you should learn depends on what you want to do. OpenGL is a good graphics library that is portable. Many companies use OpenGL for things like flight simulators and games like Quake use OpenGL.
DirectX is a library that is designed specifically for machines that run windows. DirectX is a more generic multimedia development library that will allow you to access the systems video, sound, and input devices.
There are a lot of books about game development now, how ever I would recommend that you learn C++ first. You may find it quite confusing to extract the game programming fundamentals if you dont have a firm grasp of C++.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
i am using function GetGUIThreadInfo function to get the active window hwnd it works to get active hwnd but it dont work when i try to use it in multithreaded program
(csharp).
can any body tell why and how to use it in multithreaded program?
r00d0034@yahoo.com
|
|
|
|
|
ummmmm
maybe try the c# forum?
just a thought
"even if my world is weird it's my world" biz stuff about me
|
|
|
|
|
i dont have the rightes to see service on other computer of my network.
i have a simple network of two computer and the operating
system is XP on both computers.
i am able to share dives,internet fasilities on other network computer.
but problem is that
i dont have the rightes to see service on other computer of my network.
how to get rightes to see services?
r00d0034@yahoo.com
|
|
|
|
|
Eureka! After some input from TCP folks, I finally arrived at the solution to getting, and modifying a table inserted into an CHtmlEditView:
STEP 1:
Get the DHTML document to a IDISPATCH
STEP 2:
Query interface for IID_IHTMLDocument2
STEP 3:
get all elements -> IHTMLDocument2::get_all
into IHTMLElementCollection
STEP 4:
Get the item (in this case a table) based on
the table id (
_variant_t varID = _bstr_t(L"view");
_variant_t varIdx(0);
IDispatch *pDocDisp=NULL;
pCollect->item(varID,varIdx, &pDocDisp );
STEP 5:
Now query the table item
<br />
pDocDisp->QueryInterface(IID_IHTMLTable, (void**)&pTable);<br />
STEP 6:
Now do an insertrow with a IDispatch pointer
and -1 for append to end of table
Then query the IHTMLTableRow interface
<br />
IDispatch *pdispRow=NULL;<br />
IHTMLTableRow *pRow=NULL;<br />
pTable->insertRow ( -1, &pdispRow );<br />
pdispRow->QueryInterface(IID_IHTMLTableRow, (void**)&pRow);<br />
STEP 7:
Next do an IHTMLTableRow::insertCell
with an IDispatch pointer
Then query the IHTMLElement interface to get
pointer tp IHTMLElement
insert a space into the cell
do this for the # of columns you have. in my
example below i am inserting a row in a 3 column
table.
<br />
IDispatch *pDispCell=NULL;<br />
IHTMLElement *pCell=NULL;<br />
pRow->insertCell( -1, &pDispCell ); <br />
pDispCell->QueryInterface(IID_IHTMLElement, (void**)&pCell); <br />
pCell->put_innerText(L" ");<br />
I'm sure there's a better way - this solution isn't
elegant but it works!
[ entire code ]
<br />
IHTMLTable* pTable = NULL;<br />
<br />
IHTMLElementCollection *pCollect=NULL;<br />
<br />
_variant_t varID = _bstr_t(L"view"); <br />
_variant_t varIdx(0);<br />
BSTR tag = SysAllocString(L"0");<br />
long cols = 1;<br />
IHTMLDocument2 *pDoc; <br />
IDispatch * pDocDisp = NULL; <br />
IHTMLTableCaption *pCaption=NULL;<br />
pDocDisp = GetHtmlDocument();<br />
HRESULT h = pDocDisp->QueryInterface( IID_IHTMLDocument2, (void**)&pDoc ); <br />
<br />
pDoc->get_all(&pCollect);<br />
<br />
pCollect->item(varID,varIdx, &pDocDisp );<br />
pDocDisp->QueryInterface(IID_IHTMLTable, (void**)&pTable);<br />
<br />
IDispatch *pdispRow=NULL;<br />
IHTMLTableRow *pRow=NULL;<br />
pTable->insertRow ( -1, &pdispRow );<br />
pdispRow->QueryInterface(IID_IHTMLTableRow, (void**)&pRow);<br />
pRow->put_align(L"Center");<br />
<br />
IDispatch *pDispCell=NULL;<br />
IHTMLElement *pCell=NULL;<br />
pRow->insertCell( -1, &pDispCell ); <br />
pDispCell->QueryInterface(IID_IHTMLElement, (void**)&pCell); <br />
pCell->put_innerText(L" ");<br />
pRow->insertCell( -1, &pDispCell ); <br />
pDispCell->QueryInterface(IID_IHTMLElement, (void**)&pCell);<br />
pCell->put_innerText(L" ");<br />
pRow->insertCell( -1, &pDispCell );<br />
pDispCell->QueryInterface(IID_IHTMLElement, (void**)&pCell);<br />
pCell->put_innerText(L" "); <br />
pDispCell->Release();<br />
pCell->Release();<br />
pdispRow->Release();<br />
pRow->Release();<br />
pTable->refresh();<br />
pCollect->Release();<br />
pTable->Release();<br />
pDoc->Release();<br />
pDocDisp->Release(); <br />
Hope this helps.
Art
|
|
|
|
|
Some notes.
1. For some reason two piece BSTR creation & allocation is advised.
2. If your QueryInterfaces ever return "FAILED" you could have a nasty crash on your next call I guess.
So you should be testing them with your HRESULT
3. When doing this stuff I think it makes sense to add a check that the document is truly loaded !! Ouch !!
PS: I have never used CHTMLEditView So I'm just assuming it's the same as the good ol mshtml.dll
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|
|
Colin Davies wrote:
PS: I have never used CHTMLEditView So I'm just assuming it's the same as the good ol mshtml.dll
The insertion code has nothing to do with the CHtmlEditView. It's just the author of the posts who managed to put a reference to this class in the post header whenever he posted !
CHtmlEditView is just a MFC CHtmlView-derived class (a simple web browser control wrapper), using one of the latest methods exposed by IE5.5+ (which were earlier available as a separate SDK (the DHTML edit component SDK, now legacy)).
mshtml.dll is the DOM.
How low can you go ? (MS rant)
|
|
|
|
|
That's pretty much how you have to do it, although you can make your code way more readable and stable by using either CComPtr<> or #import 'ing mshtml.tlb to get the HTML DOM wrapper classes.
Check out An Advanced Windows Hotfix Manager[^], one of the things I do there is generate a report in a <table> using the DOM interfaces.
--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
|
|
|
|
|
Does anyone know how to capture IHTMLElementEvent events
(onclick) for CHtmlEditView? I've tried ON_EVENT and ON_EVENT_RELFECT - doesn't work. Need to capture events
for DISPID_HTMLELEMENTEVENTS2_ONCLICK etc.
Must I create a CCmdTarget sub? What and How do i do it.
I'm desparately trying to complete my project - any help
will be GREATLY appreciated
Thanks
Art
|
|
|
|
|
Does an IHTMLElementEvent Interface exist ?
Maybe you should be using ...
IHTMLEventObj which you can get to from the IHTMLDocument ?
then use get_event ?
Also if your element has an "ID" it would be easier to track.
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|
|
[ Actually IHTMLElementEvents ]
All i need do is to capture the onclick ondblclick events for html elements (all have ids)on the CHtmlEditView. I've tried :
DISP_FUNCTION_ID(CtestView, "onclick", DISPID_HTMLELEMENTEVENTS2_ONCLICK,
OnElementClick, VT_BOOL, VTS_VARIANT)
Doesn't work. Tried ON_EVENT etc. Nothing seems to capture the mouse click on the CHtmlEditView in design mode. Any ideas?
Thanks Art
|
|
|
|
|
Art Cote wrote:
[ Actually IHTMLElementEvents ]
Ok that must be new also ?
I'm a bit out of date with this.
One ugly solution I have used is to monitor the ?? OnStatusTextChange ?? message.
Can you build an app to monitor the events fired from your CHtmlEditView ? And then back track for it ?
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|
|
One thing you might be ommiting to do is
EnableAutomation();
I'm guessing you would have to do this every time the elements were created. As in a constructor.
This was needed for use with the DISPID_HTMLDOCUMENTEVENTS_ONCLICK, otherwise it wouldn't show up.
Maybe one test you could try is sending a IHTMLElement::click() Command Or whatever it is you use with the EditView to see what message should be fired back out.
Unfortunatly I don't have VC7 to play with so I'm not much help.
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
You are the intrepid one, always willing to leap into the fray! A serious character flaw, I might add, but entertaining.
Said by Roger Wright about me.
|
|
|
|
|
I am trying to put a CListCtrl onto a dialog. I checked out Weagle's tutorial which had be end up with this code in the OnInitDialog function:
<br />
HIMAGELIST hList = ImageList_Create(16, 16, ILC_COLOR8|ILC_MASK, 1, 1);<br />
m_il.Attach(hList);<br />
CBitmap cBmp;<br />
cBmp.LoadBitmap(IDB_FOLDER);<br />
m_il.Add(&cBmp, RGB(255,0,255));<br />
<br />
m_listFolder.SetImageList(&m_il, LVSIL_SMALL);<br />
<br />
LVITEM lvi;<br />
lvi.mask = LVIF_IMAGE | LVIF_TEXT;<br />
lvi.iItem = 0;<br />
lvi.iSubItem = 0;<br />
lvi.pszText = "Testing";<br />
lvi.iImage = 0;<br />
m_listFolder.InsertItem(&lvi);<br />
<br />
All I want it to do is to display the IDB_FOLDER next to the word "Testing" in the listbox. It compiles fine, but gives a Microsoft Debug Library Error on afxsmn.inl on line 130. Any insight would be appriciated.
|
|
|
|
|