|
How to get the data of a csv file ??
regards
Sonu
|
|
|
|
|
the target platform c:...xyz.dll does not match the current target platform
i am getting a error when i am executing a dialog based program which uses a dll that was developed in BC45 environment what does this error mean can any one help me
sudha
sudha
|
|
|
|
|
BC 4.5 uses BWCC.dll (16-bit one). Use Target to switch to 32-bit one OR rebuild Your broject by C++ Builder.
|
|
|
|
|
the target platform c:...xyz.dll does not match the current target platform
i am getting a error when i am executing a dialog based program which uses a dll that was developed in BC45 environment what does this error mean can any one help me
sudha
sudha
|
|
|
|
|
Subject :- Isn't there native support for PNG in Windows?
I've requoted my subject.
Christian and other GDI gurus...
This shocked me quite a bit.
I checked out the bitmap section on CP.
There are several classes available to display PNG files.
But I thought I should start from scratch and try and show a PNG first before I try to manipulate it.
Regards
GDI newbie Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Isn't there native support for PNG in Windows?
Using Win32 API? No.
You can probably work around this by fiddling with COM objects the Internet Explorer pollutes your system with, or you can use e.g. libpng [libpng.org]
/Mike
|
|
|
|
|
What's so special about PNG anyway?
What's wrong with JPG,BMP,GIF???
Why do people want PNG all of a sudden?
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
What's wrong with JPG,BMP,GIF???
JPG is complex and lossy.
BMP is basically a raw bit-dump, and as such the most bloated format you could use for off-line storage.
GIF is limited by evil patents.
PNG has no patent issues, has lossless compression and is just free.
Why do people want PNG all of a sudden?
All of a sudden? Well, one of the reasons could be that it has been a W3C standard (or was that "just" a recommendation?) for quite a few years now.
/Mike
|
|
|
|
|
Thanks for all that info.
The fact is right now I am in a sort of anti-PNG attitude for some personal-job-related reasons
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
|
Thanks MarkKuk
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Nish [BusterBoy] wrote:
What's wrong with JPG,BMP,GIF???
Why do people want PNG all of a sudden?
I dunno about png ( although a lot of people put it forward as a replacement for gif ), but Unisys own the patent to the compression used in gif, so any code that uses gif requires payment of royalties. That is what killed gif online.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
> Isn't there native support for PNG in Windows?
No (not directly in the Win32 SDK, GDI, or MFC), but there is in GDI+...
Peace!
-=- James.
|
|
|
|
|
not entirely true... the latest BITMAPINFOHEADER specs include the option of a PNG or JPG encoded data in addition to the old formats.
-c
Smaller Animals Software, Inc.
|
|
|
|
|
> not entirely true... the latest BITMAPINFOHEADER specs include the option of a
> PNG or JPG encoded data in addition to the old formats.
You are correct... For the in-memory representation of the images, but for loading and saving of PNG (or JPEG for that matter) files? My guess is that is what the OP meant by "native support": the ability to easily load and save a PNG file just as easily as calling "::LoadImage( <pathtobmpfile> ):.
I know that ImportImage(...) does, but that requires an add-on (DirectX/DirectAnimation) to Windows.
Peace!
-=- James.
|
|
|
|
|
Hi I would like to know if anybody can help me out here.
I want to create a transparent Image By Performing all operation on a Memory dc.
This Is what I have done so far and it works ..The only problem is that I do not know how to initialise the Bitmap which is selected into the memory DC
My current code is as folllows..
DrawTrans(CDC* pDC, COLORREF crColor)
{
COLORREF m_crWhite = RGB(255,255,255);
COLORREF m_crBlack = 0;
COLORREF crOldBack = pDC->SetBkColor(m_crWhite);
COLORREF crOldText = pDC->SetTextColor(m_crBlack);
COLORREF crOldBkMode = pDC->SetBkMode(TRANSPARENT);
// Create two memory dcs for the image and the mask
CDC dcTrans, dcImage;
CDC dcFinal;
CBitmap bmpFinal;
bmpFinal.CreateCompatibleBitmap(pDC,ImageWidth, nImageHeight);
dcFinal.CreateCompatibleDC(pDC);
dcImage.CreateCompatibleDC(pDC);
dcTrans.CreateCompatibleDC(pDC);
//m_PImageInfoData is structure contaiing
BITMAPINFO bmpInfo;
/*char* */ BYTE* pszData;
int nImageWidth = m_pImageInfoData->bmpInfo.bmiHeader.biWidth;
int nImageHeight = m_pImageInfoData->bmpInfo.bmiHeader.biHeight;
int nUsage = DIB_RGB_COLORS;
// Create the mask bitmap
CBitmap bitmapTrans, bitmapImage;
bitmapImage.CreateCompatibleBitmap(pDC, ImageWidth, nImageHeight);
bitmapTrans.CreateBitmap(nImageWidth, nImageHeight, 1, 1, NULL);
CBitmap* pOldBitmapImage = dcImage.SelectObject(&bitmapImage);
// Select the mask bitmap into the appropriate dc
CBitmap* pOldBitmapTrans = dcTrans.SelectObject(&bitmapTrans);
CBitmap *pOldBmp = dcFinal.SelectObject(&bmpFinal);
StretchDIBits(dcImage.GetSafeHdc(), 0, 0, nImageWidth, nImageHeight, 0, 0, nImageWidth, nImageHeight, m_pImageInfoData->pszData,
&(m_pImageInfoData->bmpInfo),
DIB_RGB_COLORS, SRCCOPY);
dcImage.SetBkColor(crColor);
// Build mask based on transparent colour
dcTrans.BitBlt(0, 0, nImageWidth, nImageHeight,
&dcImage,
0, 0, SRCCOPY);
dcFinal.StretchBlt(0, 0, nImageWidth, nImageHeight,
&dcImage,
0, 0,
nImageWidth, nImageHeight, SRCINVERT);
dcFinal.StretchBlt(0, 0, nImageWidth, nImageHeight,
&dcTrans,
0, 0, nImageWidth, nImageHeight,
SRCAND);
dcFinal.StretchBlt(0, 0, nImageWidth, nImageHeight,
&dcImage,
0, 0,
nImageWidth, nImageHeight,
SRCINVERT);
pDC->StretchBlt(0, 0, nImageWidth, nImageHeight,
&dcImage,
0, 0,
nImageWidth, nImageHeight,
SRCCOPY);
// Restore settings
dcTrans.SelectObject(pOldBitmapTrans);
dcImage.SelectObject(pOldBitmapImage);
dcFinal.SelectObject(pOldBmp);
bitmapTrans.DeleteObject();
bitmapImage.DeleteObject();
bmpFinal.DeleteObject();
pDC->SetBkMode(crOldBkMode);
pDC->SetTextColor(crOldText);
pDC->SetBkColor(crOldBack);
dcFinal.DeleteDC();
dcTrans.DeleteDC();
dcImage.DeleteDC();
This code works perfectly fine except for the garbage values that are displayed bcoz the Bitmap is not initialized...I would like to know what i can do to initialse the bitmap to NULL ...
Thanks ...
Clemence
|
|
|
|
|
I would like to know what i can do to initialse the bitmap to NULL
BitBlt and BLACKNESS.
/Mike
|
|
|
|
|
BOOL TransparentBlt(
HDC hdcDest, // handle to destination DC
int nXOriginDest, // x-coord of destination upper-left corner
int nYOriginDest, // y-coord of destination upper-left corner
int nWidthDest, // width of destination rectangle
int hHeightDest, // height of destination rectangle
HDC hdcSrc, // handle to source DC
int nXOriginSrc, // x-coord of source upper-left corner
int nYOriginSrc, // y-coord of source upper-left corner
int nWidthSrc, // width of source rectangle
int nHeightSrc, // height of source rectangle
UINT crTransparent // color to make transparent
);
------------------------------
©0d3 ©®4©k3® - That's me!
------------------------------
|
|
|
|
|
Doesn't work under Windows 95.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
hello,
Im not sure why but VS keeps locking up on me.
The following code Compiles,links and executes if it is a Win32 Console App:
DWORD dwHigh,dwLow;
__asm
{
rdtsc
mov dwLow, eax
mov dwHigh, edx
}
However if this is a windowed app, MFC app it will lock up at various times, while running cl.exe or while linking.
rdtsc moves the Time Stamp counter into the above registers
why does this lock VS up while compiling???
|
|
|
|
|
Please elaborate. Is it VC that is "locking up" on you, or is it the app that "will lock up at various times"? You state both alternatives, and somehow I find this hard to believe. What does "lock up" mean? Attach the debugger to your hung exe and see where it's hung.
Are you using a single or multi-CPU system? Remember that the TSC is CPU bound. Also keep in mind that you should serialize the CPU if doing any FP operations in proximity of this call (e.g. CPUID with EAX = 0).
/Mike
|
|
|
|
|
VS locks up on me as a stated.
Visual Studio itself "locks up" during compiling.
If i go to the task manager it states Visual sutdio is not responding . however it is using about 99% of the processor.
I guesse the compiler is in a loop but i dont understand how those three lines of code could put it in a loop.
As well as i stated. It will work perfect in a console only app.
Any type of windowed app.. MFC or just old win32 API will lock the COMPILER up.
Im not doing any floating point ops.
Basicly if i use the app wiard and make a generic MFC dialog app and i insert this code anywhere in the premade code. . InitDialog(), OnButton() where ever i put this code will lock VS up.
Im running an AMD 500 on XP home editition.. VS Enterprise. .with service packs.
|
|
|
|
|
i did try this on another machine. AMD 900. .
and it works fine. ..
guesse it something with the hardware. . or maybe i got to reinstall.
|
|
|
|
|
I want to do something (minimize to tray) when a user hits my window's standard normal Minimize button on the title bar of the window. How do I trap this minimize box and call my tray functions instead?
-Jason
nirgle.bitdevil.com
|
|
|
|
|
|