|
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.
|
|
|
|
|
Yes, this is the default however the user can edit the name to be any string
|
|
|
|
|
Hello All!
I want use function "SymSrvGetFileIndexes" in my project,
but it requires DbgHelp.dll version 6.3
I obtain DbgHelp.dll 6.3, by installing Debugging Tools for Windows.
But where can I get DbgHelp.lib and DbgHelp.h ????
help me please...
|
|
|
|
|
http://www.debuginfo.com/examples/dbghelpexamples.html[^]
1. Find the latest versions of DbgHelp.dll, DbgHelp.h and DbgHelp.lib files.
The latest versions of these files are always available with Debugging Tools for Windows[^] package. Download and install Debugging Tools for Windows (when installing, choose custom installation and install SDK).
2. Configure Visual Studio to find DbgHelp.h and DbgHelp.lib files.
These files are supplied with Visual Studio and Platform SDK, but it is necessary to use the latest files – the files that come with Debugging Tools for Windows. Thus it is necessary to configure Visual Studio include and library directories so that the latest files will be found first.
Use the following directories:
Include -> %DebuggingTools%\sdk\inc
Library -> %DebuggingTools%\sdk\lib\i386
--EricDV Sig---------
Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them.
- Laurence J. Peters
|
|
|
|
|
Thanks!
But now when I call function
SymbolServer("srv*D:\websymbols*", "ntoskrnl.pdb", &Id, Val1, Val2, path);
error C3861: 'SymbolServer': identifier not found, even with argument-dependent lookup
How to call SymbolServer???
in SDK it is described as:
<br />
The SymbolServer function is an entry point to the symbol server DLL.<br />
It is used to locate a symbol file.<br />
The PSYMBOLSERVERPROC type defines a pointer to this callback function.<br />
SymbolServer is a placeholder for the library-defined function name.<br />
<br />
BOOL CALLBACK SymbolServer(<br />
LPCSTR params,<br />
LPCSTR filename,<br />
PVOID id,<br />
DWORD two,<br />
DWORD three,<br />
LPSTR path<br />
);<br />
What I do wrong?
|
|
|
|
|
trying to create Bitmap object
Bitmap *backBitmap;
backBitmap=new Bitmap(GetSystemMetrics(SM_CXSCREEN),GetSystemMetrics(SM_CYSCREEN));//error C2660: 'Gdiplus::GdiplusBase::operator new' : function does not take 3 arguments
|
|
|
|
|
|
hi dear
i dont know how to use bitmap
can u tell me or send me code or example how to use bitmap in an application
Ashish Dogra
MCA
Noida
|
|
|
|
|
You can use
CBitmap or CImage or LoadImage or OleLoadPicture or
Graphics::DrawImage(...) Image::FromFile() or (i think example) CXImage in the codeproject
and...
whitesky
|
|
|
|