|
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
|
|
|
|
|
Hi all,
i m using Beep and MessageBeep function to play a sound.
but both are not working in case of window server 2008.
here they not play any sound.
please help me for this.
explain me what can i do for this.
if any other function or method is possible please explain me.
thanks
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Le@rner wrote: not working
And what does that mean? The function doesn't succeed? In which case, have you tried checking the last error code by calling GetLastError() as the documentation states?
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
//for beep function
for(int i=750; i>100; i-=200)
Beep(i,50+i/5);
Beep( 150, 100 );
HRESULT lCode=GetLastError();
LPVOID lpMsgBuf;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL,
lCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPWSTR) &lpMsgBuf,0,NULL );
MessageBox((LPCTSTR)lpMsgBuf, _T("Error"), MB_OK | MB_ICONINFORMATION );
LocalFree( lpMsgBuf );
for MessageBeep function
MessageBeep(MB_ICONASTERISK);
HRESULT lCode=GetLastError();
LPVOID lpMsgBuf;
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL,
lCode, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPWSTR) &lpMsgBuf,0,NULL );
MessageBox((LPCTSTR)lpMsgBuf, _T("Error"), MB_OK | MB_ICONINFORMATION );
LocalFree( lpMsgBuf );
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Yeah, so the error states why the function failed.
I'll favour the other poster here. Like he asked: is it the same computer or a different one? If it's a different one, is there an audio device and the board has a speaker? (Do you see the volume control icon on the tray area?)
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Errr.... I'm really NOT trying to be a wiseass... but does the server have a speaker?
L u n a t i c F r i n g e
|
|
|
|
|
I thought it were the same box which ran XP and the Server OS. I'll be shocked if they were different and one doesn't have a speaker.
But how funnier can this it were the latter case.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
It just sounded like something I'd do. I have a machine here that doesn't have external speakers, and the motherboard doesnt have one either, so it can't give the happy little beep when it boots. (Or any other time.)
L u n a t i c F r i n g e
|
|
|
|
|
i test my sound card and attach new speakers ,now its working fine.
thanks.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Cool!
L u n a t i c F r i n g e
|
|
|
|