|
Pratheep Kenny wrote: How can we use the SetDlgItemText( ); When you create a Edit box Dynamically?
CEdit* pDynEdit;
const CString csText = _T( "This is done through SetDlgItemText" );
SetDlgItemText( pDynEdit->GetDlgCtrlID(), csText );
|
|
|
|
|
or SetDlgItemText( IDC_MY, csText );
|
|
|
|
|
Last parameter of CEdit::Create() is control ID , you want to assign.
|
|
|
|
|
Pratheep Kenny wrote: some text in it, also dynamically
Place
#define IDC_EDIT1 301
HWND hWndEdit;
in your file where you are creating the window.
Create the edit window as:
hWndEdit=::CreateWindow ("EDIT","Hello",WS_CHILD|WS_VISIBLE|ES_MULTILINE,
0,0,100,20,m_hWnd ,
(HMENU)IDC_EDIT1,GetModuleHandle(NULL),0);
Now you can write:
SetDlgItemText (IDC_EDIT1,"_AnShUmAn_");
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Pratheep Kenny wrote: How can i set the control id?
You used an identifier when you created the control.
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I have developed an application and i want its exe should be executed as soon as my system starts, like a service.
Please help me.
Thank you.
KIRAN PINJARLA
|
|
|
|
|
create a shortcut of exe in the following location
C:\Documents and Settings\<username>\Start Menu\Programs\Startup
regrds,
Ashok
|
|
|
|
|
You won't be able to convert an .exe to service if that is not implemented to be a service.
maybe mentioned links might be helpful.
MSDN Ref[^]
Intro[^]
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
Do you want to run your app or you want to make service
|
|
|
|
|
I want my exe to be executed as soon as system strats.
Which way i can do it better?
Thank you.
KIRAN PINJARLA
|
|
|
|
|
If you to run your app you can use from Registry and for how to use i think i saw two classes on codeproject that are working with Registry you can see them,anyway you can wrok with registry functions its not hard
|
|
|
|
|
kiran.pinjarla wrote: I have developed an application and i want its exe should be executed as soon as my system starts, like a service.
If you want to start your application as soon as your system starts up...
Then make an entry for your application path in the following registry key...
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run .
Or else you will have to rewrite your exe to act as a service too.
|
|
|
|
|
Thank you so much for ur information.
Nibu babu thomas wrote: Or else you will have to rewrite your exe to act as a service too.
How can we do this?
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: How can we do this?
You should be watchful. Coz there are plenty of restrictions on services, so many of the windows related tasks won't work as smoothly as you would expect. Any way here[^] is a nice little article by Nishant Sivakumar which will get you started on windows services.
|
|
|
|
|
Thank you.
Nibu babu thomas wrote: Then make an entry for your application path in the following registry key...
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run.
How to do this programatically?
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: How to do this programatically?
Take a look at CRegKey . It's quite simple. Try by yourself.
|
|
|
|
|
Nibu babu thomas wrote: Take a look at CRegKey
Thank you so much.
Nibu babu thomas wrote: Try by yourself.
Sure.
KIRAN PINJARLA
|
|
|
|
|
kiran.pinjarla wrote: How to do this programatically?
RegOpenKey() , RegSetValueEx() , RegCloseKey() , ...
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
kiran.pinjarla wrote: I have developed an application and i want its exe should be executed as soon as my system starts, like a service.
Take a look at this article. Start Your Windows Programs From An NT Service[^]
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Hi!
Is there any way that I can configure print dialog to inform if printing is done successfully or not.
<bold>- Nilesh
<italics>"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
Hi,
Can you say How to convert a CString value to a char value.
Thanks in advance.
|
|
|
|
|
CString csStr("Test");
char* pbuff = csStr.GetBuffer(csStr.GetLength())
Rinu Raj
|
|
|
|
|
LPSTR GetBuffer(int;
KIRAN PINJARLA
|
|
|
|
|
Hi,
This link may be helpfull to u?
Look into this..
http://www.flounder.com/cstring.htm
regds,
Ashok
|
|
|
|
|
Two people have correctly told you how to get a char *, although neither told you that you need to call ReleaseBuffer() on the string when you're done with it. But if you want to access a single char from the string, you can use index notation to access one character at a time.
CString s("sucka");
char u = s[1];
This is assuming a non Unicode build, of course.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|