|
COleDateTime has a ParseDateTime member function you could use. If you have to use CTime you could transfer the data from COleDateTime to CTime fairly easily.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
hi everyone,
how can i use mutexes to synchronize
threads of some applications?
thanks if you introduce me refrence about
thread and synchronization.
Best Regard.
|
|
|
|
|
|
Hi everyone,
first:
I use HeapAlloc() to allocate memory on heap.
in vc 6.0 I think HeapAlloc return void*
but in last version of vc i think return LPVOID
and i do not know to use it in array!
for example i declared char* lpBuf and then
lpBuf = HeapAlloc(....);
in .NET i do not know how use it.
second:
how about casting pointer to LPVOID ?
|
|
|
|
|
mostafa_pasha wrote:
in vc 6.0 I think HeapAlloc return void*
but in last version of vc i think return LPVOID
LPVOID is just a typedef for void * .
mostafa_pasha wrote:
and i do not know to use it in array!
Use what in an array?
mostafa_pasha wrote:
for example i declared char* lpBuf and then
lpBuf = HeapAlloc(....);
in .NET i do not know how use it.
How about:
char *lpBuf = (char *) HeapAlloc(...);
lpBuf[0] = 'E';
lpBuf[1] = 'a';
lpBuf[2] = 's';
lpBuf[3] = 'y';
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hello,
Is it possible to capture the output from either ShellExecute or ShellExecuteEx?
I have to run an external program from within my application, and I want to capture the output from that program and put it into a CString variable.
Does anyone know if this is possible, and if so, how?
Thanks,
Murrah Boswell
|
|
|
|
|
You may want to use CreateProcess() instead. See these articles:
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
hey,,,even i want to redirect the output of the shellexecute to a Cstring variable,,,is there no other way,,should i have to use CreateProcess,,Pls help me out,,
Thanks in advance,,
|
|
|
|
|
CWnd *wndow;
wndow=new CWnd();
wndow->Create("","",WS_VISIBLE|WS_CHILD,Rect,this,1234);
I am doing this in a Window (CWnd ) . returns 0 . what am i missing ? Help please
|
|
|
|
|
The class name (first parameter) has to be a valid class name or NULL. It can not be an empty string.
wndow->Create(NULL, ...
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
Hello everybody!
I would appreciate if anybody helps me with such question:
I trying to write a function that "emulates" page opening. I mean, that you send a specific request(that contains specific header information) and the server (I'm talking about HTTP protocol) thinks that information came from a normal browser.
For e.g. you have registred on some server, and webmaster sends you email with the activation link that you need to press, and I want my function send "specific info" to server as if it was really opened in browser.
The question: What exact information message should contain?
|
|
|
|
|
|
Are you trying to create something that creates an insane number of accounts for spamming purposes?
-----------------------------
All truth passes through 3 stages.
First, it is ridiculed.
Second, it is violently opposed.
Third, it is accepted as being self-evident.
|
|
|
|
|
I am working on an SDI app .
I have a view and its creates a Window(CWnd). this window has sub components like edit boxes , Buttons etc . I wanted to create my own Control like a ProgressBar and add it as a componenet to the window .
i did this to create the control
class CProgressBar : public CWnd <br />
{<br />
public:<br />
CProgressBar(CWnd *parent);<br />
int value;<br />
virtual ~CProgressBar();<br />
<br />
protected:<br />
afx_msg void OnPaint();<br />
DECLARE_MESSAGE_MAP()<br />
<br />
}; 1) When I was about to create this class , I went to the class View and clicked ADD class .
What class should it be MFC or non MFC ?
If i select MFC , i never get CWnd as an option of a Base class
Because of which I created a generic class and added the afx call .
what is the right way of doing this ?
Here is my .cpp file
<br />
BEGIN_MESSAGE_MAP(CProgressBar, CWnd)<br />
ON_WM_PAINT()<br />
END_MESSAGE_MAP()<br />
<br />
CProgressBar::CProgressBar(CWnd *parent):CWnd(parent)<br />
{<br />
value=0;<br />
<br />
}<br />
<br />
CProgressBar::~CProgressBar()<br />
{<br />
<br />
}<br />
<br />
void CProgressBar::OnPaint()<br />
{<br />
CPaintDC dc(this);
CWnd::OnPaint();<br />
CRect r;<br />
this->GetClientRect(&r);<br />
dc.TextOut(0,0,"I am here");<br />
<br />
dc.FillSolidRect(r,RGB(255,0,0));<br />
}
2) In the Windows (thats created by the View ) I do this
progress = new CProgressBar(this);
and later create it here :
void CSelfTest :: OnPaint()<br />
{<br />
CPaintDC dc(this);
switch(state){<br />
case SELFTEST_INIT: <br />
..<br />
...<br />
idRect.top+=10*MINIMUM_SPACING;<br />
idRect.bottom=idRect.top+50;<br />
<br />
progress->Create("CProgressBar","Progress",WS_VISIBLE,idRect,this,1234);<br />
progress->Invalidate();<br />
break;<br />
}<br />
}
The breakPoint that I set in the OnPaint of CprogressBar never gets called and the call to
progress->Invalidate() crashes !!
Please help
|
|
|
|
|
1) You have it in that class list.
Go almost to the bottom of it and you will find: "Generic CWnd"
2) You cannot "recreate" the same object in OnPaint. Why do you need to do that?
Jaime
|
|
|
|
|
So I have a video file with already one audio stream. Separately I have an audio stream (can be WAV or MP3).
What I want is to insert this second audio stream into the video file, so the video file resulting to have two audio streams.
I want to do it automatically (a peace of code), not with premier and similars.
thanks guys!
|
|
|
|
|
I have to use these plain sockets, not MFC. If I do one send() from one app, the other can get it with recv. This works. What I really need to do is write a number of separate chunks to a socket, then have the other one read it at its leisure. I tried write() but that doesnt work....it doesnt like the socket handle I get from socket(). So I tried two sends in one and two recvs in the other thinking that my multiple sends will get queued up and the other can recv the info at its leisure in measured doses
eg.
1. send the header
2. send the image
--------------------
1 recv the header
2. recv the image
If I have two sends and only 1 recv I can get the two things sent in the buffer that recv() has.
However i really need to recv() stuff into separate buffers. I thought read and write would work, but it doesnt.
How do I do this, so that I can recv stuff sent in two sends into two recv() buffers? Do I have to do an communication between processes? Like send 1 thing, wait and get a confirm from the other app on receipt, then send my second chunk which the other app will now be waiting for?
send() 1st chunk
recv() -- other app got it, so send again
send() 2nd chunk
while on the other end I have:
recv() 1st chunk
send() -- to tell its okay to send second chunk
recv() second chunk.....
I was hoping I could just read my two chunks and just send() them one after another....
Thanks,
sb
|
|
|
|
|
Question 1: is this TCP or UDP?
if UDP, each send() requires one recv() on the other end.
if TCP, things may get combined, or split.
[you're not doing plain old IP, are you?]
You should also look into a function: "WSASend" and "WSARecv" (these are microsoft re-implementations of send() and recv() that provide some extra capabilities, like sending chunks)
Additionally, I'd recommend that you develop a data format. Some sort of additional data that you include your data with -- to add descriptive information into the packet/stream. Describing how bit it is, and what it is. That way, when it get's to the other side, you can tell what's going on, or what's missing.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.santacruznetworks.com">Santa Cruz Networks</A>
|
|
|
|
|
Please help me. Can I obtain traffic statistics for IrDA on PC-side by some way? Thank You!
|
|
|
|
|
iwant to make a program like the norton ghost i want to know how to make an interface where user can select a whole partition not file and how can i open the files included in this partition and get their paths
|
|
|
|
|
I saw a sample here which uses COM (or ActiveX) interface IPicture (or similar) to save bitmap image to gif, jpg file etc.
but i can not find the sample or code (post) now.
do you know where it is?
thx.
includeh10
|
|
|
|
|
I can not find link to search engine from where we can find a poster etc - not formal articles.
thx
includeh10
|
|
|
|
|
Is this close?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
it is almost but not exactly what i need.
i want to find all messages i posted before.
where is search engine for this finding?
thx
includeh10
|
|
|
|