|
priyanka s wrote: USING IT FOR STORING session recive from server
sessionid==m_arielapi.Login("wwtest2","RD9234","wwtest2");
CALLING IN OTHER FUNCTION
void CWartzDlg::OnBLogout()
{
// TODO: Add your control notification handler code here
m_arielapi.Logout("sessionid");
}
If you are using the exact code fragment then obviously you'll get error..
I don't know the type of session id returned by your Login(...), i assumed that char is returned....
In your code you are not assigning the value to sessionid and also you are not paasing the value of sessionid to Logout(..), instead you are passing the string "sessionid" as parameter...
priyanka s wrote: When i connect to server it will give me a
sessionID and i want to display it in my dialog box.And also the mesage connected not connected is that possible?how?
You can use DrawText are you can simply have a static control and display the information there by setting its window text..
-- modified at 0:50 Friday 28th July, 2006
Do your Duty and Don't expect the Result
|
|
|
|
|
TYPE OF SESSION ID I AM GETTING IS
BUT I DONT KNOW HOW TO PASS IT IN A PROPER WAY TO USE IN OTHER FINCTION
"SESS01"
|
|
|
|
|
If you are getting "SESS01" as return value from Login(...) then store it in char[] or char* like,
char SID[10] = {0}; //Array value should be large enough to store the return string
strcpy(SID, Login(...));
....
....
Use the SID as such in Logout as,
Logout(SID);
Don't use quote mark to SID...
Do your Duty and Don't expect the Result
|
|
|
|
|
thanks now it is working properly
|
|
|
|
|
Does anyone know to write a Class base on class CStatic which has a MoveTextToTheBottom function? Please show me .
|
|
|
|
|
Wat do u meant by MoveTextToTheBottom() this function?
Or wat do u want to do by this?
can you explain it?
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
I want to move the lines of text from the top of Static frame to bottom . I read the code at http://www.codeproject.com/staticctrl/CTextScroller.asp
The Auhor wrote MoveTextToTop()function and I tryed to change this function to MoveTextToBottom ,but not successful.
|
|
|
|
|
two things :
- this static is an owner drawn control, so we cannot tell you how he implemented this unless we look at the code (which you can yourself do)
- why don't you ask it directly on the article's questions board[^] so that the author will certainly be able to answer you more precisely than us (as it is his own product) ?
|
|
|
|
|
Give your requirement in detail......
|
|
|
|
|
Can you be more specific "MoveTextToTheBottom function?"
|
|
|
|
|
Hi Friends,
I created a dialog based VC++ .net platform. I placed edit box on the dialog form. When I place the mouse on the edit box and right click it, add variable in the pop up menu is disabled. I want the edit box to accept string input only for this purpose , I not able specify the type of input the edit box will accept.
For example CString m_accept. I am not able to do this .
Can any one tell me were I can enable the "add variable" in the pop menu?
from
Phijo
|
|
|
|
|
Hi all,
I am totally new to computer hardware programming. But i know VC++ application programming using MFC. I would like to learn abt computer hardware programming using VC++.
Can anyone help me to give some startup tips ( any books, articles, source code)?
Thanks in advance.
Regards,
Ram
|
|
|
|
|
Ram Murali wrote: computer hardware programming using VC++.
There are hardware related programming aspects such as "firmware" and "device drivers" programming, but none is using Visual C++.
Maxwell Chen
|
|
|
|
|
May i know what are the programming languages used to develop firmware and device drivers??
Regards,
Ram
|
|
|
|
|
Ram Murali wrote: what are the programming languages used to develop firmware and device drivers??
People mainly use "C" or "embedded C" to develop firmware. Maybe some others use assembly.
And "C" for device driver development with Microsoft DDK. Some minority uses "C++" to develop device drivers, but it is not recommended by Microsoft. (Reference.[^])
Maxwell Chen
|
|
|
|
|
thank you very much for spending ur time to make me to learn some basics of firmware and device drivers.
Regards,
Ram
|
|
|
|
|
Hello
I create a view as a camera UI.
When I push the button, the video recording start.
Then I want to show the time of record in the view.
In MFC, what function could be a counter for the foramt of "hr : minute : second"??
And what function could show the time in view??
Thanks a lot!!
Any suggestion is useful!! Thanks!!
|
|
|
|
|
Try this
CTime objTime = CTime::GetCurrentTime(); <br />
CString csTime;<br />
csTime = objTime.Format( "%I:%M:%S" );
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
You can use this to get the System time.
SYSTEMTIME SysTime = {0};
:GetSystemTime( &SysTime );
rgds
aneesh
|
|
|
|
|
To show the current Time you can use CTIme::GetCurrentTime(...) or other APIs..
If you want to show the recording time, that is, how long the recording is going on.. you can use GetTickCount() as below...
DWORD dwTicks = GetTickCount();
CTimeSpan objTime(dwTicks / 1000);
CString strTime = objTime("%H %M %S");
GetTickCount() returns time in milliseconds, but CTimeSpan required only seconds... so divide the value by 1000 to get number of seconds...
Do your Duty and Don't expect the Result
|
|
|
|
|
Dear,
Would anyone know the reason and meaning of adding a "#" label before the variable "expr"?
# define DEBUG_ASSERT(expr) do { \
if(!( expr )) { \
fprintf(stdout, "%s[%d] ASSECTION Failure [%s]\n",\
__FILE__, __LINE__, #expr) ; \
abort();\
}\
} while(0)
Thx a lot.
|
|
|
|
|
|
How do I get an individual control to accept WM_DROPFILES? I derived a class from CListBox and added the WM_DROPFILES handler. The control in the dialog resource has AcceptFiles set to true, and I even set:
BOOL CSourceListBox::PreCreateWindow(CREATESTRUCT& cs)
{
cs.dwExStyle |= WS_EX_ACCEPTFILES;
return CListBox::PreCreateWindow(cs);
}
The icon just shows as if drop isn't allowed. Any ideas?
|
|
|
|
|
Nitron wrote: The icon just shows as if drop isn't allowed.
You have to manage the icon yourself. You can use a CImageList. It has a bunch of members dealing with drawing a drag icon (BeginDrag,DragEnter,DragLeave,EndDrag... etc.) You also use mouse events and maybe capture the mouse during a drag operation.
|
|
|
|
|
led mike wrote: Nitron wrote:
The icon just shows as if drop isn't allowed.
You have to manage the icon yourself. You can use a CImageList. It has a bunch of members dealing with drawing a drag icon (BeginDrag,DragEnter,DragLeave,EndDrag... etc.) You also use mouse events and maybe capture the mouse during a drag operation.
um... ok, i guess I wasn't clear on my issue... In the OnDropFiles fcn, I have a statement like: AfxMessageBox("Got Drop!"); the WM_DROPFILES message is never getting processed...
|
|
|
|