|
cedric moonen wrote:
You seem very agile with your nose today
Nope, As you have lost control, i started using my hand again
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Hi,
You can also use WMI (Windows Management Intruments) objects for this monitoring. It provides all the features, in terms of objects. It is very is use and work.. Please check with MSDN with Win32_NetworkAdapterConfiguration section. IT will help you a lot..
Thanks & Regards
Gopalakrishnan
" Action without vision is only passing time,
Vision without action is merely day dreaming,
But vision with action can change the world "
- Words from Nelson Mandela
Thanks & Regards,
Gopalakrishnan
|
|
|
|
|
HI Gopal,
By Mistake, you a make post to wrong person!, Please post it again to right Guy.
Thanks
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I am sure a simple solution exists for this problem.
But for data enter and validation via an Edit Box, using the EN_KILLFOCUS event.
The problem is, unless I set the Multiline properity, when Enter is pressed the dialog will close.
Are they a way to have Enter work the same way as the Tab key to signal the end of data entry?
Currently have to Tab out of this control to do the processing.
Many thanks.
|
|
|
|
|
Set WANT RETURN property of Edit Box
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
If you set the Want Return properity, then still have to use the Tab key to move off that control.
If you just set the Want Return properity then dilog closes when Enter pressed.
Was just hoping to use Enter like the Tab key.
Any suggestions.
|
|
|
|
|
sweep123 wrote:
Any suggestions.
Sorry, I Interpreted your Question Wrong!, By the Way Mr. Nilesh already given the Answer
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
sweep123 wrote:
Was just hoping to use Enter like the Tab key.
don't know how you're gonna do this
Your problem is that the OK button is set to default button and when you press Enter button, automatically OnOk() is called.So override the OnOk handler
void CYourDlg::OnOk()
{
//OnOk();
}
if you only delete the OK button without doing what i wrote above it won't solve the problem.
But if you have already deleted the OK button , then one way to avoid this problem is to add an invisible button and set is as default.
"Go as far as you can see,and when you get there youll see further" - Unknown
|
|
|
|
|
Thanks for your Post, but do not understand what you mean adding an invisable button and set as default.
Yes I have deleted the OK button on the dialog as it's a modeless dialog.
More help please.
|
|
|
|
|
sweep123 wrote:
Thanks for your Post, but do not understand what you mean adding an invisable button and set as default.
simply add a button then in the properties window set the Visible checkbox to false and in the same window Mark the Default Button check box.
"Go as far as you can see,and when you get there youll see further" - Unknown
|
|
|
|
|
Ohh, you stilln't got the answer!.
Ok Handle OnOK() virtual function in your CDialog derived class and Comment Out any CDialog::OnOk() line.
i.e.
void YOURDIALOGCLASS::OnOk()
{
}
Now you dialog will not close on pressing ENTER key!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
The problem is I have deleted the OnOK() button.
|
|
|
|
|
sweep123 wrote:
The problem is I have deleted the OnOK() button.
No Problem, add a Button in your Dialog Box and Set it ID to IDOK
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
OK almost there!?!
Now have the Multiline and Want Return set to False, dialog stays open when Enter hit.
Now just need the action of the Enter key to Tab onto the next control (i.e. Enter acting like the Tab key to end data entry)
Do you know how to do that please.
Thanks.
|
|
|
|
|
Capture ENTER KEY PRESS using WM_KEYDOWN Message and Then using keybd_event Simulate Tab Key press
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I have added the OnKeyDown handler, but never enter it when I press a key.
I did add the Left Mouse button down, as a check and that too was never reached.
See part of the MESSAGE MAP
ON_WM_KEYDOWN()<br />
ON_WM_LBUTTONDOWN()<br />
END_MESSAGE_MAP()
Have I missed something out?
Also a bit unsure how to use keybd_event.
|
|
|
|
|
sweep123 wrote:
Have I missed something out?
Every Thing Seems to Correct, May be you have made mistake some where else, Could you send you src Code for checking!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Pressing 'Enter' would cause Dialog box's OnOk() to be called.
One possible work around would be to override the OnOk function in your dialog class and do not call the base class method.
<bold>- Nilesh
<italics>
"Reading made Don Quixote a gentleman. Believing what he read made him mad" -George Bernard Shaw
|
|
|
|
|
See here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
CProjectLDlg::CSkinDlg(CWnd* pParent /*=NULL*/)
: CDialog(CProjectLDlg::IDD, pParent)
{
m_hBmp=(HBITMAP)LoadImage(AfxGetApp()->m_hInstance,MAKEINTRESOURCE(IDB_MAIN),IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION);
m_hWndRgn=DIBToRgn(m_hBmp,0x00ff00,FALSE);
}
----------------------------------------------------------------------------
I coded in .NET 2003
but compiler has return this message.
Constructor initialiar list can use in constructor definition.
Plz resolve this problem
|
|
|
|
|
Keitaro21 wrote:
Constructor initialiar list can use in constructor definition.
I'm certain that's not the actual message - what's the eror number ? Is IDB_NAME a bitmap resource ? Which line is causing the error ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
Keitaro21 wrote:
CProjectLDlg::CSkinDlg(CWnd* pParent /*=NULL*/)
What's this ?? The error comes from there probably. For the definition of your class constructor, you have two different names for the class scope (CProjectLDlg) and for the constructor itself (CSkinDlg). I suppose it is not intended, so correct that and use the same name for both.
|
|
|
|
|
<br />
CProjectLDlg::CSkinDlg(CWnd* pParent )<br />
: CDialog(CProjectLDlg::IDD, pParent)<br />
{<br />
m_hBmp=(HBITMAP)LoadImage(AfxGetApp()->m_hInstance,MAKEINTRESOURCE(IDB_MAIN),IMAGE_BITMAP,0,0,LR_CREATEDIBSECTION);<br />
m_hWndRgn=DIBToRgn(m_hBmp,0x00ff00,FALSE);<br />
}<br />
this function is not a constructor. It's just a member function. The initializer list (see the bold code) is only legal in constructors.
Change CProjectLDlg::CSkinDlg to CProjectLDlg::CProjectLDlg . That should do the trick.
Behind every greak black man...
... is the police. - Conspiracy brother
Blog[^]
|
|
|
|
|
Thanks for reply my question ^^
|
|
|
|