|
As was suggested before you need to create a compatible bitmap. You also need to pass the dc from the paint DC to the CreateCompatibleDC function, not the other way around.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
hi, i made a program in MFC C++ 6 and want to put music in the background. is there an easy way to do this?
thanks,
til
|
|
|
|
|
|
hi all,
iv been programming in MFC (visual c++ 6) for a few months and i am confused at the difference between public, and protected code. Whats the point of putting public at the top of a section, or private. Please help
many thanks
til
|
|
|
|
|
Protected indictates that only member functions, friends, and derived classes can access the members of that class. Public indicates that the members of that class are accessible by all. Private indicates that only member functions and friends can access the members of that class.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
private keeps things from being utilized by other classes on accident, or maybe even another user if you plan to let someone else use your classes down the line.
Protected only allows access by derived classes, so it's private to itself and any of its children that are derived from it.
public is letting everyone have access, so that if you have a CEdit control object declared as public, another dialog or screen can access it.
If it's broken, I probably did it
bdiamond
|
|
|
|
|
Cheers guys, i appreciate it alot
til
|
|
|
|
|
I am using MFC, how would I go about finding and displaying all of the CD/DVD drives of the users computer? I have been looking around for articles, and have not found anything yet. Any help is appreciated.
-Dev578
|
|
|
|
|
Take a look at _getdrives() and GetDriveType() in MSDN.
There is also an example.
|
|
|
|
|
mmica wrote:
Take a look at _getdrives()...
This does not sound like a valid function. Are you sure it exists?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Yeah it does, many microsoft C api/functions starts with _ for some compatiblity issue.
Interviewer (me) : "Did you install Linux all my yourself?"
Candidate : "Yes i installed Linux all my yourself."
|
|
|
|
|
Have you seen the Enumdisk1 sample (article Q264203) on MSDN? It uses the Setup class GUID_DEVCLASS_DISKDRIVE GUID (4D36E967-E325-11CE-BFC1-08002BE10318 I think) to enumerate all the disk devices that are installed in the system.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
I have an application that currethly supports a socket connection but I want to add a Dialog to support setting up a Dial Up connection. What APIs can I use to do that ?
Thanks
|
|
|
|
|
Check out RasCreatePhonebookEntry() and the other RAS functions.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
You could use the WinInet API by importing them into your project [DllImport("wininet.dll")]. Interfaces like InternetGetConnectedState and InternetAutodial would probably be helpful - check the WinInet docs for details.
Cheers,
Lee.
Lee H Fuller
lee@fullerdata.com
|
|
|
|
|
Dundas Software has a free dialup MFC class which can be downloaded from here.
Ivor S. Sargoytchev
Dundas Software
|
|
|
|
|
Hi,
I have a weird problem in DCOM. Everything works fine until the network goes down. If after a short period of network failure, when the network connection is restored, and I do CoCreateInstanceEx again, that works ok too, however, now I can't get a QueryInterface to succeed to get an interface pointer. It fails with some RPC error in the HRESULT. This behavior is intermittant.
Pl. help.
Thanks,
nct_11
|
|
|
|
|
Is it possible/easy to convert MFC Doc / View App to a COM / DCOM server? What I want to do is to have an external application query my running MFC application for the status of several internal operations using COM.
John
|
|
|
|
|
Not easy thing to do, plus the mfc application may not be employing the best techniques for COM/DCOM application to work efficiently
Interviewer (me) : "Did you install Linux all my yourself?"
Candidate : "Yes i installed Linux all my yourself."
|
|
|
|
|
It may be easier to expose the data from your existing app via a pipe or socket, and then write a COM component that knows how to query that pipe/socket.
onwards and upwards...
|
|
|
|
|
I was thinking of that but it does not seem like a simple operation and it will require a lot of work to implement.
John
|
|
|
|
|
why use dcom?
just expose an interface and use a standard network protocol
?
"there is no spoon" biz stuff about me
|
|
|
|
|
Because to get the result I need to execute code on the application address space and return objects containing the result. This sounds very much what com does...
John
|
|
|
|
|
can u add code to the exiting app?
make it pipe data out in some form or another?
"there is no spoon" biz stuff about me
|
|
|
|