|
i am displying the integers in edit box by using SetDlgItemInt the output is overwritten but i want to display it in multiple lines like a sequence....plz n e budy help me out!!!!
|
|
|
|
|
I guess you didn't check the multiline property of the edit box to true in properties. Also set the "want return" property to true if you want that on pressing enter key the caret should move to the next line,
Also do remember, every time you set a new value to the edit box you need to take the existing values, append new value to it and then display it.
BTW why don't you use a LISTBOX
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thanx a lot, i m gona try it.... the reason not to use listBox is that it only takes string values, but i need to show integers
|
|
|
|
|
You just have to use a single line of code to convert an integer to a string. or use SetItemData[Listbox]. It's that simple
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
modified on Thursday, June 26, 2008 4:56 AM
|
|
|
|
|
Instead of textbox why dont you try listbox.
And if you have no choice then as anshuman said set all those properties
plus you cant use SetDlgItemInt in this case.
You have to take the string using GetWindowText(..) everytime you want to update then append the new string to it and call SetWindowText(..) again.
I hope it helps..
Regards,
Sandip.
|
|
|
|
|
thnx...i m not using listBOx coz it only deals with the string values...but i have to show integers as a result
|
|
|
|
|
Then in that case what you are trying with editbox can be implemented using strings only.
so as anshuman has already suggested using SetItemData with ListBox is good option.
Regards,
Sandip.
|
|
|
|
|
Can you convert intger to string and use of \n for editbox?
|
|
|
|
|
Hi all,
Just a simple question really, here is what I need to do I will open a key lets say the key is
Result = RegOpenKeyEx(HKEY_LOCAL_MACHINE, _("MainProgram1"), REG_OPTION_NON_VOLATILE,
KEY_ALL_ACCESS,&Regentry);
Then here is the part I am a bit confused, In MainProgram1 there are values such as ProgramVersion1, ProgramVersion2....-> Nth value. Now how can I automatically get the Data of each name and I also need to get the names of the values. I need to get if there is a ProgramVersion2 or something. Thing is the names are all ProgramVersion only the version number changes. Any ideas folks?
Thanks,
Jayjay
|
|
|
|
|
After opening the key with RegOpenKeyEx you can use
LONG RegEnumKeyEx(
HKEY hKey,
DWORD dwIndex,
LPTSTR lpName,
LPDWORD lpcName,
LPDWORD lpReserved,
LPTSTR lpClass,
LPDWORD lpcClass,
PFILETIME lpftLastWriteTime
);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
See here [^] for sample code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
Hi all,
How can Enable and Disable Menu item in SDI type application of MFC-VC++2005.There is Enable and disable propery is present in Menu Properties but i dont want to use it because it is manully enable and disable menu item.
i want to enable and disable requried menu item with using of function.
Please help me for this how can i do this.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
simply add ON_UPDATE_COMMAND_UI event handler for that menu item.
and disable menu item. like pCmdUI->Enable(FALSE);
For eg: in your view class in message map add:
ON_UPDATE_COMMAND_UI(ID_FILE_NEW,Test);
and define test as Test(CCmdUI* pCmdUI); in the header file.
in the cpp file for your view use
CMyView::Test(CCmdUI* pCmdUI){pCmdUI->Enable(false);}
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
It is so difficult to use single function for single Menu item.
I want to create a function where i can enable and disable more then one menu item.
Please tell about this.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
"_$h@nky_" wrote: It is so difficult to use single function for single Menu item
Then use ON_UPDATE_COMMAND_UI_RANGE[^].
Or use the wizard to create the code for the handlers...
Mark
|
|
|
|
|
Dear All,
SetLocalTime API is working fine in Win Mobile 5.0.But SetSystemTime is giving a time diff of eight hours ahead.I am working on Win Mobile 5.0 SDK platform.
Please help....
|
|
|
|
|
Arun John wrote: But SetSystemTime is giving a time diff of eight hours ahead
The SetSystemTime function sets the current system time and date. The system time is expressed in Coordinated Universal Time (UTC
Arun John wrote: SetLocalTime
The SetLocalTime function sets the current local time and date.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Please provide me a link to common exceptions that occurs in VC++ application
|
|
|
|
|
cant this[^]do it for you
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thnx for the suggestion, but I am looking for the actual link that has Good content about Exceptions which I couldn't find through google.
|
|
|
|
|
|
|
You are welcome!!
Rating the reply will tell answerers how much it was helpful to questioners
regards,
suman
--
"Programming is an art that fights back!"
|
|
|
|
|
Hi all,
I want to print a "(double quotation) mark in AfxMessage box.
How Can i do it???
|
|
|
|