|
I'm not sure what CAmHttpSocket is but I think what you are looking for is CInternetSession::SetOption(INTERNET_OPTION_CONNECT_TIMEOUT, ...).
|
|
|
|
|
i'll be extremely gratefull to the people who try to help me .
My question is regarding the use of icm 2 api and is listed below
i am trying to find colors that are out of printer gamut using icm 2.0
using the following code
/*Getting color profile handles*/
HPROFILE hICMMonitorProfile
=OpenColorProfile(&input_profile_struc,
PROFILE_READ,FILE_SHARE_READ, OPEN_EXISTING);
HPROFILE hICMOutPutProfile
=OpenColorProfile(&output_profile_struc,
PROFILE_READ,FILE_SHARE_READ, OPEN_EXISTING);
if (hICMMonitorProfile == NULL||hICMOutPutProfile ==
NULL)
{
AfxMessageBox("OpenColorProfile() failed");
}
///////////////////////////////////////////////////////////////////////
/
///
/*Creating color transform*/
LOGCOLORSPACE lcs = {
LCS_SIGNATURE, 0x400,
sizeof(LOGCOLORSPACE)
};
lcs.lcsCSType = LCS_WINDOWS_COLOR_SPACE;
lcs.lcsIntent = LCS_GM_GRAPHICS;
m_hICMColorTransform =CreateColorTransform(&lcs,
hICMMonitorProfile,hICMOutPutProfile,ENABLE_GAMUT_
CHECKING|INTENT_RELAT
I
VE_COLORIMETRIC);
if (m_hICMColorTransform == NULL)
{
AfxMessageBox("ICM CreateColorTransform() failed");
}
/*checking RGB colors ,if they out of printer gamut ,
using code as
follows*/
//getting RGB color values from sliders
ICMInColor.rgb.red=m_R.GetPos();
ICMInColor.rgb.green=m_G.GetPos();
ICMInColor.rgb.blue=m_B.GetPos();
BYTE bytearray[1];
bytearray[0]=0;
CheckColors(m_hICMColorTransform,&ICMInColor,1,COLOR_RGB,bytearray);
if(bytearray[0]!=0)
{
//the color is now of of gamut
//according to my perception
}
this code never shows any value as out of gamut however when i use that
same profiles in photoshop ,the results are far away...different from it can anyone please help me ,solve this problem and also tell me any forums relating to icm discussion
ahmed
|
|
|
|
|
hai,
Can any body help where from i can get flash api to use in my program. I don't want to use control to play the flash file, i want to use some API calls to send it to simulate it one the view.
suresh
|
|
|
|
|
Hi everyone,
I have a C++ dll that has a few function interfaces to VB. Now, I need to pass a C++ class pointer to VB that they should be able to use or pass to another C++ dll.
Is it possible that I can pass the class pointer as a long value and they can cast it later or something.
I am really confused about this and some suggestion or even a small code snippet would be greatly appreciated.
Best regards,
Pankaj
P.S: it is not an ATL DLL.
Without struggle, there is no progress
|
|
|
|
|
That should work.
Jason Henderson My articles
"The best argument against democracy is a five-minute conversation with the average voter." - Winston Churchill
|
|
|
|
|
Ok, I have the following function definition in C++:
long _stdcall GetInstance_()
{
return (long)pCtrl;
}
Now after I get this long value in VB. How can I cast it back to the object? Does VB even know about the original object?
Thanks,
Pankaj
Without struggle, there is no progress
|
|
|
|
|
VB isn't going to be able to use a C++ class pointer, but you can pass it to another C++ app or dll for use.
Jason Henderson My articles
"The best argument against democracy is a five-minute conversation with the average voter." - Winston Churchill
|
|
|
|
|
Hi again,
Even if the other app does not know about this class? Does it need the header file or do I need to export this class in some way. If it is not too much hassle, can you post a small code snippet that I can use as a guideline?
Thanks,
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Just think about it.
How could another app use a c++ class when it is not defined in that other app. If you include the header, it should work.
I don't have a code snippet handy.
Jason Henderson My articles
"The best argument against democracy is a five-minute conversation with the average voter." - Winston Churchill
|
|
|
|
|
Yeah,
I was wondering if linking the lib file would be of any help.
Pankaj
Without struggle, there is no progress
|
|
|
|
|
I can't seem to map my accelerator keys to my dialog.
I have mapped the Accelerator 'Alt + 1' to my Dialog class but the functions are not being called?
If I map the accelerator keys to my MainFrame (to try to forward them to my Dialog) then the functions are not called when the dialog box is displayed.
No matter what I do I cannot seem to use accelerator keys when a dialog box is being displayed.
I know I'm doing something stupid becuase I've seen this functionality before.
Any ideas?
Cheers
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
I should just RTFM before I start posting shouldn't I.
Figured it out from here:
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q222/8/29.ASP&NoWebContent=1
Asim Hussain
e: asim@jawache.net
w: www.jawache.net
|
|
|
|
|
How to write an application to send email.
I have:
FROM_email_address.
TO_email_address.
Subject, body of mail.
After a click on the button, the content will be send.
|
|
|
|
|
|
hope that i can complete and post an article shortly.
[ It is possible to represent everything in this universe by using 0 and 1 ]
|
|
|
|
|
HI ALL
I want that every memory allocation will be tracked...
is there a way for me to overwrite the new and delete functions...
this and every other solution will be appreciated gracefully.
Objective: Tracking Memory Allocations
Thank you all...
-==--==--==--==--==--==-
=--= The Server =--=
-==--==--==--==--==--==-
|
|
|
|
|
The_Server wrote:
is there a way for me to overwrite the new and delete functions...
I'm assuming you meant to say overload , because new and delete are not functions; they are operators. In that case, no- these operators CANNOT be overloaded.
[EDIT]Red alert! Red alert! I made a horrifying mistake. Both new and delete can be overloaded. See all posts below.[/EDIT]
Regards,
Vikram.
-----------------------------
My site due for a massive update
1. Don't ask unnecessary questions. You know what I mean?
2. Avoid redundancy at all costs.
3. Avoid redundancy at all costs.
"Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.
|
|
|
|
|
Vikram Punathambekar wrote:
I'm assuming you meant to say overload , because new and delete are not functions; they are operators. In that case, no- these operators CANNOT be overloaded.
Vikram, I'm afraid you aren't right. The new operator calls a function to allocate memory and you can overload or rewrite that. There is also "placement new". Look up a good C++ reference for more info. "More Effectiver C++" covers this briefly. And there maybe articles here on CP about overloading new and delete if my memory serves me correctly.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Neville Franks wrote:
Vikram, I'm afraid you aren't right.
Yes, I'm afraid you're right. Punning apart, thanks for correcting me. Yes, new can be overloaded and so can delete .In fact, I guess even calls like
int *p=new int[10];
and
foo *ptr=new foo;
can be considered overloading, right? I wasn't drinking. I feel so dumb ...I wonder if learning VB is any fun?
Vikram.
-----------------------------
My site due for a massive update
1. Don't ask unnecessary questions. You know what I mean?
2. Avoid redundancy at all costs.
3. Avoid redundancy at all costs.
"Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.
|
|
|
|
|
I thought this warranted a second reply- new is an operator, isn't it? It calls a function alright, just like you have to define a function when you're overloading the + operator for, say, a Complex class. But that doesn't mean + becomes a function, even w.r.t. class Complex
And yeah, my 5 for pointing it out. Thanks,
Vikram.
-----------------------------
My site due for a massive update
1. Don't ask unnecessary questions. You know what I mean?
2. Avoid redundancy at all costs.
3. Avoid redundancy at all costs.
"Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.
|
|
|
|
|
Hi,
Both new and delete can be overloaded. Also, after overloading, you can still call the global new by ::new()
Pankaj
Without struggle, there is no progress
|
|
|
|
|
Yes, I made a mistake . I don't even know what I confused it with. See my earlier post.
Thanx for pointing it out.
Vikram.
-----------------------------
My site due for a massive update
1. Don't ask unnecessary questions. You know what I mean?
2. Avoid redundancy at all costs.
3. Avoid redundancy at all costs.
"Do not give redundant error messages again and again." - A classmate of mine, while giving a class talk on error detection in compiler design.
|
|
|
|
|
1st of all: I want to thank all of you for your interest...
2nd: How can I overload the new and delete functions?
Thank you all
The Server
|
|
|
|
|
1st of all: I want to thank all of you for your interest...
2nd: How can I overload the new and delete functions?
Thank you all
The Server
|
|
|
|
|
You an overload class specific new and delete as:
void * operator new (size_t size)
{
// do your thing
}
void operator delete (void * mem)
{
if (mem)
// do yout thing
}
You can also overload the global new and delete. Example, you can define something like:
void * operator new (size_t size, char * fileName);
void operator delete (void * p, char * fileName);
Pankaj
Without struggle, there is no progress
|
|
|
|