|
If I use a double, that will do too?
A double is 8 bytes, msdn says so.
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
double is not integer, but floating point
use hyper
|
|
|
|
|
I'm curious as to why you are adverse to using __int64?
|
|
|
|
|
I'm writing dirty-java at the moment, that's something like a combination of java and c++ through jni (java native interface).
and the __int64 doesn't exist there. But it works if you put the c++ calculation in a double and when returned to java cast it back to a (8bytes) long.
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
Is the 8bytes long an integer or floating point?
If integer, then a java long IS an __int64. If floating point, then it is the same as a double in C.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
It's no floating point.
The range for long is this:
[-9.223.372.036.854.775.808,9.223.372.036.854.775.807]
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
As far as I know the __int64 is just an 8 byte value (hince the 64). You should be able to just as easily case __int64 to java long as a double. Also, double is a C++ intrinsic type which means that if you use it in your C++ it is going to be interperted as a floating point value.
good luck.
|
|
|
|
|
You can cast it to double AND long. But the double uses floating point notation and that's no good if you're coding front-end.
[VISUAL STUDIO 6.0] [MFC] [WIN98/2]
Bluute tette!
|
|
|
|
|
Hi,
How can i use file handling in ATL ActiveX
I tried _open and other functions but it says
unresolved symbol to _main
Please help
Sameer
|
|
|
|
|
_open uses the CRT so you need to remove the ATL_MIN_CRT flag.
|
|
|
|
|
If you're familiar with STL, iostreams will do the job well.
|
|
|
|
|
But iostreams use the CRT, so he'll face the same problem.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Your're right. He was trying to use _open/_XXX functions so I suggested the CRT stuff, but then I though I'd suggest stl. Should have included that CRT was needed.
Thanks.
|
|
|
|
|
I guess you're not linking the C run-time library. Try with raw Win32 functions CreateFIle , ReadFile , etc (or change your settings to add the C run-time.)
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
I guess you're not linking the C run-time library
How do i Link with C run-time Library
|
|
|
|
|
Hi, pals!
I have added a shortcut of my program to the toolbar of IE. The
function of my program is to scan the content of the source codes
of the current webpage in IE. (When mentioning source codes, I am
referring to the codes which can be seen from "View"-->"Source files"
in the menu of IE).
But now I meet with a trouble, how can I read the content of the source codes of the current webpage in IE to a CString buffer?
Can you give me some sample codes?
Best regards,
George Ma
|
|
|
|
|
What is the message sent to the windows when the resolution is changed?
rechi
|
|
|
|
|
|
I am making my own class derived from CEdit, I want to be able to change the background colour of the control to something other than white. I have tried using:
pDC->SetBkColor(RGB(0,0,255));
in the OnCtrlColor but it does not work. I have tried the articles here and on codeguru, but none of the seem to work properly.
==================================================
When Your Mind Wonders...Where Does It Go???
|
|
|
|
|
You also have to return a brush with your new background
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
I worked it out. i used the ON_WM_CTLCOLOR_REFLECT function and instead of delcaring the variables for the colours in that function, i did it in the constructor, and it worked.
==================================================
When Your Mind Wonders...Where Does It Go???
|
|
|
|
|
if(pWnd->GetDlgCtrlID()==IDC_EDIT1)
{
pDC->SetBkColor(RGB(100,100,100));
hbr = CreateSolidBrush(RGB(100,100,100));
}
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
I tried what you have said and it works, but only if the code is in the dialogs .cpp file. The problem is that I am going to put my class in a dll file so i dont need to re-write it for each app. When i put that in the CEdit derived class, and made the edit ctrl have a member variable for my class, it did not work.
==================================================
When Your Mind Wonders...Where Does It Go???
|
|
|
|
|
Hi, pals!
I copy some codes from a book dealing with registry table.
But I meet with the following errors when compiling. The compiler
says, CRegKey is an undeclared identifier. Here is the following
codes, how to fix the trouble?
CRegKey reg;
char KeyName[]="Software\\Microsoft\\Internet Explorer\\Extensions\\{06926B30-424E-4f1c-8EE3-543CD96573DC}";
TCHAR PathName[MAX_PATH];
TCHAR IconPathName[MAX_PATH];
TCHAR HotIconPathName[MAX_PATH];
GetModuleFileName(0,PathName,MAX_PATH);
strcpy(IconPathName,PathName);
strcpy(HotIconPathName,PathName);
strcat(HotIconPathName,",131");
strcat(IconPathName,",129");
reg.Create(HKEY_LOCAL_MACHINE,KeyName);
reg.SetValue("{1FBA04EE-3024-11D2-8F1F-0000F87ABD16}","CLSID");
reg.SetValue("Yes","Default Visible");
reg.SetValue("VC Knowledge Base","ButtonText");
reg.SetValue(IconPathName,"Icon");
reg.SetValue(HotIconPathName,"HotIcon");
reg.SetValue("http://www.vckbase.com/","Exec");
Best regards,
George Ma
|
|
|
|
|
You forgot to #include the required header file.
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|