|
Can you provide a code snippet of how you are doing this?
|
|
|
|
|
CString query;
query=_T("select distinct globalt.Mkname,globalt.Route,globalt.Time,globalt.SI,globalt.NDV,globalt.ANBLO,Avg(globalt.Traff) AS AvgTraffic,Avg( globalt.CCONG) AS AvgCCONG \n"
"from globalt \n"
"where ((([globalt].[Route]) Like '*SS*' Or ([globalt].[Route]) Like '*I')=False");
Best Regards
|
|
|
|
|
There's only 254 characters there. What's the problem?
|
|
|
|
|
Thank u for ur reply
I know every thing appeares normal in my code, but after this step if watch this variable 'query' it equals:
"select distinct globalt.Mkname,globalt.Route,globalt.Time,globalt.SI,globalt.NDV,globalt.ANBLO,Avg(globalt.Traff) AS AvgTraffic,Avg( globalt.CCONG) AS AvgCCONG
from globalt
where ((([globalt].[Route]) Like '*SS*' Or ([globalt].[Route]) Like '*I')=Fal"
as u see some char doesnot included "se", even if i add more strings to this variable like query+="any thing" then it doesnt appeare.
so this is my problem!!!!
Best Regards
|
|
|
|
|
hi again
yes that is right there is no problem with CString. the problem was in the Watch window which could not show all char in CString.
Best Regards
|
|
|
|
|
The MFC CString will accommodate strings far longer than 256 characters. It is more likely that there is something wrong with the code that is populating the CString. Post the code if you still have problems!
|
|
|
|
|
Use the Format method:
CString s;
s.Format ("A very long string");
Best regards,
Alexandru Savescu
P.S. Interested in art? Visit this!
|
|
|
|
|
the code u posted works just fine...
|
|
|
|
|
Hi, i have a form in a VC# dll. I'm calling it inside a VC++ 6.0 MDI app. when i create an instance of the VC# dll i set the parent window (the form container) it opens... ok... nothing's wrong.. but the form can overlap the toolbar and the status bar... how can i avoid this?
NHM
|
|
|
|
|
Ok i got a problem with my object loading, i have it in text files and it loads em 1 by one ... so they get a number 0 1 2 etc. But i want to be able to do GetObj("name"); insted so i just can add a name for the objects in a file and get em that way ... So i wounder, is there any way to get this lookup about as fast as the one with numbers?... i need speed and there might be ALOT of object switching It also has to have the ability to remove and add into the object list under runtime, thats why a name lookup insted of number would be alot better
Load("Objectlist.txt");
GetObject(1); // This is the problem, if i load more/change the file it will not be in its right place when used in the program.
Load("Objectlist.txt");
GetObject("Wall"); // But as far as i know this is alot slower then using numbers in an vector or something like that
Ohh well, hope you understand what i mean and if anyone knows about the speed please tell me how much difrence it would be
|
|
|
|
|
In theory, yes, given that object names are sorted in the text file.
Kuphryn
|
|
|
|
|
Yes,but then its about the speeds, how much slower would it be to use names to look up the objects then numbers?
|
|
|
|
|
How long is the filename? Count bytes.
Kuphryn
|
|
|
|
|
The name in the string should be about 10 - 20 bytes...
|
|
|
|
|
Adding 160 elements
Add: 0 Millisecs
Starting iteration: 2000000 times.
GetByName: 58895 Millisecs
GetByPos: 4457 Millisecs
This is timings with about 25 char std::strings ... i havent optimized it much.
And using a std::vector ... damn thats alot of time! .. its timed using GetTickCount() just for the record
And btw, the time did not change if i changed the string to 1 char from 25.
The string comparation is only if(*it != Name) so far...
|
|
|
|
|
How about writing an index file?
|
|
|
|
|
Dear ALL,
I am working a program to block a physical disk (removable disk, eg c: )so that it should be inaccessible from user mode.
For hiding the disk I modified Registry settings:
1)
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NODRIVES which is a 32-bit word (DWORD).
========
if i hide c: by changing above settings , the drive is hidden but i can still access it from address bar or command prompt. Is there any way to block the drive completely ??
Waiting for a positive response.
Rohit
--------Complete solution for hiding drive------
change the registry value HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies
\Explorer\NODRIVES which is a 32-bit word (DWORD). The lower 26 bits of the 32-bit word correspond to drive letters A through Z. Drives are visible when set to 0 and hidden when set to 1.
Drive A is represented by the rightmost position of the bitmask when viewed in binary mode.
e.g. A bitmask of 00000000000000000000010101(0x7h)
The bitmask above hides local drives A, C, and E
---------------------------------------
|
|
|
|
|
hai rohit even i am facing the same problem ,we can still acess the drives from the command prompt.
try seeing "Browser Helper Objects: The Browser the Way You Want It" in MSDN this may help u
can u share the solution with me once u grt it thx.
qrious
|
|
|
|
|
Hi I want to send data using POST method. I use CAmHttpSocket, everything works fine, but generally how to set a timeout in case the server doesn't respond.
Please help
|
|
|
|
|
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
|
|
|
|