|
Hi,
I need to have an small customized HTML editor ( to use in my main application), it should look like an standalone application, with a toolbar...
If I use the HTML control alone, then I won't get the look and feel of a Window application, what I thought was to create a COM object, with a method called StartEditor, this method would show an AxWindow, that inside would have the toolbar and the HTMLControl ( as the ActiveX control hosted in the window), is this a good idea ?
Could it be possible to call from my MFC application directly the AxWindow, instead of making a control that shows that window ?
Thanks in advance, greetings
Braulio
|
|
|
|
|
We are currently using Visual C++ 6.0.
Lots of recent developments use lots of templates, and it seems that Visual C++ 6.0 is not very well suited for this (crashes, internal compiler errors, valid C++ does not compile, ...). We would like to upgrade to Visual C++ 7.0, since that seemed to be much better (on our test system), but I already heard rumours about a version 7.1.
Anybody knows when that is released ?
Or even better, is there a way to make Visual C++ 6.0 work with complex templates ? Maybe via a C++ preprocessor ?
Enjoy life, this is not a rehearsal !!!
|
|
|
|
|
Partial template specialization(PTS) don't work in VC++ 6 neither in VC++ 7, full and proper namespace lookup also don't work .
Patje wrote:
but I already heard rumours about a version 7.1.
I'm expecting this a long time ago , perphaps in the end of the year before VC++ 8, a much improved C++ std compliant ...
VC++ 7 is much better standard compliant and have better support for template support , and the STL(Dinkumware) library is much more improved and standard.
For faking PTS, see resources on Joãquin article on STL bi-directional maps here on CP, it's at the front page.
See also www.moderncppdesign.com[^]
In the page there is a link for the Loki library , a powerfull template library , and it have a link to a port of the library to VC++ 7 where PTS is faked.
Cheers,Joao Vaz
And if your dream is to care for your family, to put food on the table, to provide them with an education and a good home, then maybe suffering through an endless, pointless, boring job will seem to have purpose. And you will realize how even a rock can change the world, simply by remaining obstinately stationary.-Shog9
|
|
|
|
|
Hi,
I am new to Data base programming, i want to obtain the coloumn names of a Database Table using ADOX::_TablePtr class. I can obtain the names using _TablePtr->GetColumns()->Item[index] function, but then it returns me the names in alphabetical order, how can i get the names in the same order as in the table..
I will be really thankful if someone can help me in this regard.
|
|
|
|
|
I'm trying to implement a 'inactivity' feature in my MDI/SDI app. Since there are many different modal dialogs that could be up, I'm using windows hooks to set/reset a timer based on keyboard and mouse events. That's all working fine.
I'm having a problem killing off any dialogs (who might also have children dialogs) that might be up when the timer kicks off.
I'm doing all of this from within my CFrameWnd derived class, but can't simply post WM_CLOSE to the frame, since my frame class has a little 'signon' screen that it reverts to.
In my timer handler I've tried SendMessageToDescendants(WM_CLOSE), and I've tried finding children windows with GetWindow(GW_CHILD) and posting WM_CLOSE (even tried WM_DESTROY), but my child windows never seem to care. Actually they never even seem to get the message...
If I save off a CWnd* to the currently modal dialog, and then send a WM_CLOSE to that, it'll go away, but it's children hang out. I thought they would go away too. But I'd rather not have to save off that ptr (there are a lot of menu commands that bring up dialogs, dozens and dozens) if there is another way around it..
Anyone have any suggestions?
|
|
|
|
|
Ok. I'm almost embarrassed to ask this one, but here goes...
I have a dialog box with a CEdit control on it. I'm using it as a logging window, but I can't get it to multiline my text. I'm using a CString member variable to contain the text that is written to it, but when I insert a '\n' or '\r' the CEdit control displays it as a control character inside of moving to the next line.
What properties need to be set? The ones that I have checked are:
- multiline
- horizontal scroll
- vertical scroll
Am I missing something? Thanks in advance.
Mark
Mark Donkers
A witty saying proves nothing.
-- Voltaire
|
|
|
|
|
use \r\n to pass a line
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Perfect. Thanks Papa.
MD
Mark Donkers
A witty saying proves nothing.
-- Voltaire
|
|
|
|
|
Hi, everyone!
I want to get HTTP response header of my HTTP request.
I have seen some documents in MSDN, but I think it is
too hard to understand.
I just want to get all of the header and print it out.
Are there some sample codes?
Cheers,
George
|
|
|
|
|
|
Thanks, Ravi pal!
I have seen the article you introduced to me.
It really helps a lot!
Cheers,
George
|
|
|
|
|
Thanks, Ravi pal!
I have a further question. I use the following codes to
get the header of Yahoo,
--------
CAmHttpSocket http;
TCHAR *ts = http.GetHeaders(_T("http://www.yahoo.com"));
CString str = ts;
AfxMessageBox(ts);
}
--------
in the message box, I can only get
--------
HTTP/1.1 200 OK
--------
I can not get other headers (Content-Length, and cookies etc).
Can you tell me how can I get all of the headers?
Have a nice weekend,
George
|
|
|
|
|
The headers received depends on the webserver. Many webservers will only respond with a minimal subset and may also change headers (like the document's last-updated timestamp) to fool you.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Thanks, Ravi pal!
I use "curl" command in Linux and can see all the headers, but
by using this tool, I can only see one of the headers.
I wondered whether I have miss-used the lib?
Can you check my code?
Cheers,
George
|
|
|
|
|
What function are you using to send an HTTP request? Some of the IE technologies don't allow you to get the response header.
Todd Smith
|
|
|
|
|
Thanks, Todd pal!
I am not using any specific browser. I just want to use
some client technology to see whether my web server runs
properly.
Do you have some ideas?
Cheers,
George
|
|
|
|
|
In that case here's the easiest way to get a response header
[www@staging2 apache]$ telnet www.codeproject.com 80
Trying 207.219.70.31...
Connected to www.codeproject.com (207.219.70.31).
Escape character is '^]'.
GET /index.html HTTP/1.1
host: test
HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Date: Fri, 25 Oct 2002 16:46:38 GMT
Content-Length: 20307
Content-Type: text/html
Set-Cookie: LastVisit=10%2F25%2F2002+12%3A46%3A38+PM; expires=Wed, 23-Apr-2003 04:00:00 GMT; path=/
Set-Cookie: ASPSESSIONIDGQGGQZSK=LIPJNILADKDFHFMELBMDCJHE; path=/
Cache-control: private
Todd Smith
|
|
|
|
|
I found out how to display colored text in a rich edit control but am having a problem retaining the colored text when doing a ReplaceSel().
Is this normal? Is there a way around it? I mean is there another way of adding lines of text to a rich edit control without doing ReplaceSel?
I would like to keep adding text to this rich edit control and am using a method described here where you SetSel(0,-1), GetSelText(), then add my new text to it, and call ReplaceSel() to replace the entire contents of the rich edit control with the old and new text. But, if my old text was colored (only certain portions or certain lines are of different colors), the text is being overwritten to the default color - black text.
|
|
|
|
|
Hi,
A quick question with regards the above:
Can one use Crystal Reports in Visual C++?
And if so how does one go about doing that?
Thanks
Regards
Rui
|
|
|
|
|
You've a C++ SDK[^].
How low can you go ? (MS rant)
|
|
|
|
|
Yes you can do that.
Via COM it is possible to open reports, show them in a window (in a Crystal Reports Viewer ActiveX control), and perform all kinds of actions on it (print, mail, ...).
It is even possible to show the embeddable designer, and let you users design their own reports; within your application (although you need a separate license for this).
Normally the data for your report will come from a database (that's easy), but it's even possible to tell Crystal Reports that the data comes from within your application. However be careful, since CR 9.0 does not support the same functionality as CR 8.5. If you want to do this I suggest to go to CR 9.0 directly.
When you only want to show the report in your application, you don't have to pay any runtime royalty to CR (you can ship a free CR View-Only Runtime). However, if you want to create or modify reports from within your application, or let the user create or modify reports, you need a special RCAPI (Report Creation (or was it Component) API) license. This license is per named user, and costs about the same as a full Crystal Reports. This license and the Design-Time RunTime is mandatory ! simply installing Crystal Reports won't do the job.
Best way to get more information is to look at the crystal reports site, especially the developer zone (http://www.crystaldecisions.com/products/dev_zone[^]).
Enjoy life, this is not a rehearsal !!!
|
|
|
|
|
Hi Patje,
THank you very much for the information. May I ask you something else: The Crystal Reports that comes with Studio .Net, how does this fit in with what you are saying?
I notice that one can create a crystal report item for a C++ application, would this be the report that is called by the Crystal Reports Viewer ActiveX control?
Thanks
Regards
|
|
|
|
|
I don't know anything about the CR that comes with VS.Net, but I assume that it's a kind 8.5.Net version, not the brand new CR 9.0.
We are using the CR ActiveX control by using the "AtlAxWin" control (part of ATL 3.0) and passing it
- "CrystalReport.EmbeddableCrystalReportsDesignerCtrl.8.5" for the embeddable designer
- "CRViewer.CRViewer.8.0" for the ActiveX viewer
Then use ATL::AtlAxGetControl to get the IUnknown interface of the ActiveX control hosted in the AtlAxWin control.
ATL::AtlAxGetControl (NativeWin, &UnknownInterface);
Then use IUnknownInterface->QueryInterface to get the interface to the CRVIEWERLib::ICrystalReportViewer4Ptr.
hr = UnknownInterface->QueryInterface (__uuidof(CRVIEWERLib::ICrystalReportViewer4),(void **)&CrystalReportViewer);
or for the designer:
hr = UnknownInterface->QueryInterface (__uuidof(CRDESIGNERCTRLLib::ICRDesignerCtrl),(void **)&CrystalReportDesigner);
Then simply use
CrystalReportViewer->ReportSource = MyReport
to set the report in the viewer (similar for the designer).
Don't forget to import the necessary type libraries:
#import "CRAXDDRT.tlb"
#import "CRAXDRT.tlb"
#import "crviewer.tlb"
#import "CRDesignerCtrl.tlb"
Also take a look at the generated .tli and .tlh files (by the #import). They're also very interesting if you want to know some of the more technical details.
Hope this helps (this was one of my first C++/COM projects, a real C++/COM guru might write this maybe a bit more efficient).
Enjoy life, this is not a rehearsal !!!
|
|
|
|
|
Hi guys
How can I change the color of the EditBox part of a CComboBox?
I don't want to change the list color, only the edit box part.
Best regards
Jordi
|
|
|
|
|
Probably wanna look into CWnd::OnCtlColor as one solution...and by far the easiest...
There is also Ownerdrawing as an option, but thats ALOT of work...
So look into the above first
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|