|
HANDLE hDev;
HWND hWnd;
COMMCONFIG cfg;
DWORD dwSize = sizeof(cfg);
GetCommConfig(hDev, &cfg, &dwSize);
CommConfigDialog("name of device", hWnd, &cfg);
|
|
|
|
|
Brilliant cheers
my next question is about the pointer to the window hWnd. How can I get a pointer to whichever dialogue creates an instance of my serial port class? e.g. I have a communications dialogue and I want to get a handle to this but using my serial port class, but make it flexible so that it is not restricted to one dialogue?
Thanks
Andrew
|
|
|
|
|
It would be up to the class that creates an instance of your serial port class to provide a pointer to its window. Your serial port class cannot "reach out" and get this.
|
|
|
|
|
Ok, so the Dialogue class could pass it's own pointer if I defined the interface to the config dialogue as something like
CComPort port;
port.config(hWndDialogue)
but how do I get the handle to the dialogue window? THis is what I meant really in the first place, I thought about using GetParent on the Config dialogue , but I can't because I need to create it first! Sorry if this is a stupid question. Hope you can help
Andy
|
|
|
|
|
andyg.101 wrote:
CComPort port;port.config(hWndDialogue)
but how do I get the handle to the dialogue window?
hWndDialogue IS the handle to the dialog window. I'm assuming this only because you are using a variable-naming convention where 'h' most likely means handle.
|
|
|
|
|
ok, I have worked out that I needed to use the m_hWnd member of my dialogue doh! i.e. pass
port.config(m_hWnd);
How can i find out what member variables are in a class heirarchy? The base classes viewer seems to only show functions?
Andy
|
|
|
|
|
Not sure. Are you talking about the ClassView tab in the Workspace window? I've never known it to NOT show all members of a class.
|
|
|
|
|
Yes the class view shows the members you declare in your derived class, but I don't think it shows the member variables in the base classes i.e. CWnd member variables.
Andy
|
|
|
|
|
Nor would you want it to. The Workspace window would be way too crowded then. Intellisense, however, will show you the complete list of whatever object you happen to be working on.
|
|
|
|
|
Thanks for all the help
|
|
|
|
|
Hi to all,
Is there any API to find out the current FileSystem (FAT, FAT32, NTFS) of given hard drive partition (ie. C:, D
Or any alternatives to find FileSystem ?
Thanks in Advance.
Rohit
|
|
|
|
|
check out this msdn article: click[^]
|
|
|
|
|
i think GetVolumeInformation could help you.
"Now I guess I'll sit back and watch people misinterpret what I just said......"
Christian Graus At The Soapbox
[^]
|
|
|
|
|
how to write the application to enable and disable PCI interface's NIC(Network Interface Card)using the VC++ to coding.
TKS....NEIL
neilchuang
|
|
|
|
|
Hello! I have a problem. I want to know how to access CD-ROM device and read data from cd-rom in Windows NT. I know it a little. Can you help me? Thanks.
|
|
|
|
|
|
Hi wheregone:
Thanks a lot. You are so nice. I have downloaded it. It seems perfect. Maybe I bother you someday.
welcome to meet you!
|
|
|
|
|
Sorry! I can't get source code. So I don't know how it is implement.
welcome to meet you!
|
|
|
|
|
Although I am not very versed in that topic, what kind of "data" do you mean?
Are you trying to read the RAW CD-Rom data, audio or just the files in the disk's standard file system that can be accessed by Windows itself, for example?
For the third case, have a look at CFile, CArchive, CStdioFile, ... in the MSDN. Maybe Windows just handles the files as if they were on a hard disk, but only write protected.
|
|
|
|
|
Hi,
I am trying to generate a .h file from an idl file.
For this I am using Microsoft's MIDL Compiler.
I gave the following command:
midl myIDl.idl /h myh.h
But when I run the command line exe, it gives me an error message saying:
midl : command line error MIDL1001 : cannot open input file oaidl.idl
can anyone help ????
thanks
simon
|
|
|
|
|
hi,
i cant find any examples on CodeProject or on MSDN, so does anyone know if/how to display pictures or icons along with text inside of a combobox?
Thanks
|
|
|
|
|
Check out CComboBoxEx. This may not do exactly what you want, but it is a good example to adapt.
Iain.
|
|
|
|
|
Or, you could do it the old-fashioned way via ownerdraw.
onwards and upwards...
|
|
|
|
|
hi,
i want to use the GetWindowModuleFileName-function.
but i always get the error undeclared identifier.
yes, i linked the user32.lib
i included the windows.h
does anybody have the same problem or a solution
operating system is windows xp professional service pack 1
regards
emmi
|
|
|
|
|
Make sure WINVER is #define'd to be 0x0500 or higher before including "windows.h"
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|