|
hi all,
i need good docs about jpeg format, i have to create my own file format for compressing bmp file based on jpeg.
all i have are poor jpeg docs from internet.
thanks for any link to better docs of jpeg format
cheers
includeh10
|
|
|
|
|
Try:
The Programmer's File Format Collection.
http://www.wotsit.org/[^]
* Don't wish it was easier, wish you were better! *
|
|
|
|
|
it looks useful.
thanks
includeh10
|
|
|
|
|
I forgot to mention yesterday, you can get latest info about JPEG from the organization's official site too:
http://www.jpeg.org[^]
* Don't wish it was easier, wish you were better! *
|
|
|
|
|
Can someone point me to an artical that shows you how to draw gradients on a DC?
|
|
|
|
|
Hi
Check GradientFill() on the Win32 API documentation.
Fabian
|
|
|
|
|
you can do follow:
void CBMSButton::GradientFillRect(HDC hDC, RECT& rc, COLORREF crLight, COLORREF crDark)
{
TRIVERTEX vert[2];
GRADIENT_RECT gRect;
vert [0].x = rc.left;
vert [0].y = rc.top;
vert [0].Red = GetRValue(crLight) << 8;
vert [0].Green = GetGValue(crLight) << 8;
vert [0].Blue = GetBValue(crLight) << 8;
vert [0].Alpha = 0x0000; // It's no use for GradientFill
vert [1].x = rc.right;
vert [1].y = rc.bottom;
vert [1].Red = GetRValue(crDark) << 8;
vert [1].Green = GetGValue(crDark) << 8;
vert [1].Blue = GetBValue(crDark) << 8;
vert [1].Alpha = 0x0000;
gRect.UpperLeft = 0;
gRect.LowerRight = 1;
GradientFill(hDC, vert, 2 , &gRect, 1, GRADIENT_FILL_RECT_V);
}
You must import library:
#pragma message(" Automatically linking with MSIMG32.LIB library")
#pragma comment(lib, "MSIMG32.LIB")
|
|
|
|
|
Hi Dear...Try this..
----------------------------------------
CRect rect,rcClient;
GetClientRect(rcClient);
rect = rcClient;
int r1=32,g1=108,b1=244; //Any start color
int r2=5,g2=55,b2=165; //Any stop color
for(int i=0;i<rect.width();i++)
{=""
="" int="" r,g,b;
="" r="r1" +="" (i="" *="" (r2-r1)="" rect.width());
="" g="g1" (g2-g1)="" b="b1" (b2-b1)="" pdc-="">FillSolidRect(i,0,1,rect.Height(),RGB(r,g,b));
}
-------------------------------------------
This is not mine code, I'm also user of this code...but work nice...
OK! Good Bye
---Sumit Kapoor--- sumit_kapoor1980@hotmail.com
|
|
|
|
|
yes, i found that artical earlier today, and i got it to work, but i had to put the code in the OnPaint overide
but there is one thing i dont get about this formula
r1 + (i * (r2-r1) / rect.Width());
i know what it does, and why its needed, but i dont understand how the writer came up with it.
|
|
|
|
|
Actually...
The writer do very nice thing in this code..
as u can see.. we ca make shading from any color to other in fix area.. this is only possible if we change color according to side of area..that is what he is doing..
change color but with eyes on area..
OK bye...
Never consider anything Impossible before trying to solve that..---Sumit Kapoor---
|
|
|
|
|
hi..
for loop in above code consider < as HTML TAG
so replace that with:
for(int i=0;i<rect.Width();i++)
---Sumit Kapoor---
|
|
|
|
|
|
Hi!
How can I create Controls in a CView Class ???
Please Help
MFG
RedDragon
Unix and C are the ultimate computer viruses.
Visit me: www.programming.info.ms
|
|
|
|
|
|
you can add any controls to CView with style WS_CHILD and the CView as its parent - the control can be CDialog also if use function Create() - not DoModal().
cheers
includeh10
|
|
|
|
|
Sounds like you need a CFormView instead.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I've solved the problem already. Thx to everyone
|
|
|
|
|
Sir,
I have developed an application using Win32.
Inside main(){
..
}
I have created a server socket and waiting to accept to connect.
How should I create an exe fom the command line.
It takes WS2_32.lib AS a parameter to give an exe.
Pls guide what can be command line parameters so that it can combine with the lib file to create exe..
|
|
|
|
|
You cannot link a library to an executable at runtime. How do you expect to compile the winsock library at runtime?
Kuphryn
|
|
|
|
|
my aim is ti likn the object file and the lib file to create the exe.
How should I go about this
|
|
|
|
|
kuphryn wrote:
You cannot link a library to an executable at runtime.
Sure you can. It's called explicit linking.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Correct. Explicit linking works for DLL. How about library?
Kuphryn
|
|
|
|
|
I think you can just give a #pragma directive like:
#pragma comment (lib, "ws2_32")
in your source code (It can be a common header file, like stdafx.h, if you're using MFC!)
With this directive, you will NOT require any command line parameters, or even to include the LIB/DLL file in your project settings. The compiler will pick up the LIB file and use it while compiling.
* Don't wish it was easier, wish you were better! *
|
|
|
|
|
I have Win32 console-based service app. I want to show its console for debugging purposes on the interactive user's desktop. How can I do this? I use AllocConsole to allocate a console in runtime.
Thanks,
Krishnan
|
|
|
|
|
Does the service output anything?
Kuphryn
|
|
|
|