|
i2c wrote:
So can i use MC++ in place of C# with equal effectiveness.
I dare say that coding for .NET in C# is a bit more intuitive than coding in C++, and C# has a lot of built-in features like delegates and events, which makes it quite easier to get the job done in a hurry.
I'm not sure if you actually get any perfomance improvements by using MC++ as opposed to C# at all, because both are compiled to IL, so if there is a difference, then it should be caused by the effectiveness of the compiler.
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
Good point. Thanks for the advice.
I THINK C# WINS, SH*T!!!!!
To hit 3rd floors window you have to AIM for Higher window.
|
|
|
|
|
After Setting Extension name in the advanced options of appwizard after wards i wanted not to associate the extension name with my App I deleted the reg file and the entries from the registry ;and built the project all over again After that it is still associated with the file extension.
How do I can I undo this ??????
|
|
|
|
|
If you still have the project's .reg file (it might have a .rgs extension), look through it and see what registry keys/values were added.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
I Saw The Registry keys added and i deleted them, still no change after excuting the program the keys are recreated in the registry??????
|
|
|
|
|
What extension are we talking about here? What registry keys/values have you removed?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello,
In a window I play a video and I would like to make appear in the same time a listbox...
Could you tell me how to do that ?
Thanks a lot for help !
There is no way to happiness, happiness is the way !
|
|
|
|
|
Put the code that plays the video in a separate thread. After that thread is created, create the listbox. This will make the two events asynchronous.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello,
Finally I just put the Clip Children of my Dialog box at 'True' and it works well now...
thank you anyway David for your help and have a nice day,
alain
There is no way to happiness, happiness is the way !
|
|
|
|
|
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
|
|
|
|