|
Man, you really have to learn to post to the correct forum[^]. It is not the first time you post managed code in the C++ forum and people have already told you to post in the managed forum.
Please, be carefull in the future.
|
|
|
|
|
ok...I wilt try..sorry for the problem
|
|
|
|
|
Hi Experts,
In which view i can display html text.
Thanks in advance.
|
|
|
|
|
pther wrote: how to display html
You can use of CDHtmlDialog class or CHtmlView class .
|
|
|
|
|
Can it display text also ?
|
|
|
|
|
|
Actaully my problem is this:
I have a html body not file.Then How could i display in HtmlView.
Plz give any related link or e.g.
|
|
|
|
|
Of where you read this body? can you make a file?
|
|
|
|
|
Im My project I have a udp server program running in Console VC++ application and I have to open telnet with a particular ip address in run dialog and then I have to type in some data in telnet so that I am receiving some data in udp server console application.Here the telnet acts as Client and Udp Console application acts as Server. Now I have to automate the telnet application in my project so that there is no manual entry of data in telnet. I have open the telnet with the particular ip address and type the data automatically via VC++. Can anyone suggest me some ideas rtegarding this.
S.Yamini
|
|
|
|
|
means u need to write a udp client . Refer my answer to your next question
redindian
|
|
|
|
|
CIPAddressCtrl *ip = (CIPAddressCtrl *)GetDlgItem(13);
ip->GetAddress(dwIPAddress);
13 is a control id that was i created dynamically
|
|
|
|
|
What is the problem ?
Did you check with your debugger that ip is a valid pointer before calling GetAddress ?
|
|
|
|
|
Check if the control identifier (13) was already assigned by AppWizard to any other control.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Whats return value in ip ?
|
|
|
|
|
I want to get a value from dynamic ip address control for that purpose i wrote this code
CIPAddressCtrl* ip = (CIPAddressCtrl *)GetDlgItem(13);
ip->GetAddress(dword);
|
|
|
|
|
How do you make this control?
|
|
|
|
|
prathuraj wrote: CIPAddressCtrl *ip = (CIPAddressCtrl *)GetDlgItem(13);
Unless , you are having the control with id 13, nothing wrong with code. Though, I would have used dynamic_cast , instead of c-style cast.
prathuraj wrote: ip->GetAddress(dwIPAddress);
If ip is non-null and controll retunrned in previous statement is of type CIPAddressCtrl , there should not be any problem.
Can you specify, what problem you are facing.
Prasad
MS MVP - VC++
|
|
|
|
|
ip->GetAddress(dword); Access violation error occured at this line
|
|
|
|
|
prathuraj wrote: Access violation error occured at this line
Because ip is invalid.
|
|
|
|
|
As sated in one of previous post, make sure, id 13 is assigned to control you are talking about.
Prasad
MS MVP - VC++
|
|
|
|
|
control id is correct.but pointer is null.what i do further
|
|
|
|
|
Try this code instead (run in a debug build):
CWnd *pWnd = GetDlgItem(13);
ASSERT(pWnd != NULL);
ASSERT(dynamic_cast<CIPAddressCtrl*>(pWnd) != NULL);
CIPAddressCtrl *ip = static_cast<CIPAddressCtrl*>(pWnd);
If the second line asserts in a debug build the id is wrong.
If the third line asserts in a debug build the CWnd returned was not a CIPAddressCtrl and your cast is in error. Try adding a member variable (using ClassWizard in MSVC6); this step makes calling GetDlgItem unnecessary. If this line fails to compile enable RTTI (just in the debug build) and try again.
If the fourth line fails to compile CIPAddressCtrl is not derived from CWnd .
Don't use C-style casts!
Steve
|
|
|
|
|
Typically, the wizards assign control IDs starting at 1000 - perhaps the ID you chose (13) is actually some other control that has been assigned by Microsoft.
It could be that by simply changing your ID (perhaps to something like above 1000, you may be ok as long as that ID isn't used elsewhere in your project.
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
How to check if a valid document file is loaded in SDI application?
Actually I want to do some actions only after a file is opened. and also want to enable/disable filemenu save, save as submenus and save tool bar button.
Any suggestion?
Thanks
|
|
|
|
|
Hi,
loaded with Serialize () or loaded with CFile open and read?
And what do you mean with "valid"? If your program has an extension, it would load only files with this extension, and the serialize () already has some checking functions that says "this file is not valid" or "error by loading"
Please explain yourself a bit more
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
|
|
|
|