|
|
why u have used negative values in the code? it is a 2d cordinate, and starting from 0,0 values.
pls change the code with positive values and check it
SaRath.
"Don't Do Different things... Do Things Differently..."
|
|
|
|
|
See here maybe it is some helpful to you
<br />
PRINTDLG pd;<br />
DOCINFO di;<br />
memset((void *)&pd, 0,sizeof(PRINTDLG));<br />
pd.lStructSize = sizeof(PRINTDLG);<br />
pd.hwndOwner = this->m_hWnd;<br />
pd.Flags =PD_RETURNDC|PD_ENABLESETUPTEMPLATE;<br />
pd.hInstance = NULL;<br />
pd.nMaxPage=1;<br />
pd.nMinPage=1;<br />
pd.nCopies=1;<br />
pd.hDevMode=0;<br />
pd.nFromPage=1;<br />
pd.nToPage=1;<br />
PrintDlg(&pd);<br />
<br />
di.cbSize = sizeof(DOCINFO);<br />
di.lpszDocName = "Test";<br />
di.lpszOutput = NULL;<br />
StartDoc (pd.hDC, &di);<br />
CImage m_Image;<br />
m_Image.Load("C:\\0.bmp");<br />
m_Image.BitBlt(pd.hDC,0,0,640,480,0,0,SRCCOPY);<br />
EndDoc (pd.hDC);<br />
whitesky
|
|
|
|
|
includeh10 wrote: [Message Deleted]
[Click for User Profile] includeh10
Anyway why have you deleted the message?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
You can see message in next Here[^]
whitesky
|
|
|
|
|
Is there any option to not have the compiler initialize variables to zero in debug builds?
(I'm using VC++ 6)
- thanks
|
|
|
|
|
as off now my information is the compiler initialize the variabe with a valueu 0xcccccccc in debug build.
SaRath.
"Don't Do Different things... Do Things Differently..."
|
|
|
|
|
Global variables are always zero initialised. As someone else mentioned, local variables are initialised to 0xCCCCCCCC in debug builds but left as is in release builds. Look into the /GZ compiler switch. Removing it stops locals from being initialised with 0xCCCCCCCC. I use MSVC6 so you might want to check that nothing has changes if you use a later version.
Steve
|
|
|
|
|
Hello everyone.
I need the source code of Fast Furie transform.
If you have it, please give to me.
Thank you.
|
|
|
|
|
|
I am developing a serch application. I want to it to have a "Simple" option and an "Advanced" option. When I press the Simple button I want some options to disapear (which I can do) and the form to get smaller (reduce Height only).
I need help with code for making the form smaller. I have tried using the MSDN site examples, but Visual Studio 2005 doesn't recognize:
Form1.Height = 145
It says I need aditional information (System.Windows. etc.)
Hengy
I like Pie
|
|
|
|
|
Try posting your question in the C# forum[^].
Software Zen: delete this;
|
|
|
|
|
Hi,
I have developed a small video file player. I'm currently using a simple dialog to render the video.
I would like to skin this dialog to give it a different look & feel (with proper play/stop/fwd/... buttons),
what do I need to know in order to achieve this?
Are there any up to date tutorials that demonstrate this somewhere?
I'm using VC++ NET 2003.
I also know how to use Photoshop (for the graphics files)
Please advise,
Thanks.
-- modified at 20:06 Saturday 3rd June, 2006
|
|
|
|
|
maybe it is some helpful to you Here[^]
whitesky
|
|
|
|
|
I have found some rather strange behaviour with GDI calls when used with an memory HDC. If you create the HDC, associate it with a 32 bit DIB i.e. BGRA channels, then initialize the DIB memory to have 0xFF set for all the alpha values, and then use GDI calls like Rectangle/Ellipse/Polygon, etc, the alpha values will get overwritten! They will always be reset back to 0! Is this by design? Is there a workaround?
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
|
|
|
|
|
I would expect this is probably by design since RGBQUAD has the same ordering (assuming the reserved byte is alpha in RGBQUAD) as the GDI+ Color object. I would also suspect that your Red and Blue components are switched since GDI uses COLORREF.
I like to embed my ARGB Color objects into COLORREF structures so I can easily serialize them with CArchive. However, I must be careful as the Red and Blue are switched so I can't use them directly in GDI calls without bit shifting them around. The alpha always gets lost if I use the RGB macros on them so I'm guessing the GDI calls for LineTo, Rectangle, Ellipse use those macros internally which should strip off any alpha that was inserted in the structure.
I'm curious to see if your Red and blue are switched as this would further confirm my suspicion. If not, my theory is bust methinks.
For what it's worth
-- modified at 20:42 Saturday 3rd June, 2006
Oops. I got myself mixed up. Scratch what I said about the MACROS as that didn't quite make any sense now that I reread it while reading your reply. The alpha gets removed using
COLORREF colorRGB=colorARGB.ToCOLORREF();
instead of
COLORREF colorRGB=Color::MakeARGB(255,255,0,0);
I need to get some sleep
One thing that catches my attention is the alpha value. I'm used to 0xFF being completely opaque while 0x00 being transparent.
|
|
|
|
|
No the red and blue colors seem fine - it's just the alpha values that get overwritten. What surprising is that ALL the values get overwritten. So if I have an image of 500 X 500 pixels and only draw a rect at 10, 10, 20, 20, all alpha values get stripped to 0 for the whole image, not just the affected area.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
|
|
|
|
|
Can any one tell me how can i get a good tutorial about WinFX.
I want to study either WinFX or Win32.What should i select.
aLi
|
|
|
|
|
|
Function AlphaBlend didn't worked in my project, but when I added "msimg32.lib" in compilator settings (project/settings/link --> "object/library modules") it stardet working fine.
But there's another problem:
constant AC_SRC_ALPHA from structure BLENDFUNCTION is unknown. Compilator throws this error:
error C2065: 'AC_SRC_ALPHA' : undeclared identifier
Can you help me?
~~~~
|
|
|
|
|
You probably need to download the platform SDK. In addition, you'll need to make sure the platform SDK headers are getting picked up. If you using Visual C++ 6, then you need to go to Tools > Options click on the Directories tab, select Include Dirs, and make sure that the path to the Platform SDK includes are FIRST, before the rest of the headers.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
|
|
|
|
|
Whats your application type?
whitesky
|
|
|
|
|
It's MDI, and I'm using Visual C++ 6.0.
~~~~
|
|
|
|
|
hallo
is anybody out there who has used the OSK.EXE inside W2K or XP to communicate with a C/C++-program. the question is not to start/end this application but how to communicate with it char by char.
Any idea ?
best regards
simon
|
|
|
|
|
I am a C# devoloper. I want to ask whether it is good to learn C++/MFC since now most application are always devoloped using C#/VB.Net.
aLi
|
|
|
|