|
Hi all of u
Can any one of u tell me how to lock the CD-ROM ????
Any c++ code or any idea???????
pl. help me.
|
|
|
|
|
I would use MCI. Send these 3 MCI strings:
open CDaudio alias cd sharable wait
set cd door locked wait
close cd wait This should lock the standard CD-ROM drive.
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
|
|
thanks Ted Ferenc
Pl. email the source it to me
|
|
|
|
|
plz send me the code my id :-- ddrano7@gmail.com
thanks
|
|
|
|
|
I'm rotating text using escapement parameter in CFont::CreateFont(). Text is geting rotated correctly, but for Arial font, it becomes Bold when it is rotated by either of 90, 180 or 270 degrees.
Do I need to do any thing more for making normal and rotated text look alike?
Here's the code-
font.CreateFont(m_propbyFontSize * 1.5 * 20, 0, nRotationAngle * 10, 0, nFontWeight, bIsItalic, bIsUnderline, bIsStrikeout, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_SWISS, m_propstrFontName);
This is important for me to fix ASAP.
Thanks in advance.
|
|
|
|
|
It doesn't change weight. If you print this on paper, you'll find that there is very little difference. There are two reasons. One is that the resolution of a screen is not particularly good. The other is that GDI can not rotate text very well. If it has to look better, try using GDI+, which does a far better job.
Hope this helps
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"
|
|
|
|
|
Thanks for your valuable inputs. Now-
What needs to be done to do the same using GDI+. I need this to work on Windows 2k properly.
What's the minimum changes Can I do in my existing code to get support of GDI+?
Few things that are happening are-
The problem in only with certain fonts.
Arial is one of the font that is showing this problem.
Times New Roman is working fine.
Print preview as well as prints seem to be same for both Normal and Rotated texts.
|
|
|
|
|
Dhirendra wrote:
What's the minimum changes Can I do in my existing code to get support of GDI+?
You need to include "gdiplus.h" and link to the library, call GdiplusStartup() before you use GDI+ and call GdiplusShutdown() when you finish. You can create a graphics context from a GDI HDC by using Graphics g(hDC) (or Graphics g(dc.GetSafeHdc()) if you're using MFC). After that, you can start drawing in GDI+ however you like.
Look at one of the tutorials to get you started.
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"
|
|
|
|
|
Hello,
whats the fastest formula/algorithm to determine if a number is a power of 2?
It's easy to check this in a while loop shifting the number 1 to the right and checking if it is 1, but perhaps there is a faster method?
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
if(x & (x-1))
{
}
else
{
}
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"
|
|
|
|
|
Cool, thanks!
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|
|
You're welcome
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"
|
|
|
|
|
That is just too neat.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Tim Smith wrote:
That is just too neat.
Having done a lot of embedded programming, I guess I've learnt a few things like that - every clock cycle is precious . I can't remember where I first got it from, but it's simplicty certainly stuck.
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"
|
|
|
|
|
I have two audio devices and I want to change the default (preferred) Sound Playback device from within my program, so without using the Sounds and Audio Devices Properties window from the control panel. Is there a function to do so?
Thanks
JC
|
|
|
|
|
i made a toolbar, that has a gradient effect (as in office2003) but now, the toolbaricons who are on the toolbar do not look cool on the gradientbackground, because they are not transparent!
that means i still see the gray color who surrounds the symbols. any idea how to solve this problem??? i really read a lot about the topic, but found no solution!
i also would manage to change this gray color to any other color (set it as background color)
but this does not help me, because my background has no fix color, its a gradient!
thanx for any help!!!!
andreas
|
|
|
|
|
|
hy, thanx for the link, unfortunately, when i compile this project and run it, the icons are not transparent, it looks excactly as in the project i worked.
i work with .NET2003 may this be the problem?
|
|
|
|
|
it was the maskcolor, now i changed it to RGB(192,192,192) and now it workes!
|
|
|
|
|
the code looks very complicated to me, isnt there a simpler solution for making a bitmap transparent?? i cant use this code!
|
|
|
|
|
HI Friends,
I am creating the Thread using CreateThread API. Also I have Message Loop inside the ThreadProc . But I dont know weather the Thread as message queue or not.It need to be created or it exists by default.
Vikram
|
|
|
|
|
Every thread has a message queue, but you will only be able to use messages if you set up a message loop:
BOOL bRet;
MSG msg;
while((bRet = GetMessage(&msg, NULL, 0, 0)) != 0)
{
if (bRet == -1)
{
}
else
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
} Or something similar
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"
|
|
|
|
|