|
i am not able to use ::CommandLineToArgvW in EVC while the samething worked in VC . I have included the necessary shellapi.h and shell32.lib ,but am still getting errors like ,
error C2039: 'CommandLineToArgvW' : is not a member of '`global namespace''
error C2065: 'CommandLineToArgvW' : undeclared identifier
error C2440: 'initializing' : cannot convert from 'int' to 'unsigned short ** '
|
|
|
|
|
remove the prepended :: then
|
|
|
|
|
i tried removing :: too but only the globalnamespace error would be solved .
|
|
|
|
|
please show how you're calling it
|
|
|
|
|
i am getting INVALID_HANDLE_VALUE for the following code . can anyone help me ?
This wszFileName is passed as argument to a function B(which calls CreateFile ) from A ,which is being declared as WCHAR wszFileName[256] in the function A and wszFileName is of type wchar_t* in function B.
HANDLE hFile = CreateFile(wszFileName, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, 0, NULL);
-- modified at 6:36 Tuesday 27th March, 2007
|
|
|
|
|
toxcct wrote: please show how you're calling it
She is using EVC, where this function is not present. Already asked in the morning from same user/id[^] .
|
|
|
|
|
prasad_som wrote: Already asked in the morning
yes, i've just saw your reply sorry for that, i've been absent for a while (since friday !!! lol).
|
|
|
|
|
sheela Rajaram wrote: which is being declared as TCHAR wszFileName[256]
this is not your solution, but what you do here is wrong. it should be an array of WCHAR, not TCHAR (ok, this is the same is unicode is defined in your project, but the purpose of these is to avoid wondering which build is currently done)
|
|
|
|
|
int numArgs*;
wchar_t** szArglist =CommandLineToArgvW( ::GetCommandLineW(), &numArgs );
|
|
|
|
|
CommandLineToArgvW is not supported on WinCE , which I mentioned in previous reply. Why dont you look alternatives for that platform ?
|
|
|
|
|
|
Are you and Harshada[^] working on same assignment, or are same person ?
|
|
|
|
|
|
Then how come same question is asked by two different people, with same scenarios ?
|
|
|
|
|
i have a kind of tiff image,but it only can use GDI+ open it.And the traditional methods of open tiff image can not open it,photo neither.
so i use notepad open it ,then i saw this at the head
II* H WANG TIFF 0 Title: Author: Subject: Keywords: Comments: ? ?
D ,i 1 D h 4 < % ( 1 D , , Oi/GFS, writer v00.06.01P ?
I never saw a tiff image like this, what is it???
-- modified at 5:21 Tuesday 27th March, 2007
|
|
|
|
|
Wang has extended TIFF tags but what is the problem here?
What are the "traditional methods of open tiff image" that don't work?
A properly implemented TIFF loader either understands the tags it needs and can open the image
or if it can't follow the tags then the format is unsupported or the TIFF image is malformed.
If GDI+ can open it then it's probably a valid TIFF image. If the format is not supported by
Photoshop then that's Adobe's problem.
What is your question?
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
my question is i do not want open with GDI+,and i want use the code which i programed. so i want know the tag format,then i can open it by my application.
|
|
|
|
|
Then you'll need to know the TIFF specification.
It's held by Adobe and can be found online here[^]
If you run in to problems just ask
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|
|
thanks mark, i will go there and find out the answer.
|
|
|
|
|
Hi everyone,
In an application I got an error mentioned below:
//////////////////////////////////////////////////////////////////////////////
Deleting intermediate files and output files for project 'DlinkCapture - Win32 Debug'.
--------------------Configuration: DecklinkCapture - Win32 Debug--------------------
Compiling resources...
Compiling...
stdafx.cpp
c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(119) : warning C4005: '_WIN32_WINDOWS' : macro redefinition
c:\documents and settings\ganesh.ganesh\desktop\samples-cap\dlink samples\samples\samples\dlinkcapture\stdafx.h(22) : see previous definition of '_WIN32_WINDOWS'
NOTE: WINVER has been defined as 0x0500 or greater which enables
Windows NT 5.0 and Windows 98 features. When these headers were released,
Windows NT 5.0 beta 1 and Windows 98 beta 2.1 were the current versions.
For this release when WINVER is defined as 0x0500 or greater, you can only
build beta or test applications. To build a retail application,
set WINVER to 0x0400 or visit http://www.microsoft.com/msdn/sdk
to see if retail Windows NT 5.0 or Windows 98 headers are available.
See the SDK release notes for more information.
c:\documents and settings\ganesh.ganesh\desktop\samples-cap\decklink samples\samples\samples\baseclasses\streams.h(180) : fatal error C1083: Cannot open include file: 'strsafe.h': No such file or directory
Error executing cl.exe.
DlinkCapture.exe - 1 error(s), 1 warning(s)
/////////////////////////////////////////////////////////////////////////////
to avoid this error I installed latest version of Platform SDK even that I am getting error mentioned below:
/////////////////////////////////////////////////////////////////////////////
Deleting intermediate files and output files for project 'DlinkCapture - Win32 Debug'.
--------------------Configuration: DecklinkCapture - Win32 Debug--------------------
Compiling resources...
Compiling...
stdafx.cpp
c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(119) : warning C4005: '_WIN32_WINDOWS' : macro redefinition
c:\documents and settings\ganesh.ganesh\desktop\samples-cap\dlink samples\samples\samples\dlinkcapture\stdafx.h(22) : see previous definition of '_WIN32_WINDOWS'
c:\program files\microsoft platform sdk for windows server 2003 r2\include\winnt.h(222) : error C2146: syntax error : missing ';' before identifier 'PVOID64'
c:\program files\microsoft platform sdk for windows server 2003 r2\include\winnt.h(222) : fatal error C1004: unexpected end of file found
Error executing cl.exe.
DlinkCapture.exe - 2 error(s), 1 warning(s)
/////////////////////////////////////////////////////////////////////////////
can anyone suggest me how to proceed further.
Looking forward for your help.
with regards,
ganesh
|
|
|
|
|
The version of the platform SDK is not necessarily compatible with VC6. The latest that MS recommend you use is FEB 2003, although I've also found that the XPSP2 update one works.
Steve S
Developer for hire
|
|
|
|
|
Thank you Steve, let me check with that and get back to you..
with regards,
ganesh
|
|
|
|
|
Hi,
I Select an Image on to a CompatibleDC .I get each Pixel and check to see whether Red,Green,Blue of that Pixel are same or not.If so I perform Some Operations and change the color of that Pixel Using SetPixel.
and then Finally I Stretchblt it on to my ClientDC.
HBITMAP hBmpObjSmpl = imgObjSample.GetBMP();
bmpSample.Attach(hBmpObjSmpl);
CDC dcMem;
dcMem.CreateCompatibleDC(pDC);
HBITMAP hOldBitmap=(HBITMAP)dcMem.SelectObject(bmpSample);
BITMAP bm;
bmpSample.GetBitmap(&bm);
for(int i=0;i < bm.bmWidth ; i++)
for(int j=0;j < bm.bmHeight ; j++)
{
COLORREF clr = dcMem.GetPixel(i,j);
int R = GetRValue(clr);
int G = GetGValue(clr);
int B = GetBValue(clr);
if( (R == G) && (G == B))
{
R = (R-nMaxRGB) + dblSampleRGB[0];
G = (G -nMaxRGB) + dblSampleRGB[1];
B = ( B -nMaxRGB ) + dblSampleRGB[2];
R=R*dblillumination;
G=G*dblillumination;
B=B*dblillumination;
if(R>255)
R=255;
if(R<0)
R=0;
if(G>255)
G=255;
if(G<0)
G=0;
if(B>255)
B=255;
if(B<0)
B=0;
dcMem.SetPixel(i,j,RGB(R,G,B));
}
}
pDC->SetStretchBltMode(HALFTONE);
pDC->StretchBlt(rcSample.left,rcSample.top,rcSample.right-rcSample.left,rcSample.bottom - rcSample.top,&dcMem,0,0,bm.bmWidth,bm.bmHeight,SRCCOPY);
dcMem.SelectObject((HBITMAP)hOldBitmap);
bmpSample.DeleteObject();
dcMem.DeleteDC();
As I need to Perform the same Operation 16 times in my OnPaint() to view the picture 16 times in 4x4 row matrix its becoming very slow.I could see each row painting and its taking around 3 secs .
Each time the Operation is Performed only these values dblSampleRGB[0],dblSampleRGB[1],dblSampleRGB[2] in code logic vary.
I want the whole OnPaint Operation to be Performed Instantaneously. So any suggetions to Optimize my code would be helpful.
Thanks
Satya
Today is a gift, that's why it is called the present.
|
|
|
|
|
narayanagvs wrote: So any suggetions to Optimize my code would be helpful.
I haven't gone through your code but I would like to suggest a memory bitmap.
Write a dedicated class called CMemDc and ask it to do the stuff for you. Search google with "Memory DC VC++".
Directly doing the drawing into this dc and dumping the drawing will help in reducing flicker. Saving this drawing will help further. But you will have to take care of other things.
These are some quick suggestions.
|
|
|
|
|
Using GetPixel and SetPixel is SLOW! Every call needs to calculate the offset into the pixel
data.
I would start with a DIBSection - an HBITMAP that can be selected into a DC but you can directly
access the pixel data using a pointer.
See CreateDIBSection[^]
The CImage class can help wrap the DIBsection since you're using MFC.
Mark
"If you can dodge a wrench, you can dodge a ball."
|
|
|
|