|
Yes, you can use Find, ReverseFind, Left, Middle, Right and other methodes...
Just search a bit and choose what you want. Here[^] you have the msdn members list.
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
thanks dude
hi
|
|
|
|
|
You are welcome
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
|
|
Im using Setwindowpos of one dialog in another class.
if i use Setwindowpos,it shows arror.
I dont know how to get dialog handle.
My dailog class is CToolTab and id is IDD_TOOLBAR
I used
GetDlgItem(IDD_TOOLBAR)->SetWinowPos(.....
But fails.
Pls help me.
Anu
|
|
|
|
|
One possibility could be (calling the function inside your dialog, maybe when showing up):
CSomeDialog::SomeMethod()
{
HANDLE p_Dlg = GetDlgItem((HANDLE)this, IDC_YOURDIALOG);
}
afterwards you can give the handle to be used in other place.
Forget it. I choose false example from the net. Thanks for correction Stephen
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
modified on Thursday, January 21, 2010 4:43 AM
|
|
|
|
|
Nelek wrote: CSomeDialog::SomeMethod()
{
HANDLE p_Dlg = GetDlgItem((HANDLE)this, IDC_YOURDIALOG);
//...
}
This code is flawed:
GetDlgItem 's first parameter is a HWND , not a HANDLE . Your code will give a compiler error.- Even is the code was modified to look like the following, it would still be wrong:
HWND p_Dlg = GetDlgItem((HWND)this, IDC_YOURDIALOG);
Using what in this case is essentially a reinterpret_cast doesn't make a pointer a HWND . The cast just tells the compiler that although it knows a pointer isn't a HWND and would normally not normally compile code that incorrectly assumes it is, that in this case it should just shut-up and plough on.
Steve
|
|
|
|
|
Hmmm, thanks for the info.
I'll wrap the answer.
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
if u have pointer of dialog, then
CWnd *pWnd=NULL;
HWND hWnd= m_pDlg->GetSafeHwnd();
pWnd=FromHandle(hWnd);
Regards,
Srinivas
|
|
|
|
|
pWnd valure returns as Undefined Value.
Anu
|
|
|
|
|
might be pointer of dialog box is wrong. try out same way.
Regards,
Srinivas
|
|
|
|
|
|
Could you please post you code snippet?
|
|
|
|
|
Anu_Bala wrote: Im using Setwindowpos of one dialog in another class.
GetDlgItem() returns a handle to a sub item within a Dialog, not to a Dialog window. It is much better to do this in the Dialog itself, when you handle the WM_INITDIALOG message.
MVP 2010 - are they mad?
|
|
|
|
|
Anu_Bala wrote: if i use Setwindowpos,it shows arror.
I'm having a hard time seeing the error from here. Could you please post it?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi,
I am an ISO file which run when I drag and drop on a shortcut of a .bat file.
The batch file call exe with some parameter.
I tried to run exe through ShellExecute with parameter but not able to run the full application.
How can I determine that what and how is happening when I drop ISO file over shortcut of batch file.
|
|
|
|
|
Try using ProcessExplorer[^] to figure out the exact command line parameters passed to the executable file that the batch file spawns. You might as well want to open and see the code within the batch file.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
I could not get help from ProcessExplorer.
|
|
|
|
|
Hello again everyone,
I am posting this after a long night of research. Hopefully when I wake up I can begin to take whatever helpful information replied to this message and continue onwards.
My goal is to be able to read information from devices, and in this example my Network Interface Card.
I want to learn how to do this in C++ which is why I posted here instead of the Hardware and Devices section.
So what am I asking for? A good reference on where to start with reading information from hardware devices.
Once again thank you all in advance for pointing me in the right direction. This web site has been nothing but helpful to me and I learn something new every time I browse around.
V/R
Rob
|
|
|
|
|
You could find the MAC address by calling GetAdaptersInfo()[^]
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
rbwest86 wrote: ...reading information from hardware devices.
This is a bit vague. What exactly are you looking for?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Thanks for all to who responded. To answer your question, I am looking to retrieve any and all information if possible from any hardware device. This is a way for me to learn how to tap into the fingerprint of hardware devices such as (NIC)'s.
All for learning experience. I am taking a Networking class and want to make a simple program which can retrieve information from the (NIC) or entire network.
|
|
|
|
|
It's a broad subject. Some examples are here and here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Depending on what kind of information about hardware you're looking for, you could always use WMI[^]
Judy
Be wary of strong drink. It can make you shoot at tax collectors - and miss.
Lazarus Long, "Time Enough For Love" by Robert A. Heinlein
|
|
|
|