|
As i understand it, CHtmlView hosts whatever OLE ("Active") documents necessary to display what is navigated to. So, if a particular machine is not configured with appropriate viewers for a given file type, it will open externally. Think of it as having IE embedded in your app - there's surprisingly little difference.
As for drawing over it - n'uhuh. Don't be trying to do that. First, it won't work. Second, even if it did, it would be quite wasteful. If you are going to be drawing the view yourself, then you don't have any use for CHtmlView anyway - CScrollView will work just fine. There's no reason you can't use whichever view is most appropriate for a given file at runtime.
Zno one puts flowers on a flower's grave
|
|
|
|
|
i need to know if conversion for atof is available in unicode
atoi is _ttoi
atol is _ttol
atof is ?
|
|
|
|
|
hi,
CString strCurrent;
strCurrent = _T("25.5");
//atof(strCurrent);
double dValue = 0;
_stscanf(strCurrent, TOFLOAT, &dValue);
good luck...
dan o
|
|
|
|
|
you can use strtod() instead of atof() . It's TCHAR macro is _tcstod()
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
thanks guys. Appreciate your help
|
|
|
|
|
_tstof
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
i am new to VC.i want complete information with all possible codes so that i can use com port for serial programming.please also tell me how i check that data is written and read from com port when no device is attached to it.
tahir
|
|
|
|
|
it is very easy if you want to use MSCOMM.For test, you can use two com port on your PC, one for sending and the other for receiving.(And you should connect the two com port before you test.)
Thanks
Benben
|
|
|
|
|
You can use CreateFile to open the com port and write to it as you would write to a file
Here is a Link to a wonderfull sample on serial communication with sample code
Hope it helps
Mttty Sample[^]
Data arrival can be handled as an event , so that you know whenever data arrives on com port
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
you simply use
CreateFile (.....) and WriteFile(....)
(one of the parameters will be your COM port)
read the MSDN for the correct parameters....
hope this helps ya
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
Hi:
In my programme,I use some classes in a dll.When I try to compile it, VC give out such errors:
error C2487: 'classCWinAppEx' : member of dll interface class may not be declared with dll interface
error C2487: 'classCMyMenu' : member of dll interface class may not be declared with dll interface
(CWinAppEx and CMyMenu are declare and implemented in the dll)
and all these errors are point to the line "DECLARE_DYNAMIC( CWinAppEx )" or "DECLARE_DYNAMIC( CMyMenu )". I look up this error in MSDN, but didn't find the solution.Could anyone give me some idea?
Thanks
Benben
|
|
|
|
|
try to use __declspec(dllexport) while declare class
Exa:
#define EXT_CLASS __declspec(dllexport)
class EXT_CLASS ClassA : public X
{
...
};
|
|
|
|
|
Thanks.I have used this macro in the dll. And thses errors only occour when I try to compile one certain file(when I compile the other files, VC doesn't give out these errors).
Thanks
Benben
|
|
|
|
|
and I find that these errors only occur when the cpp files in EXE project have such line:
#undef AFX_DATA
#define AFX_DATA AFX_DATA_EXPORT
Maybe it conflict with the static functions or something else in the dll.How to resolve this problem? Could anyone give some idea?
Thanks
Benben
|
|
|
|
|
hey ppl i've been getting this wierd error when i try to add an event to the the activeX control as soon as i hit the add event button it says "Error adding a(n) event to the associated class" anybody know how to correct this?
thanks
|
|
|
|
|
hello all,
I need help.
I have three NIC (Network Interface Card) in same Machine (PC) they connected to network with same subnet mask and gateway address
how to get the second or next IP address with Visual C++ ?
thank u
Tripey
|
|
|
|
|
You will have to enumerate all devices here is a link for some sample code hope that helps
Click ME[^]
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
How I can put my icon on Pushbuttons.
|
|
|
|
|
Here is a link to an article on codeproject might come in handy
Click ME[^]
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Here's another article:
http://www.flounder.com/bitmapbutton.htm
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Does anyone know of an algorithm to calculate a complementary text color given a background color? By this I mean a text color so that the text can easily be read. I've scoured the Web but have not come up with anything useful.
I have low vision, and have difficulty reading the text on some of the controls being developed in my company where the text and background color don't contrast enough. If colors are hard-coded, there will always be some color scheme for which this will not work.
Any suggestions will be much appreciated.
Mihaly Zsadanyi
|
|
|
|
|
IMO all controls should use the system colours for their backgounds and text, that way the user can choose whatever colour they are most comfortable with. Use COLOR_WINDOW or COLOR_3DFACE for backgrounds, and COLOR_WINDOWTEXT or COLOR_BTNTEXT for foregrounds. Any other combinations may look cool, but are disrepectful of the end user.
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
I'm using Visual C++ to program an application that reading from a .txt file at some time interval, let's say 10 seconds.How can i do this? Please help me. Thank you.
|
|
|
|
|
You have to Set a timer via . SetTimer function
then in the Timeout Handler Read the txt file (use CFile )
if you have a Dialog based Application
then in OnInitDialog
SetTimer(1,10000,NULL);
add handler for WM_TIMER event (via Class Wizard)
..... OnTimer(UINT nIDEvent)
{
}
Live as if your were to die tomorrow. Learn as if you were to live forever.
-Mahatma Gandhi
|
|
|
|
|
Hi,
I need to use USB to interface between a hardware and PC. What command/tool should I use? Any sample code?
|
|
|
|