|
When dealing with templates, there is no difference between them.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hey,
I've a string including multiple lines. Now I want to use the DrawText DT_CALC feature to calc the height of the bounding rectangle, but leave the right side as it is.
The returning rect has always a extended right side. How can I solve this problem?
Thank you...
<br />
CRect reRect(0,0,150,0);<br />
CString szText("Hallo\ndies ist ein Test\nHello\nthis is a test");<br />
pDC->DrawText(szText,&reRect, DT_CALCRECT);<br />
-- modified at 9:12 Wednesday 28th June, 2006
|
|
|
|
|
|
Maybe you should include DT_WORDBREAK flags?
pDC->DrawText(szText, reRect, DT_CALCRECT | DT_WORDBREAK);
|
|
|
|
|
try using \r\n instead of \n only in szText
|
|
|
|
|
Hi,
This is my first post in the List.
I'm trying to compile a C++ code that uses AxisCpp on Windows
I get the following error:
[Linker error] undefined reference to `axiscpp::Stub::Stub(char const*, axiscpp::AXIS_PROTOCOL_TYPE)'
I have included the necessary libraries (axis_client.lib,axis_server.lib) and also mentioned where to look for the axiscpp header files.
I'm using Dev-Cpp 4.9.9.2 IDE for compiling. I have the axis package from http://ws.apache.org/axis (axiscpp for windows)
I'm unable to compile in Eclipse with CDT Plugin, also.
I'm able to compile the same using Visual Studio VC7.0 onwards.
Does anyone know a solution to this problem? (any extra linker options?)
Regards,
Sriram.V
|
|
|
|
|
|
Hi Sarath,
It's a linker error. I'm able to link all my other libraries except axiscpp libraries.
I'm having axis-c-1.6b for win32. The axis package provides 2 libraries "axis_client.lib" and "axis_server.lib".
The cl compiler that Visual Studio uses is able to find the libraries and I'm able to execute my project, but the g++ compiler that comes with Dev-Cpp and Eclipse with CDT plugin is unable to find the axis libraries.
One guess is that, the library I'm using is not conformant to the mingw compiler
or Does any extra linker arguments need to be specified for linking only axis libraries?
Extract from compile log:
----------------------------------
g++.exe ../../../../../CVSWorkspace/MyProject/agent/src/register/RegisterAgent.o ../../../../../CVSWorkspace/MyProject/agent/src/register/Agent.o ../../../../../CVSWorkspace/MyProject/agent/src/webserviceclient/stubs/Query.o
-o "RegisterAgent.exe" -L"D:/Dev-Cpp/lib" -L"D:/AxisClient/axis-c/axis-c-1.6b-Win32-trace-bin/lib/axis" -L"D:/CVSWorkspace/MyProject/3rdparty/agent-lib" -L"D:/CVSWorkspace/MyProject/3rdparty/sql-lib" -L"D:/AxisClient/axis-c/axis-c-1.6b-Win32-trace-bin/lib/axis" ../../../../../CVSWorkspace/MyProject/3rdparty/sql-lib/sqlite3.lib ../../../../../AxisClient/axis-c/axis-c-1.6b-Win32-trace-bin/lib/axis/axis_client.lib
../../../../../CVSWorkspace/MyProject/agent/src/webserviceclient/stubs/Query.o(.text+0x154):Query.cpp: undefined reference to `axiscpp::Stub::Stub(char const*, axiscpp::AXIS_PROTOCOL_TYPE)'
../../../../../CVSWorkspace/MyProject/agent/src/webserviceclient/stubs/Query.o(.text+0x844):Query.cpp: undefined reference to `axiscpp::Stub::~Stub()'
collect2: ld returned 1 exit status
make.exe: *** [RegisterAgent.exe] Error 1
Execution terminated
----------------------------------
Regards,
Sriram.V
|
|
|
|
|
I would like to open a text file when i press a button in my dialog box. The text file has to be opened in the notepad editor. Which function should i use? I provide the full path of the text file
|
|
|
|
|
|
ShellExecute (NULL,"open","notepad.exe","c:\\abc.txt",NULL,SW_SHOW);
Cheers
"Peace of mind through Technology"
|
|
|
|
|
|
|
Hi i'm trying to write a small screensaver file with a swf file embeded inside.
I'm trying to run a screensaver but before it activates it changes the res of the monitor to 800x600 but im havin no luck can anyone help please
Max101
|
|
|
|
|
|
hello,
i am developing a project that needs to create 2d and 3d graphs using visual c++. please help me . what is the process??
sriv
-- modified at 8:19 Wednesday 28th June, 2006
|
|
|
|
|
|
I want to get the list of all the unsuccessful or broken installation in a computer. Is there any registry key from where i can get the list of all the unsuccessful or broken installation?
Can you please suggest any approach, that may be helpful in this context?
Thanks in advance.
|
|
|
|
|
Sorry. There is no egistry key from where you can get the list of all the unsuccessful or broken installations.
Ovidiu Cucu
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
I have developed a MFC ActiveX control and embeded it in IE. The control is working fine but when another instance of IE is opened using Ctrl+N, I am getting ASSERT exception in debug mode and in Release mode IE crashes.
Note that if the second instance is opened without using Ctrl+N (i.e by using explorer icon) no exception arrises.
what could be wrong. your support is highly appreciated.
Thanks
Muhammad Azam
|
|
|
|
|
Hi,
In my application i need to generate an html page on-the-fly. The page is preseneted in the application's internal (iexplorer 6.0) browser.
Of course, i can generate a text file with all the html tags and all that is required, but i'm sure there's a more elegent way of doing so.
I couldn't find any on the web.
Does anybody have a lead?
Cheers in advance.
Snir Yarom
Singleton Technonlogies Ltd.
|
|
|
|
|
You can set the text directly to the brwser document right? I think most of the Dlls (e.g Team Track) generating HTML pages are doing in same way. Anyway for that purpose, you dont need to write to a file. Only need to keep that buffer generated.
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
Sarath is saying right. You do not have to generate a file. there is simple way.
You can get the interface IWebBrowser2 of the IE.
from that get the interface IHtmlDocument2 of the IWebBrowser2.
call the function write of the above interface.
IHtmlDocument2::write( "text" )
But this code will work onlt in COM
|
|
|
|
|
Hi,
An elegent way could be, have your data in xml format, write an xsl file that will transform your data from xml to html and display that html in webbrowser
Your can search for IDOMDocument interface for transformation of xml through xsl into html .
hope this satisfies you
Thanks
|
|
|
|
|
Hi all,
I have strange error during serialization. I do the following:
ar << m_nTime; // (Value typically > 120000)
ar << m_bFlag; // (type BOOL)
and the m_bFlag always returns as 0;
If I do the following:
ar << m_nTime;
int tmp;
tmp = m_bFlag ? 1 : 0;
ar << tmp;
everything works fine.
I'm certainly a little confused and if anyone has some ideas that would be great.
Thanks
Tom
|
|
|
|