|
Yeah I have the source. It is written in MFC.
"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg."
- Bjarne Stroustrup
|
|
|
|
|
Are you using IDispatch an based interface?
Steve
|
|
|
|
|
How to make an owner drwan Picture Box in ATL ( not using MFC support). My aim to make the picture transparent in the dialog.
I am using ATL composite control dialog. But in the Picture Control, there is no Owner draw property listed in Property Window. I manuall modified rc file and add SS_OWNERDRAW, But i am not gettiing the WM_DRAWITEM message....
I did try to set owner draw
::SetWindowLong( ::GetDlgItem( m_hWnd, IDC_STATIC_PIC ), GWL_STYLE, (::GetWindowLong(::GetDlgItem( m_hWnd, IDC_STATIC_PIC ), GWL_STYLE ) )| SS_OWNERDRAW );
also by SendDlgItemMessage()
Since the I am not getting WM_DRAWITEM to my ATL dialog, i cant do anything to make picture box the transparent.
Any suggestion , code are welcome
Thanks
|
|
|
|
|
hey..
i am learning activeX programming using VC6 ..i want to remove, from the property pages the tabs for stock properties e.g font,color etc.
how to do it?
thanks
|
|
|
|
|
i want to monitor the prediefined registry keys.
select one of the root reigistry directory then monitor tht root directory
display registry key name ,value and status, so how i can retrive these name value n status into list control.....
Plz Help me.....
|
|
|
|
|
Well, you could start by searching MSDN for the registry functions, or you could search CP for a registry helper/tutorial/library. Then maybe you could start reading what you find and learn how to use the registry.
What you are asking is very easy, a little too easy infact.
|
|
|
|
|
i searched MSDN.But ididnt find any registry function how i retrive key name send values
|
|
|
|
|
You can use RegEnumKeyEx to enumerate subkeys.
Use RegEnumValue to enumerate the values of a specific key.
Use RegNotifyChangeKeyValue for change notification.
Steve
|
|
|
|
|
Hi waldermort ,
(Do you find your answer?LNK2005)
please tell me why you said this is easy?
It's not easy because
example:
(I'm new to visuall c and then I have question similar to this)
well Is this easy for me?
|
|
|
|
|
WhiteSky wrote: (Do you find your answer?LNK2005)
Yes I found the answer to my LNK1169 thanks to the help of some better experienced forum users. Though I don't see how this relates to the OP's question.
OK, granted, the question may be a little difficult for some people. After all you need to be a brain surgeon to type in 'registry' to the MSDN search box. I stand by my answer in that the OP should search before posting, which if he had done he could either have tried the function and asked for help with his errors, or simply state that he does not understand them.
If you re-read my LNK1169 thread, I think you will find I had stated exactly what I had coded, how I had tried to fix and that I still couldn't understand why, hence my post. I did not simply write "I have a link error how can I fix it?".
|
|
|
|
|
|
See here.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
|
Hi. i have a edit box named as NAME and a OK button in a dialog box.initially when the dialog box is loaded the OK button will be disabled. when i enter a character in edit box the OK button shud be enabled. if the edit box is empty then OK button must be disabled.
Also i have one more edit box called as "location" which contains some text. as and when i type sumthing in "NAME" edit box,it shud be appended with text in "location" edit box.how do i do this and where shud i add the code.
pls help
Thanks
|
|
|
|
|
sudeep_br wrote: i have a edit box named as NAME and a OK button
Handle EN_CHANGE message for your edit box in your appplication..for reteriving value from edit box using GetWindowText api, based on it value either append it in location box using GetWindowText and SetWindowText or Disable the Edit Box using EnableWindow(...) if empty value has been entered
|
|
|
|
|
ThatsAlok wrote: Handle EN_CHANGE message for your edit box in your appplication..for reteriving value from edit box using GetWindowText api, based on it value either append it in location box using GetWindowText and SetWindowText or Disable the Edit Box using EnableWindow(...) if empty value has been entered
when i enter sum text in edit box the OK button is enabled but when i delete the entered text,the ok button shud be disabled again. how to do this?
ALSO
i have 2 radio buttons in a dialog box. i want to either of them to be checked(ie t shud be selected) when dialog box is first loaded. pls help.
Thanks
|
|
|
|
|
sudeep_br wrote: when i enter sum text in edit box the OK button is enabled but when i delete the entered text,the ok button shud be disabled again. how to do this?
same way after seeing the length of text disable with EnableWindow Api
|
|
|
|
|
Its better u read VC++ in 21 days
|
|
|
|
|
parichaybp wrote: Its better u read VC++ in 21 day
Nice book!
|
|
|
|
|
Something like:
void CMyDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_EDIT, m_edit);
DDX_Control(pDX, IDOK, m_ok);
}
BEGIN_MESSAGE_MAP(CMyDialog, CDialog)
ON_EN_CHANGE(IDC_EDIT, OnChange)
END_MESSAGE_MAP()
void CMyDialog::OnChange()
{
m_ok.EnableWindow(m_edit.GetWindowTextLength() > 0);
}
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: void CMyDialog::DoDataExchange(CDataExchange* pDX){ CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CMyDialog) DDX_Control(pDX, IDC_EDIT, m_edit); DDX_Control(pDX, IDOK, m_ok); //}}AFX_DATA_MAP} BEGIN_MESSAGE_MAP(CMyDialog, CDialog) //{{AFX_MSG_MAP(CMyDialog) ON_EN_CHANGE(IDC_EDIT, OnChange) //}}AFX_MSG_MAPEND_MESSAGE_MAP() void CMyDialog::OnChange() { m_ok.EnableWindow(m_edit.GetWindowTextLength() > 0);}
when i entered the above code i got the following error
" error C2039: 'GetWindowTextLengthA' : is not a member of 'CString'"
pls tell me the solution for this
Thanks
|
|
|
|
|
You should not be using a CString object for an edit control. Use CEdit instead.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: void CMyDialog::OnChange() { m_ok.EnableWindow(m_edit.GetWindowTextLength() > 0);}
I am getting this error "'GetWindowTextLengthA' : is not a member of 'CString'"
u suggested Cedit instead of Cstring for edit box but when i go to class wizard and then to member variable name i only have cstring as variable type option apart from int, bool etc. theres no option Cedit. what should i do?
Regards
|
|
|
|
|
sudeep_br wrote: ...but when i go to class wizard and then to member variable name i only have cstring as variable type option apart from int, bool etc. theres no option Cedit. what should i do?
Change the Category from Value to Control.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
hi all ,
i want to get the path for ping.exe which will be in \\Windows\\System32\\Ping.exe but i cant specify a particular drive(C,D...) because the OS can be installed in any drive.I need to get the exact path of ping.exe .
Please suggest me how do i look for it.
|
|
|
|