|
You have some sort of a header file included that declares the function/structure specified in the first error. However, you are not linking against a suitable library. Check your project settings and the function that causes the error (HelloPollMessage::Send ). When you find the missing function, see it's reference for the library to link with.
The second error if of similar sorts, however, it just says that it cannot find the definition of 'basic_string' class. Make sure you are linking against the standard C/C++ library files.
Of course, you could check the VS .Net help files for the new features of ATL version 7 to see if some note there would explain your problem. The final option is to copy the ATL library files from VC++ 6.0 and link against them instead of the version 7 ones.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Hi,
Coding my application with Visual C++, when i try to open WORD2000 application from a thread, an error occures.
Please, help me with an example explaining how to manage this problem.
Thanks
|
|
|
|
|
tlemetay wrote:
...an error occures.
And that error would be?
Are you using CreateProcess() , or OLE Automation?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
I just figured out how to walk through each document like the below
when you open multiple project in MDI application
POSITION DocPos = pDocTemp -> GetFirstDocPosition();
while( DocPos != NULL )
{
CMyDoc * pDoc = ( CMyDoc * )pDocTemp -> GetNextDoc( DocPos );
}
Is there any way to know the position of current document (
which document is currently active)?
Thanks.
Shin
|
|
|
|
|
CFrameWnd::GetActiveView
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
Thanks Anthony,
That did it.
|
|
|
|
|
Hi,
I am trying to write a control derived from CComboBox. I want to make sure that the owner draw flag is set even if it has not been done in the resources.
So in PreSubclassWindow, I do this
<br />
void CMyComboBox::PreSubclassWindow() <br />
{<br />
CComboBox::PreSubclassWindow();<br />
<br />
UINT nStyle = GetStyle();<br />
if ( !(nStyle & CBS_OWNERDRAWVARIABLE) || !(nStyle & CBS_HASSTRINGS) )<br />
SetWindowLong(m_hWnd,GWL_STYLE,nStyle | CBS_OWNERDRAWVARIABLE| CBS_HASSTRINGS);<br />
}<br />
This does not work... DrawItem does not get called. Any idea?
Thanks in advance
|
|
|
|
|
I believe that you have to specify that the control is owner-drawn before it is created. Subclassing a control in this manner, the window is created before before PreSublassWindow is called, so your modification of the window style has no effect.
|
|
|
|
|
Thanks for your reply.
Any idea of what I should override to be able to do this?
|
|
|
|
|
Yeah - check the property sheet checkbox.
There are a few approaches. I think the slickest (especially in VS.NET 2003, as opposed to VS6) is the use of the 'Custom Control' toolbox item.
Check out the MFC sample 'CTRLTEST', in particular the file (and documentation regarding) paredit2.cpp and .h - the parsed edit control w/ an 'Exported' class for use inthe dialog editor. It'll take a while to understand how it works, but it's a neat trick to know.
|
|
|
|
|
Does anybody know how to fill the fields of IE's web page
from within VB or C++ ? What if the page is secure? Of
course, there is no problem to fill all the fields by
hand. The question is how to do it automatically, by
running .exe or .dll.
|
|
|
|
|
It is depends on wheither your form it to be submited by POST , by COOKIES or by QUERYSTRING.
If your web page form is using querystring, you just ammend the URL
like
http://www.codeproject.com/script/comments/user_reply.asp?forumid=myIDblahlblah
Check out some ASP/JSP/PHP/Perl tutorial to understand the concept
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
how to communciate with a serial or com or usb port using mfc
|
|
|
|
|
You don't
You use ::CreateFile and give it a name such as "COM3:" If you want to talk to a USB port you have to make sure your USB device offeres a device in the serial port (or modem) class in its ACL to get a COM port assigned to it
You probably can use CFile to do the same, but ive never tried.
There are numerious serial port wrapper classes on CP and www.codeguru.com
|
|
|
|
|
how to display data from an oracle table into combo box and edit control.
|
|
|
|
|
i have a dialog box where i am having a combo-box control and two edit controls.i want to insert the value of the combo box which i select and also of the two d\edit controls into a table in oracle database when i click the ok button.i want to use the CDatabase.ExecuteSqlQuery command.how should i write the insert statement.
|
|
|
|
|
m_combo.GetWindowText(strComboText);
m_edit1.GetWindowText(strEdit1Text);
m_edit2.GetWindowText(strEdit2Text);
strSQLQuery.Format("INSERT INTO <table> (column list) VALUES ('%s', '%s', '%s')",
strComboText, strEdit1Text, strEdit2Text);
CDatabast.ExecuteSqlQuery(strSQLQuery);
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
How can I draw a line with a style that has dots smaller and and more closely placed than PS_DOT style in CPen? I would like to draw like the one drawn by the function DrawFocusRect, but would like to be able to change the color.
Thanks
|
|
|
|
|
I'm intercepting all the alt keys in my CDHtmlDialog derived dialog
application, but I can't seem to intercept the control-N "new browser" key
combination. Unlike CHtmlView, CDHtmlDialog doesn't have an OnNewWindow2
event handler.
I'm using C++ in Visual Studio .Net 2003.
I should know how to do this, but I don't.
Hints or pointers to a faq are very welcome.
Thanks,
Jim Howard
|
|
|
|
|
hi,
i am developing an install/uninstall program, but i have Q about remove items from Start Menu.
following lines can easily add items to Start menu
//=================================================
CString csBuf= "[progman.groups]\r\n"
"groupX=_g0\r\n"
"[groupX]\r\n"
"\"R0\",\"c:\\_temp\\abc.txt\"\r\n"
"\"R1\",\"c:\\_temp\\efg.txt\"\r\n"
"\"c:\\_temp\"\r\n";
const CString csIni="C:\\WINDOWS\\setup.ini";
int fh=_lcreat(csIni,0);
if(fh!=-1)
{
_lwrite(fh,csBuf,csBuf.GetLength());
_lclose(fh);
WinExec("grpconv -o",SW_SHOW);
}
//=========================================
Q:
1. how to delete (uninstall) items from Start menu programmatically (any way)?
2. is code above good for add items to Start menu? what is best or better method?
3. any recommend for install/uninstall (espcially-uninstall) samples (links etc) - samples in msdn look no good.
thanks
includeh10
|
|
|
|
|
|
where is it?
i never use any so far.
includeh10
|
|
|
|
|
|
thanks
i will try soon.
by the way, does it include uninstall package also?
includeh10
|
|
|
|
|