|
i want to know,that as i insert a edit box on dialog box
and 10 buttons .
now i want that when i press these 1-10 buttons(choose randmly or choose two buttons) then that will be appear on edit box
as i try this on one button value is stored at a time when i press second button the preivious value is replaced from edit box.
and plz tell me as value in edit bos is started from left side but i want to print them on right side as in the phone system
plzz............
Ashish Dogra
MCA
Noida
|
|
|
|
|
You need to insert numbers in editbox like 1234,yes?
whitesky
|
|
|
|
|
YA I WANT TO SDO THAT
Ashish Dogra
MCA
Noida
|
|
|
|
|
You can use SetWindowText and you need to save previous values
whitesky
|
|
|
|
|
how can i save previous values
can you tell me some example
Ashish Dogra
MCA
Noida
|
|
|
|
|
well one simple way is when you insert values to editbox 1
now you want to insert value 2 use CString str;GetWindowText(str);str.insert(srt.getlenght(),yourvalue);now you have 12 and again ...12345
I think its a simple way
whitesky
|
|
|
|
|
i want to insert values when i press buttons which have values 1-9
i dont add values manually
as i press button value on that button will be displayed on edit box
as in phone system
when we press buttons they appear on screen
Ashish Dogra
MCA
Noida
|
|
|
|
|
dont need to send mail you said your dialog box closed why?
whitesky
|
|
|
|
|
Implement simple way.
Take data from edit box in one variable attach what u supposed to attach after that and again use SetWindowText() using the variable.
The secret of life is not enjoyment
but education through experience.
- Swami Vivekananda.
|
|
|
|
|
ashish dogra wrote: as i try this on one button value is stored at a time when i press second button the preivious value is replaced from edit box.
then first take the value from the Edit box and append the number present on the button to that value.. i.e. if Control Variable associated with Edit box is m_EditBoxText;
Then here small listing for code to achieve same
CString str;
m_EditBoxText.GetWindowText(str);
// append you Button CLicked string, i.e. if he clicked on button with number 7
str+= "7";
// Set that number on Edit Box again!
m_EditBoxText.SetWindowText(str);
have look at this article tooo :- http://www.codersource.net/mfc_array_controls.aspx[^]
ashish dogra wrote: and plz tell me as value in edit bos is started from left side but i want to print them on right side as in the phone system
read documentation for CEditBox::ModifyStyle!
"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
Support CRY- Child Relief and You
|
|
|
|
|
thanks for your reply
but as i use this one i use this code in button but as i press button they dialog box closed
can you tell me how to handle it
Ashish Dogra
MCA
Noida
-- modified at 2:04 Friday 7th July, 2006
|
|
|
|
|
ashish dogra wrote: but as i use this one i use this code in button but as i press button they dialog box closed
are you calling CDialog::OnOk() or CDialog::OnCancel() aftarward!
"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
Support CRY- Child Re
|
|
|
|
|
thanks again
i have ten buttons and when i press any button i want that will display on edit box i dont call ok or cancel button
i create other buttons so when i press these number not displayed in edit box
Ashish Dogra
MCA
Noida
|
|
|
|
|
ashish dogra wrote: create other buttons so when i press these number not displayed in edit box
have you checked the link i mentioned in my post!
"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
Support CRY- Child Relief and You
|
|
|
|
|
thanks for your cooperation
but i still dont get my solution
i dont get the point where to put my code and how to get number on edit box
Ashish Dogra
MCA
Noida
|
|
|
|
|
ashish dogra wrote: i dont get the point where to put my code and how to get number on edit box
It Seems you are new to VC++!.. buddy you have to download that code and debug your self to reach your point... otherwise how will you learn!.. thats damm easy code!
"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
Support CRY- Child Relief and You
|
|
|
|
|
I have an application which is an automation server. Now while creating an Add-in for the application, I would like to trap the Application's Move and Size events so I can do some processing then. How do I hook into the Parent application's Window Procedure from the COM add-in and trap it WM_MOVE and WM_SIZE messages?
Any ideas?
---
Hakuna-Matada
It means no worries for the rest of your days...
It's our problem free, Philosophy
<marquee behavior="alternate" scrollamount="5" scrolldelay="50">
|
|
|
|
|
You are looking for the SetWindowsHookEx[^] function. You can use that function with WH_GETMESSAGE as the hook type to monitor all messages.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Thanks a lot.
---
Hakuna-Matada
It means no worries for the rest of your days...
It's our problem free, Philosophy
<marquee behavior="alternate" scrollamount="5" scrolldelay="50">
|
|
|
|
|
Hi,
How do I programatically find the ipaddress of a printer port connected to a particular printer driver ?
Added - If I have the port name how do I find out if the port is a 'Standard TCP/IP port' and once I have done that, how do I find the ipaddress ?
Kevin Keeler
-- modified at 9:36 Thursday 6th July, 2006
|
|
|
|
|
Use EnumPrinters() . If level is 5, look at the pPortName member of the returned structure.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Thanks,
but I did not make myself clear EnumPrinters gets the port names, but then how do I get from the port name to the IP address if the port is a Standard TCP/IP port? or even how do I find if it is a Standard TCP/IP port?
|
|
|
|
|
I have three networked printers configured on my machine. pPortName contained 192.168.200.11, 192.168.200.100, and 192.168.200.150 for them.
Kevin13 wrote: how do I find if it is a Standard TCP/IP port?
Use EnumPorts(NULL, 2, ...) .
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have just checked my printer and the pPortName contains IP_200.128.1.115. I then added another printer and port from control panel and specified the name of the port as 'A Test Port'. Then running the enumeration I got the original port ( IP_200.128.1.115 ) and the new one ( A Test Port ) returned as the pPortName.
Thanks EnumPorts does return the pMonitorName in the PORT_INFO_2 structure so now I have got half an answer.
Doing some more searching it looks as if I need to use 'TCPMON Xcv Commands' which seems to be sort of documented in the DDK.
|
|
|
|
|
The portname returned on our network for 'standard tcp/ip' always starts with IP_, so if this is returned strip of the IP_ and the rest is your IP address.
Hope this helps.
|
|
|
|