|
I wish I could help you but I don't know Javascripts. On the other hand, this is a C++ forum, so your question might not find an answer here. Please don't get offended by this.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Toni78 wrote:
I don't know Javascripts
I do, but I'm not going to help anyway. We don't really want to encourage posts in the wrong forum
Ryan "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"
|
|
|
|
|
I am sorry guys, I wrongly post to visual c++ forums.
anyway thanks
|
|
|
|
|
No problem . Have a nice day, or night or whatever it is there
Ryan "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"
|
|
|
|
|
Try the Web Development[^] forum
Ryan "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"
|
|
|
|
|
When I used the C++ builder's tool named coff2omf.exe to
transform the COFF lib to OMF lib ,I find that the former
204 k file has change to 512 byte.why??
a good man in china
|
|
|
|
|
What system calls under MFC do you need to make to determine how many colors are being used by the system?
I am trying to determine hoe many colors are being displayed with the current settings (ie the number of colors you pick when you right click on the desktop and select Properties...Settings...Colors)
I want to set the background color and font color for a dialog box, but only if the user is running at least 16 bit colors because it looks like crap on a 256 color display.
I'm going to live forever or die trying!
|
|
|
|
|
Create a device context and use GetDeviceCaps() .
CClientDC dc(NULL);
int bitdepth = dc.GetDeviceCaps(BITSPIXEL); This will return the number of bits per pixel the screen is currently using.
Hope this helps,
Ryan "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"
|
|
|
|
|
Crap! You beat me to it! (and using a much better method too. dammit!)
I prefer to wear gloves when using it, but that's merely a matter of personal hygiene
[Roger Wright on VB]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
[Rich Cook]
|
|
|
|
|
Actually your method is the correct one to use for multiple-monitor support.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
Atlantys wrote:
You beat me to it!
Don't you hate it when that happens
Ryan "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"
|
|
|
|
|
Super nice!
Thanks.
I had another question on this:
Is this bulletproof or is it a heuristic?
Is there no OS level call to get this information?
Just curious - your answer works perfectly.
I'm going to live forever or die trying!
|
|
|
|
|
It will always work for the primary display. If you are using multiple displays, you'll need to use EnumDisplaySettings() as pointed out in another answer. Use ENUM_CURRENT_SETTINGS to return the current settings. The dmBitsPixel member of the DEVMODE structure will give the number of bits per pixel:
DEVMODE dm;
dm.dmSize = sizeof(DEVMODE);
EnumDisplaySettings(lpszDeviceName, ENUM_CURRENT_SETTINGS, &dm); lpzsDeviceName is the name of the device (returned by EnumDisplayDevices() ), or NULL to use the primary device.
Hope this helps,
Ryan "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"
|
|
|
|
|
Ha! So, I was late, but I was more right! ;P (is that even possible? ) You were just more exact, providing example code.
I prefer to wear gloves when using it, but that's merely a matter of personal hygiene
[Roger Wright on VB]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
[Rich Cook]
|
|
|
|
|
Atlantys wrote:
Ha! So, I was late, but I was more right!
Rub it in, why don't ya!
Ryan "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"
|
|
|
|
|
Just padding my post count.
I prefer to wear gloves when using it, but that's merely a matter of personal hygiene
[Roger Wright on VB]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
[Rich Cook]
|
|
|
|
|
Atlantys wrote:
Just padding my post count.
I'm not even going to answer that.
Oh hold on a minute, I am... Doh!!
Ryan "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"
|
|
|
|
|
I've got to get to 1K somehow, eh?
I bet if we continued this, Chris'll probably not be too impressed. Then again, this thread is buried deep in some obscure forum.
:looks up, checks the forum title: "Visual C++":
Doh! :homerdoh:
(someday, Chris'll put in a homerdoh smiley... but I figure he's got enough of his plate already).
I prefer to wear gloves when using it, but that's merely a matter of personal hygiene
[Roger Wright on VB]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
[Rich Cook]
|
|
|
|
|
Ryan Binns wrote:
lpzsDeviceName is the name of the device (returned by EnumDisplayDevices()), or NULL to use the primary device.
You just answered another question I had - nameley what driver name do I use? I was looking at examples and they used device names of "Epson" and I was like Moe on the Simpsons when I saw that "HuuuuuuuuUUUUUUUUUHH?!?!?!?"
Many thanks (and to you to Atlantys)!
I'm going to live forever or die trying!
|
|
|
|
|
tnolley wrote:
You just answered another question I had
I love it when that happens
tnolley wrote:
any thanks
You're welcome
Ryan "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"
|
|
|
|
|
Try: EnumDisplaySettings, and check the dmBitsPerPel member of the DEVMODE structure.
It's all in the MSDN.
"dmBitsPerPel
Specifies the color resolution, in bits per pixel, of the display device (for example: 4 bits for 16 colors, 8 bits for 256 colors, or 16 bits for 65536 colors). Display drivers use this member, for example, in the ChangeDisplaySettings function."
HTH
I prefer to wear gloves when using it, but that's merely a matter of personal hygiene
[Roger Wright on VB]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
[Rich Cook]
|
|
|
|
|
Some guy here in codeproject (I don't remember who and I can't find the post either) posted the following link
http://download.microsoft.com/download/b/d/c/bdccea1b-96d9-4ad9-8045-56619af95835/qtr40enud1.img, which is the link for the 1st MSDN 2003 CD image file. As you can see the file has an img extension. There are three of these files and I downloaded the first one. There is no program in my computer that recognizes these image files. I thought that the CD-Writer software (Roxio Easy CD Creater) would take care of it, but it didn't. Can anyone help me with this problem? Can one tell me the link to the MSDN 2003 download site? I tried searching on MSDN but I could not find anything about downloading MSDN 2003. I am sure that there are directions there on how to proceed after you download these image files, but I can't find anything.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
Use Nero to burn the image. http://www.nero.com/en/[^]
Toni78 wrote:
Roxio Easy CD Creater
I prefer to wear gloves when using it, but that's merely a matter of personal hygiene
[Roger Wright on VB]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
[Rich Cook]
|
|
|
|
|
Nero, doesn't work either. It does not recognize the file format. Roxio Easy CD Creator and Nero are the only two CDW programs that I have access to. I checked the header of the file and it doesn't have any information on it at all. It's all zeros.
// Afterall, I realized that even my comment lines have bugs
When one cannot invent, one must at least improve (in bed).-My latest fortune cookie
|
|
|
|
|
That's weird!
I'm going to go ahead and use the ole programmer's saying: "It worked fine on my machine!"
I was able to burn the images easily. Sorry that I can't be any help
I prefer to wear gloves when using it, but that's merely a matter of personal hygiene
[Roger Wright on VB]
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
[Rich Cook]
|
|
|
|