|
Hi
I am using an window CE device to connect to an internet server of Port 1001 and 1005 uisng those wininet API provided. The 2 ports is needed as one is from normal TCP/IP communication and the other one is for keep alive packets.
just wonder if this can be done. i try it out on PC and it seems ok.
Any help will be apprecaited
|
|
|
|
|
Hello,
I have an editbox designed with MFC. I want it to scroll down to the last entry automatically. So, I am typing some lines, and it allways jumps to the first line, so I have to scroll down to see the new entry.
How can that be achieved?
DKT
|
|
|
|
|
I'm a bit confused. You have an edit control that you are typing text into. Correct? What are these entries that you refer to? Do you also have code that is adding text to the edit control?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Chat program!
One editbox for typing text, one for getting text, this one is getting full very fast. The problem is, that the app doesnt scroll automatically, it always jumps to the "first page", so starting with the first line, and I have to scroll down to see the new text.
DKT
|
|
|
|
|
Ok, that makes more sense. When you receive text from the person you are chatting with, how are you adding it to the edit control?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
By using MFC:
Filling the member variable, and call an UpdateData(false)!
I fill the membervariable by adding the new text to the old, and ending with a \r\n
m_var+=text+"\r\n";
UpdateData(false);
DKT
|
|
|
|
|
Ok, I managed it by showing the newest message as first entry. But I still would like to know how to solve the above mentioned problem!
DKT
|
|
|
|
|
I think something like this is what you are after:
CString strText;
m_edit.GetWindowText(strText);
m_edit.SetSel(strText.GetLength(), strText.GetLength(), FALSE);
strText += "\r\n";
m_edit.ReplaceSel(strText);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Here is another way I have found to achive a scroll.
//Update Edit String IDC_STRING is the name of my edit box
//and temp_str is the name of the string to write to the dialog box.
dlg.SetDlgItemText(IDC_STRING,temp_str);
//Scroll to bottom.
dlg.SendDlgItemMessage(IDC_STRING, WM_VSCROLL, SB_BOTTOM, 0);
(I made my dialog global).
|
|
|
|
|
Thank you DavidCrow. this was the solution which I was searching for months.
You've done a good job.
Thank you for your guidance.
|
|
|
|
|
Hello friends
I am facing the following simple problem (as I am very new to VC++). The purpose is to display second window/screen after the user clicks 'OK' in the first window/screen. But the problem is that the second window fails to get displayed. The code has been written as below...
Please help....
Thanks
BOOL CMyDialog::InitInstance()
{
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
AfxEnableControlContainer();
#ifdef _AFXDLL
Enable3dControls();
#else
Enable3dControlsStatic();
#endif
CDialogfirstwindow dlg1;
m_pMainWnd = &dlg1;
int nResponse1 = dlg1.DoModal();
// The first window is successfully displayed
if (nResponse1 == IDOK)
{
//#if defined REQUIRED_CODE :
// This code has been introduced thinking that new window
// may need re-intialization..
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
AfxEnableControlContainer();
#ifdef _AFXDLL
Enable3dControls();
#else
Enable3dControlsStatic();
#endif
// #endif
CDialogsecondwindow dlg2;
// The Second window fails to get displayed
m_pMainWnd = &dlg2;
int nResponse2 = dlg2.DoModal();
if (nResponse2 == IDOK)
{
}
else if (nResponse2 == IDCANCEL)
{
}
}
else if (nResponse1 == IDCANCEL)
{
}
return FALSE;
}
|
|
|
|
|
This has to do with m_pMainWnd and it's being assigned a NULL value. Read here for more.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Thanks a lot..David..I got it done..
Sam
|
|
|
|
|
Hello !
I need to have a dialog that will be used like a modal dialog box from an user point of view (so it means, the user can only interract with this dialog and no more with the program itself) BUT I need to work with it like a modeless dialog box from the code point of view (so it means that the program cannot be interrupted and must still run and print data in the underground window).
Is it possible to specify a modeless dialog to act like this ??
Thanks
|
|
|
|
|
Spawn the modal dialog in its own thread. i.e., in the mainframe, set up a thred function that calls dialog.domodal() and in the event handler that spawns the dialog, do AfxBeginThread(YourThreadProc, this); That should work.
~Nitron.
ññòòïðïðB A start
|
|
|
|
|
Hi thank you for your response... and sorry for the delay (I had a very very long week-end ).
The problem is that I need to send data to the dialog (a new data every 10 msec approximatively). The dialog will then print this data on screen. So, if my dialog is called with DoModal, I cannot send anymore data to it and that's a problem. And I cannot get the data from within the dialog, it must be sent to it.
Any idea ?
Thanks
|
|
|
|
|
dear buddies
can some buddy help me out the problem that i am in . i am working on operating system project and i need a way how to get access to process handle table in kernal address space
ok
sunny
|
|
|
|
|
i wonder, how MSN detects network connection, not internet but network connection, after that it tries to login user.
interesting fact is that i specified wrong DNS and gateway, but MSN detected local area network and tried to connect to its server.
so may be it use some system notifications? what do you think? really it can help me a lot.
thank your, Mike.
|
|
|
|
|
I have changed the font on some of my CTreeCtrl items.
The thing is that, when changing the font to for e.g. bold the text (in WinXP anyway) becomes to wide so the last letters are missing in the text-drawing region. Anyone have encountered the same problem?
_____________________________
...and justice for all
APe
|
|
|
|
|
You get a similar problem if your PC uses large fonts and you run the prog on a PC with small fonts. The PC with the smal fonts has the text truncated, usually aparent if static controls
"An expert is a person who has made all the mistakes that can be made in a very narrow field." - Neils Bohr
|
|
|
|
|
Sum.. I can do nothing about it?
Except add some spaces att the end of the item text
_____________________________
...and justice for all
APe
|
|
|
|
|
I can't comment I can't remember ever having this problem on a tree control, sorry
"An expert is a person who has made all the mistakes that can be made in a very narrow field." - Neils Bohr
|
|
|
|
|
Put
SendMessage(CCM_SETVERSION, 5);
in OnInitialUpdate();
There's more to it than that, but that will get you started.
.............................
There's nothing like the sound of incoming rifle and mortar rounds to cure the blues. No matter how down you are, you take an active and immediate interest in life.
Fiat justitia, et ruat cælum
|
|
|
|
|
can any1 guide me in writing code which can detect the internet enabled programs on a machine. i need to know which are the programs on my machine that are accessing internet.
|
|
|
|
|
Hi,
I'm trying to setup Bluetooth communication between my PC and another bluetooth device.
The problem is that i don't want to do this from the bluetooth manager - i want to this directly from my application.
I tryed to use WSALookUpServiceBegin(),
WSALookUpServiceNext(),WSALookUpServiceEnd() but i allways get 3 "unresolved external simbol" Errors(yes,i've imported "ws2_32.lib" and included "winsock2.h" but it still refuse to work).
please,help me........
Regards,
Eli
|
|
|
|