|
Hi peter,
thanks for your help, i know how to find a file path,
i just want to know how to find the files physical location / address in main memory (hardisk)!!! example
Sector 123542 Lenght: 3 Block ( or whatever unit: cluster / sector / block / etc )
anyone else ??? !!!!
|
|
|
|
|
hi,
i don't believe you'll ever be able to do that with just ring3 priviledges.
just OSs have access to such data.
Phil
|
|
|
|
|
Hi,
Maybe this is a stupid question, but I'm a rookie .
I'm working on a Chat-Server and got it working with threads;
<br />
void __fastcall TMain::ServerSocketGetThread(TObject *Sender,<br />
TServerClientWinSocket *ClientSocket, TServerClientThread *&SocketThread)<br />
{<br />
SocketThread = new TMyServerThread(false, ClientSocket);<br />
}<br />
<br />
<br />
void __fastcall TMyServerThread::ClientExecute(void) <br />
{<br />
while (!Terminated && ClientSocket->Connected)<br />
{<br />
try<br />
{<br />
TWinSocketStream *pStream = new TWinSocketStream(ClientSocket, CLIENTWAITTIME);<br />
<br />
try<br />
{<br />
etc.<br />
...but now I want to 'assign' each incoming Client... so like in a list. Also want to show all connected Clients in a ListView.
I know how to send text/a buffer in a thread, but how can I send to a specific(assigned) Client from the 'Main' form/api?!
Am a bit lost .
Roland(BE).
|
|
|
|
|
if i understand u right u need to keep a list of users with ip addresses when they connect
then u can route msgs to specific users
or did i misunderstand completely?
"there is no spoon" biz stuff about me
|
|
|
|
|
Hi !
This is I guess a stupid question, but I'm wondering how in C++ I can round a float :
if I do :
int i=1.6;
I get : i=1;
but I'd like instead i=2 !
Is there an easy way to do this, or do I have to do the work by myself ?
Thanks !
Jerome
|
|
|
|
|
Use ceil(), from math.h.
HTH
Ryan
|
|
|
|
|
Ryan Roberts wrote:
Use ceil(), from math.h.
Well, the result is not the one expected.
I'll try to make myself clear :
the float number 1.6 should be rounded to 2
the float number 1.5 should be rounded to 2
the float number 1.2 should be rounded to 1
the ceil() function always round to the upper integer.
I cannot find the function which will round my float number correctly according to mathematic rules. ceil() and floor() are not doing what I want !
Jerome
|
|
|
|
|
Must listen to question, this is the reason I was always crap at maths.
You actualy want to call.. round().. damn cryptic function names
HTH
Ryan
|
|
|
|
|
Ryan Roberts wrote:
You actualy want to call.. round()..
But it doesn't exists ! I try to find it in the MSDN, but it is not.....
mmmhh it looks like I'll have to write my own !
Jerome
|
|
|
|
|
// this rounds to nearest whole number
int round = (int)((val < 0) ? (val - 0.5) : (val + 0.5));
Roger Allen - Sonork 100.10016
If your dead and reading this, then you have no life!
|
|
|
|
|
Its in stlport. Guess they have to be different
Try #define round(x) floor(x+0.5)
Ryan.
|
|
|
|
|
Try this one:
<br />
double a=1.6; <br />
int i = static_cast<int>(a+0.5);
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
|
Hi!
I have problems by using QueryPerformanceCounter(), I got the message when compiling;
QueryPerformanceCounter' undeclared (first use this function)
how will I declare it?
|
|
|
|
|
|
I have created a function to update data to paint, and I have put this into the case WM_PAINT (on the WindowsProcedure function), and it works OK when there is a change with the size, etc... but I would activate this functions from my functions, so I thought to call the SendMessage function, but it doesn't work. SendMessage (hWindow,WM_PAINT,NULL,NULL).
somebody can help me?
|
|
|
|
|
Try InvalidateRect(hwnd,NULL,TURE);
The World is getting smaller and so are the people.
|
|
|
|
|
|
i have create a sdi project, use class CEditView. i need to display some font in it, but the CEditView's Font is so ugly so i wanna change other one.
if you know please tell me. thanks.;)
hi i like it and want to make batter...
|
|
|
|
|
1.Create a CFont object.
2.Get the CEdit control from the CEditView
3.Attach the font object to the CEdit control by {CEdit}.SetFont({CFont})
regards,
Prakash.
The World is getting smaller and so are the people.
|
|
|
|
|
but where i put in these code to wicheh function? if i put wrong when i open other new fiel Vc will tell me i have a kill error...
hi i like it and want to make batter...
|
|
|
|
|
I need to use 2 usb keyboards but i must read their states separately
i can use CreateFile & DeviceIOControl but i don't know
name of keyboards (\\\\.\\????)
where i can find list of device names?
if someone knows usb keyboard name mail me
stpg@ukr.net
thanks
|
|
|
|
|
Hi all,
I am developing an Activex control using MFC. In that i am having some edit and combo controls. Can anyone of you suggest how to add tool tip for this controls.
Thanks & Regards,
Gopinath.S
Gopinath.S
|
|
|
|
|
I haven't tried it in ActiveX but I am sure CToolTipCtrl works the same way they do in another MFC app.
Peter Molnar
|
|
|
|
|
Hello all,
Who can give me a sample about how to use DrawCaption().
eg: There is a dialog without default caption as it being created. I want to draw it with the text "MY DIALOG" by calling DrawCaption(). But which paramenter in this function can obtain the text "MY DIALOG" ?
Thanks a lot
|
|
|
|