|
You can use OemToChar() or OemToCharBuff() for this.
I should have noticed that it was a code page issue when you mentioned that it looks fine using printf() in a console window. D'oh...
|
|
|
|
|
Oh god! Thank you very much Michael! Several hours working on this and it the solution was just to add a line...
Anyway, now it works fine. Thanks again Michael!
Regards,
Aitor
|
|
|
|
|
You're welcome.
|
|
|
|
|
Hi,
Here is the issue:
- I am uploading a big file into a server using ftp
- on the server, a process will start processing the file as soon as it detect is presence ( even incomplete file )
is there any why that this process can guess whether the file is finished uploading or not?
thanks in advance.
|
|
|
|
|
What I'm suggesting isn't very sophisticated but...
you can make an empty second file with the same name and some identifying string after you've finished uploading the big file and make the server process look for it. So if your big file is named bigfile.dat, then then your process should look for a file named "bigfile.dat.isreadyforprocessing", then you remove the last part of the name, delete this empty file and you have the name of the file you should be processing.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Im not sure it this[^] helpful?
|
|
|
|
|
This also may be simple, but couldn't you just try to open the file? If the ftp server is still adding data into it, your exclusive-share-read open will fail? Just try later!
Or add the .readyforprocessing file thingy - it's cunning as well as simple!
Iain
|
|
|
|
|
Hi All
I have a two dialog box,first is Password dialog and second one is Main dialog.When application is run first time then Password dialog open.Then user enter a password it will store in file.Now when user run the application on same machine then Password dialog not open.How can i do?Plz help me
|
|
|
|
|
Davitor wrote: How can i do?
At startup, you can check to see if file exists. If it does, bypass password dialog.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Do you want to show password dialog again?
|
|
|
|
|
Hello,
I am having a child dialog as my current window. On top of it i open a new dialog with 2 buttons. Now what i want is that the user should not be able to work on any other dialog box or application until and unless he clicks one of the two buutons of the topmost dialog box.
This is the declaration of it rc file
IDD_ACCEPT_REFUSE_DLG DIALOGEX 0, 0, 233, 46
STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Live2Support"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
CTEXT "",IDC_STATIC_MSG,8,5,223,10
PUSHBUTTON "Accept",IDC_ACCEPT,56,31,59,15
PUSHBUTTON "Deny",IDC_DENY,118,31,59,15
END
and this is how i am creating and showing the topmost dialog box.
CAcceptRefuse* ptrAcceptRefuse = new CAcceptRefuse(this,_T(""),k,stOperatorDetails.strOpSessionId,stOperatorDetails.strOpName,m_strSiteID);
ptrAcceptRefuse->Create(IDD_ACCEPT_REFUSE_DLG,this);
ptrAcceptRefuse->ShowWindow(SW_SHOW);
Please Help Me
Thanks In Advance
|
|
|
|
|
Why don't you use a modal dialog box instead of a modeless ?
|
|
|
|
|
Can u tell me how to use modal dialog box instead o modeless dialog
|
|
|
|
|
If you don't know how to create a modal dialog box, I think you REALLY need a good book about MFC, because this is really the basics. Take a look at the DoModal function (if I remember correctly, people have already suggested that earlier, so why didn't you do it ?)
|
|
|
|
|
You have to create a modal dialog box. See the literature for DoModal()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I suggest to read some good book for learning MFC.
For your current issue check this link Tutorial MFC Dialog Boxes[^]
I hope it helps.
Regards,
Sandip.
|
|
|
|
|
I've problem using DDX variables for controls in a dialogbar.
In VC6 it was possible to associate a DDX variable (control type)
to a control being part of a dialog bar. In that way, I could
perform an override of some control's functionalities using
a MyClass instead of the tipical control class.
So... in VC6 there was no differences between Dialogs and DialogBars
with DDX controls.
Now I work in Visual Studio 2008. It seems that I cannot create
a DDX variable (control type) for a control being part of a dialog bar.
Is it true ?
If I force it using Attach and Detach methods, it still doesn't work
(MyClass instance doesn't receive Windows messages sent to the control).
How can I specialize the behaviuor of a control being part of a dialog
bar in Visual Studio 2008 ?
Thanks
|
|
|
|
|
Hi,
I want to take hex dump of a string and print like "00.ff.2e:3f:00:4d". Is there any api available in 'C' or 'C++' ?
Thanks,
Sakthi
Nice things do nice works
|
|
|
|
|
Well, there are keywords & functions, for instance: strlen , for , printf .
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Code:
printf("%02d:%02d:%02d:%02d:%02d:%02d\n", 0x00, 0xff, 0x2e, 0x3f, 0x00, 0x4d);
printf("%02x:%02x:%02x:%02x:%02x:%02x\n", 0x00, 0xff, 0x2e, 0x3f, 0x00, 0x4d);
Output:
00:255:46:63:00:77
00:ff:2e:3f:00:4d
|
|
|
|
|
for me, why happens like this below,
ffffffde:0e:6e:28:53:3d:ffffff88:0d:ffffff87:ffffffc1:ffffffe7:
4f:ffffffe8:ffffff9d:ffffff84:ffffffe8:3d:06:ffffff81:ffffffe0:
ffffff8f:ffffff9a:77:08:75:3d:fffffff1:38:45:ffffff8f:ffffffe8:
ffffffad:03
Thanks,
Sakthi
Nice things do nice works
|
|
|
|
|
Hint: you're probably using signed data types.
Hint2: FFFFFFDE is -34 (i.e. 222 if unsigned char ).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi All,
I am working on a client server application.
I am having a challenge that i have to serve the 250 client concurrently. Each request takes 2-5 second to execute at server side.
For this what should i use 1 PIPE implementation or SOCKET with a queue? and why?
Which performance is better.
Thanks
|
|
|
|
|
i think if you have to use udp mode, socket might be better.
otherwise i am afraid pipe is better because you just open and close a connect with every client but there would be more operations for socket.
just my own opinion.
|
|
|
|
|
hi,
U can use the following arch if u think this better. go with TCP/IP.
1. create one sock which will be in listen mode.
2. once u got a connect request, create one sock and thread dynmically and bind with the requested client. this socket will serve for that client only.
this can be implemented in multithread mode where on thread always listen for client, and each thread will serve for perticular client.
-Parthi
|
|
|
|