|
zahid_ash wrote: t client side CSocket.Create() will creat a random socket/portWould the CSocket.Create() will be successfull at the client side where firewall is installedand will the app start listening at that socket.
At Client End you will not Associate you Client Application to any port you just connect to port on that IP address where you server is listening!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
At server Side I will do:
CSocket sockSrvr;
sockSrvr.Create(PORT);
sockSrvr.Listen();
At Cleint side I will do as :
CSocket sockClient;
sockClient.Create();
sockClient.Connect( strIP, PORT );
When the line sockClient.Create(); will execute , would not it will create any random port on which it will recvie data from server. sned data to server via this created port.
Please calrify / make correction if I am wrong
Regards.
|
|
|
|
|
zahid_ash wrote: random port
<marquee scrollamount="1" scrolldelay="1" direction="up" height="10" step="1">--[V]--
[My Current Status]
|
|
|
|
|
hai, I want to know about pre compiled header files.
What are precompiled header files ?
Are they compile before compilation ?
How precompiled header files make the build much faster?
Thank you in advance.
|
|
|
|
|
The C++ compiler provides a mechanism for, in effect, taking a snapshot of the state of the compilation at a particular point and writing it to a disk file before completing the compilation; then, when recompiling the same source file or compiling another file with the same set of header files, it can recognize the ``snapshot point,'' verify that the corresponding precompiled header (``PCH'') file is reusable, and read it back in. Under the right circumstances, this can produce a dramatic improvement in compilation time; the trade-off is that PCH files can take a lot of disk space.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thank you very much.
Is there any relation to make file ? sorry if iam too beyond.
|
|
|
|
|
AFAIK None. Makefile has a set of commands and compiler options that are required to build a project on a machine with the help of nmake command.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Apart from the fact that if you use a make file and want to use precompiled headers the make file will have to call the compiler with the correct switches to enable precompiled headers.
Steve
|
|
|
|
|
See here.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Hi !!!
Precompiled Headers makes your build faster. They are compiled one time. Only if you change something in the Precompiled Header file, then it need this time for the new compilation of the all things in the Precompiled Header file. From my experience eith the C++ I thing the precompiled headers are good for the build time or that you don't have to include in each .cpp file the STL or the WIN32API headers. But it is not so clearly as without them, but C++ is not very clearly language so it is OK.
By !!!
-:KNOX:-
|
|
|
|
|
when i use a IHTMLDOMNode pointer which points to a #text node in the dom tree to get a IHTMLElement pointer,it fails. is there anyone who knows how to solve the problem?the purpose for getting the IHTMLElement pointer is that i want to get the bounding rect of the text node.
|
|
|
|
|
ASSERT the IHTMLDOMNode pointer is not NULL
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Can you be more specific? Show the code that is failing and describe the nature of the failure.
Steve
|
|
|
|
|
How to Change CPropertyPage's Title
i wrote the following code, however, the exception occurs in
int index = m_sheet.GetPageIndex(this);//make a Exception
Thanks
<br />
CPropertySheet m_sheet;<br />
CAboutDlg m_about;<br />
...<br />
m_sheet.AddPage(&m_about);<br />
m_sheet.Create(this, WS_CHILD|WS_VISIBLE,WS_EX_CONTROLPARENT);<br />
m_sheet.SetWindowPos(NULL, 4, 4,25, 50, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);<br />
....<br />
...<br />
m_sheet = GetPrient();<br />
CString szDlgName(_T("test"));<br />
TC_ITEM TabCtrlItem; <br />
TabCtrlItem.mask = TCIF_TEXT; <br />
TabCtrlItem.dwState = TCIS_BUTTONPRESSED; <br />
TabCtrlItem.pszText = buf;<br />
<br />
strcpy(TabCtrlItem.pszText,szDlgName);<br />
<br />
int index = m_sheet.GetPageIndex(this);
m_sheet.GetTabControl()->SetItem(index,&TabCtrlItem);<br />
<br />
...<br />
hi
-- modified at 1:26 Friday 19th May, 2006
|
|
|
|
|
You can change the caption of the dialog to cahnge the title.
in your case
m_about.SetWindowText( "test" );
Regards
Anil
|
|
|
|
|
Thanks for you reply!
but SetWindowText is not ok!
<br />
CPropertySheet* pSheet = (CPropertySheet*)this->GetParent();<br />
<br />
COptionDlg* dlg = (COptionDlg*)this->GetParentOwner();<br />
TCHAR buf[MAX_PATH];<br />
TC_ITEM TabCtrlItem; <br />
<br />
hi
|
|
|
|
|
Just check if the CAboutDlg is derived from CDialog or CPropertyPage. It should be CPropertyPaeg and must have done CPropertyPage but I am just asking to check it once more. so we can think of other options.
Regards
Anil
|
|
|
|
|
yes,my CAboutDlg is derved from CPropertyPage!!
hi
|
|
|
|
|
It sounds to me that you are calling this function before the window has been created.
The exception you get is probably about the hWnd being 0.
From where are you calling this?
What function?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc.</A>
|
|
|
|
|
Thanks
i call the function which to change CPropertypage's title,when i click the button in the CPropertypage(others)!
Main.h
<br />
CPropertySheet m_sheet;<br />
CAboutDlg m_about;<br />
<br />
Main.cpp
<br />
BOOL COptionDlg::OnInitDialog()<br />
{<br />
.....<br />
m_sheet.AddPage(&m_about);<br />
m_sheet.Create(this, WS_CHILD|WS_VISIBLE,WS_EX_CONTROLPARENT);<br />
m_sheet.SetWindowPos(NULL, 4, 4,25, 50, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);<br />
....<br />
}<br />
<br />
CAbout.cpp
//the CAboutDlg was Created
<br />
void CAboutDlg::UpdateUI()<br />
{<br />
CPropertySheet* pSheet = (CPropertySheet*)GetParent();
}<br />
hi
|
|
|
|
|
Hi,
I need ask the user save what the changes on my app when user exit thep app
I used at bellow but It is not work correctly
bool CTestDLLDlg::CleanUp()
{
int iMes=-1;
if(bHasMouseAdjusted){
iMes = ::MessageBox(this->m_hWnd,"Don you want to save the changes to Sence Configuration?","Pixelware TV Life",3);
}
if(iMes==2){
return false;
}
if(iMes==6){
}
return true;
}
void CTestDLLDlg::OnDestroy()
{
if(CleanUp())
{
CDialog::OnDestroy();
}
}
void CTestDLLDlg::OnFileExit()
{
if(CleanUp())
{
PostQuitMessage (1);
}
}
This close the app first after show the message box and with OnFileExit this cause system error.
Please help me with this.
Thank in advance!
Tri
|
|
|
|
|
You can handle WM_CLOSE message or you can write the code on the button click which you are using to close the dialog.
Cheers
"Peace of mind through Technology"
|
|
|
|
|
huutribk2001 wrote: I need ask the user save what the changes on my app when user exit thep appI used at bellow but It is not work correctly
Handle OnClose Message!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
How to handle with this,
When user click on Close Button of dialog(X button), I can not catch this event to progree,
The main function now is, how to don't let user close the app by click X button or How to ask user by display a message box to let user chose is exit or not.
I used the code that I posted but it not work, the app close although the result of CleanUp() function returned is false.
Please help me again!
|
|
|
|
|
Hi
I have another application build in VB which will run my application by using Shell API to execute and it will pass also few parameter with in that Shell exe API.
AS my application starts executing I want to get the passed arguments by that application that is laucning mine. actualy i want to use these arguments in my app.
my app is MFC dialoged based. would it recevied the arguments?
Or should I build the console mode app to receive the arguments? but my preffered is Dialoged based?
** Query - How can i get the arguments passed by VB application to my app when it will run Shell APi to execute my App EXE
Thanks
Regards.
|
|
|
|