|
GetCurSel returns the current selection index. So you go m_List.DeleteString(m_List.GetCurSel());
Christian
I've learned that you cannot make someone love you. All you can do is stalk them and hope they panic and give in.
The early bird may get the worm, but it's the second mouse that gets the cheese.
|
|
|
|
|
If your going to make this like you are why don't you do it in QBASIC. It would be so simple you could finish it in a few minutes. If you want I can help you do it in QBASIC, E-MAIL me @ rcdude10tc3@aol.com, c ya
Justin
|
|
|
|
|
1) You haven't told us what you want help for.
2) This looks like a school homework assignment. I have a real problem finishing someone's homework for them. If this is an incorrect assumption, I'll apologize now, but I don't want to see CodeProject become a haven for folks too lazy to learn how to do stuff on their own (when it's necessary for them to do so).
|
|
|
|
|
Well, don't you think asking specific questions would get you a specific answer a lot freakin faster? If you cop an attitude, you'll get attitude back.
[attitude]
Go somewhere else if you want someone to finish your homework assignment for you. I have a idea, go ask your instructor.
[/attitude]
yawn...
|
|
|
|
|
This is clearly a homework request. Nobody would write a new app in the 21st century that requires the Enter key to be pressed to step through a list of entries.
|
|
|
|
|
A hint for posting code on CP forums.
this method preserves all the < and > brackets, and all the code in between them.
1.) In VC IDE highlight the code you wish to post.
2.) copy the code to the clipboard (menu : Edit | Copy, Keyboard Ctrl + c)
3.) start Microsoft FrontPage Express
4.) in MS FPX, paste your code (menu : Edit | Paste, keyboard Ctrl + v)
5.) edit your message in MS FPX
6.) select menu item View | HTML, a window will popup containing the HTML text of your message.
7.) highlight all the text between the lines <body bgcolor="FFFFFF"> and </body>. Do not include these lines. This is your message.
8.) press ctrl + c (copy to the clipboard)
9.) in Code Project's submission edit box, press ctrl + v
now your submitted code will contain all the < and > brackets. it just makes it a lot easier for others to now what your actual code is, what header files are included, ect.
and please use the Preview button to make sure the code you submit is the code you want to submit.
---
Multitasking: Screwing up several things at once.
|
|
|
|
|
I have a small problem , Please help me !!!
This is my code:
-----------------------------------------
void CTestDlg::OnOK()
{
// TODO: Add extra validation here
m_edit1 = "22222222222"; //CString תיבת טקסט מסוג
UpdateData(false);
Sleep(3000);
m_edit1 = "1111111111";
UpdateData(false);
//CDialog::OnOK();
}
--------------------------------------
Why the first message ("222222222") dont apear in the edit box when this program runs ???
miri
|
|
|
|
|
Because your program's thread is suspended in the Sleep() call. Windows don't just magically repaint, your thread and message pump have to be running.
--Mike--
http://home.inreach.com/mdunn/
Tables, ladders, chairs, OH MY!
|
|
|
|
|
I have a small problem , Please help me !!!
This is my code:
-----------------------------------------
void CTestDlg::OnOK()
{
// TODO: Add extra validation here
m_edit1 = "22222222222"; //CString תיבת טקסט מסוג
UpdateData(false);
Sleep(3000);
m_edit1 = "1111111111";
UpdateData(false);
//CDialog::OnOK();
}
--------------------------------------
Why the first message ("222222222") dont apear in the edit box when this program runs ???
miri
|
|
|
|
|
Sleep doesn't allow Windows messages to get through. You need to use something like a timer or a message pump function.
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Thank you very much on your answer.
Can you show me example how to use in timer ???
miri
|
|
|
|
|
You are going to need to capture the WM_TIMER message, in this function you perform whatever actions you require to happen at a set interval. The message is started by a call to SetTimer and finished with a call to KillTimer.
SetTimer(1, 100, NULL);
KillTimer(1);
void CMyDlg::OnTimer(UINT nIDEvent)
{
CDialog::OnTimer(nIDEvent);
}
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|
|
Thank you very much But I dont success.
I need only one waiting of a few minutes between the first two lines:
//////////////////
m_edit1 = "22222222222"; //CString תיבת טקסט מסוג
UpdateData(false);
///////////////////
to the last two lines:
//////////////
m_edit1 = "1111111111";
UpdateData(false);
///////////
Can you shoe me exactly how to do it ???????
/////////////////////// thanks
miri
|
|
|
|
|
CEdit* pText = (CEdit*)GetDlgItem(IDC_TEXT);
pText->SetWindowText("22222222222");
pText->UpdateWindow();
UpdateData(FALSE);
Sleep(3000);
pText->SetWindowText("111111111111111111111111111");
pText->UpdateWindow();
UpdateData(FALSE);
Sleep(10000);
Carlos A. Antollini
|
|
|
|
|
Thank you !
This is wonderful !
But there ara one big problem
that after Sleep(10000)
the first text recived.
I want that the second text will remain
What can I do ???
thanks
miri
|
|
|
|
|
excuse me !
I found the problem.
that appened because I did not update the text box variable
that I intialized before .
Thank you very much on your answers !
miri
|
|
|
|
|
How can I to change a static picture(bitmap) from disible to visible and from visible to disible in the code(wich metod?) ???
Please help me !!!!!
miri
|
|
|
|
|
You just call the ShowWindow method of the corresponding CWnd, with parameter SW_SHOW or SW_HIDE.
The CWnd* can be retrieved by GetDlgItem(ID) or you subclass the ctrl with the classwizard.
Pseudocode is code to demonstrate a concept, not designed to be run.
Like certain Microsoft software.
|
|
|
|
|
thank you!
Can you show me example ?
I need to show a picture that defined as CStatic(bitmap)
and after a few minutes to hide it .
How doing it ???
miri
|
|
|
|
|
Here is my code...
CPen pen, pen1, pen2;
pen.CreatePen(PS_SOLID, 2, WHITE);
CDCPointer->SelectObject(&pen);
..*
..*
..*
pen1.CreatePen(PS_SOLID, 2, BLACK);
CDCPointer->SelectObject(&pen1);
..*
..*
..*
pen2.CreatePen(PS_SOLID, 2, RED);
CDCPointer->SelectObject(&pen2);
..*
..*
..*
When i compile it....there is an error message on the line of pen1.CreatePen..
"error C2668: 'CreatePen' :ambiguous call to overloaded functinn"
What is it?
|
|
|
|
|
It doesn't recognize the constants WHITE, BLACK, and RED.
|
|
|
|
|
I am having trouble getting a bitmap to display on a dialog. I've set the Picture Control in the window (Dialog) and set the Type property to Bitmap. I can get it to display a resource bitmap created in the editor and assigned to the control via the Image property. What I would like to do is have a dynamically drawn bmp displayed and updated as needed on this dialog. I know how to draw the bitmap just not how to get it thrown in to the Picture Control.
Thank you for your time
lp
|
|
|
|
|
there's a control called CBitmapCtrl over at www.codeguru.com
see how he did it
|
|
|
|
|
Thank you, I'll take a look.
lp
|
|
|
|
|
This should be easy, I've created a new VC++ 6 dialog based app with a single rich edit
control (and the standard OK/Cancel buttons).
I've added AfxInitRichEdit() to InitInstance() and a NM_SETFOCUS message handler using the Class Wizard.
The NM_SETFOCUS handler never fires?
Any Ideas?
|
|
|
|