|
If you must use this technique use dynamic_cast instead. This design is poor: using a downcast is rarely needed and you should use virtual function instead.
Steve
|
|
|
|
|
Hi ppl,
The problem is error #10061 (WSAGetLastError()) with connect() when I am trying to connect to a host that behind a router. I have already port-forwarded it and shut the firewall off, still the host refuses the connection activly. Please help.
|
|
|
|
|
Well, the error says it all...;)
WSAECONNREFUSED
10061 No connection could be made because the target machine actively refused it.
Don't think you are, know you are...
custom hardware & software - olloc.be
|
|
|
|
|
Hi All,
I have a problem in timers....Actually I am using the OnTimer() function for one purpose (say keeping track of the list box added item ...only when some item is added) ....I want to use the same ontimer() for updating the "Current System Time" in the static text control also (where the timer will be always used not like the previous case ).... So is there any way to define two timers for the same dialog ....or anyother alternative..... or can anyone tell me how to use CALLBACK fuction in the setTimer() function for the solution of the same...
Thanks in Advance
With regards
Raja Bose
-- modified at 7:09 Wednesday 17th May, 2006
|
|
|
|
|
Create two timers with different ID. In the OnTimer function, the parameter supplied to the function is the ID of the timer which has 'finished'.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Dear Raja,
u will get the value passing to nIDEvent (first parameter) of SetTimer function will receive at OnTimer Function as nIDEvent
so u can differentiate ur functionality through setting diferent event for timer
e.g:
#define UPDATE_LIST 1
#define UPDATE_STATIC 2
#define ELAPSE_TIME 200
// set timer to update list
SetTimer( UPDATE_LIST, ELAPSE_TIME, 0 );
// set timer to update static
SetTimer( STATIC, ELAPSE_TIME, 0 );
At OnTimer function
void OnTimer(UINT nIDEvent)
{
if(UPDATE_LIST == nIDEvent)
//update list
else if(UPDATE_STATIC == nIDEvent)
//update static
}
Hope it is clear
-Sarath
|
|
|
|
|
thank u Sarath ... it was working great ... Thank u for ur king help
With regards
Raja Bose
|
|
|
|
|
Hi out there !
I am currently writing a tab control view that allows for the dynamic appending of other CWnd* based widgets on each tab. On appending, a small header bar is assigned to each widget, which makes the widget collapsible, basically turning the widget into a rollout-like control.
The structure then is as follows :
CTabView (derived from CCtrlView)
|
|- CTab (derived from CScrollView)
|
|- CTabElement (derived from CWnd*)
| |
| |- CWnd* widget
|
|- CTabElement
| |
| |- CWnd* widget
|
The two things I am most concerned about are :
- Though I create the CTabElements with CTab as its parent, I need to manually call their OnPaint-methods in the OnDraw-Method of my CTab, shouldn't MFC do this automatically ?
- When scrolling sets in I am only able to properly update the original view content, i.e. the part of the screen that shows when the scroll position is (0,0).
Possibly those problems are closely related, but because I am pretty new to MFC, i have not yet managed to find the particalur point where I made the misstake.
Maybe someone can give me a hint,
thanks in advance,
Christian
|
|
|
|
|
|
Your question is not very clear, but if you want to get the current time, you can use:
CTime Time = CTime::GetCurrentTime();
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
if you need to current time see
<br />
CString str;<br />
SYSTEMTIME st;<br />
GetLocalTime(&st); <br />
<br />
str.Format("%d:%d:%d:",st.wHour,st.wMinute,st.wSecond);<br />
whitesky
|
|
|
|
|
How can I insert the System time(current time) into access like the former
in C++ (eg. 2006-04-19 16:41) ???
The time in access is datetime type!!!
I know in Java , it can use the method getdate().
But I have scanned many meterials , that I can't find in C++
retcode=SQLExecDirect(hstmt,(UCHAR*)"insert into package(Protocol,SrcAddr,DstAddr,SrcPort,DstPort,TotalLen,GetTime)values('a','b','c','d','e',2000000,'3-2-2006')",SQL_NTS);//SQLÓï¾äÖ´Ðгö´í
the quote '3-2-2006' of the sentence , can i substitue with the system
time???
Jeff Fan
No change is the worst!!!
The principal of mine
msn:fyr000000@hotmail.com
If you like coding , add me.
|
|
|
|
|
I am sorry that I have asked by mistake ! I go to the link again!!!
Thank you all very much.
Jeff Fan
No change is the worst!!!
The principal of mine
msn:fyr000000@hotmail.com
If you like coding , add me.
|
|
|
|
|
fyr000000 wrote: http://www.codeguru.com/forum/showthread.php?t=387391[^]
Isn't CodeGuru help you?, any way you can try COLEDateTime.
COleDateTime curTime= COleDateTime::GetCurrentTime( );
CString str = curTime.Format(_T(" %Y-%m-%d %I:%M"));
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Ovidiu answered your question very plainly. What's the problem?
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
Hi,
I need to establish a URL(https://test.com/test/servlet?parameter-list) connection from VC++ through a request object and get a response object in the form of plain text like password changed: ab123 or password not changed: no user. The connection should use a client certificate for a standard http connection.
Can any one point to some API or samples which provide methods for sending https requests and getting back the response(response is text).
thanks
|
|
|
|
|
|
HI,
I want my application to run in invisible mode, lets say it starts at system startup and strats working e.g. it is a keylogger that works hidden and get all the keys pressesed by users and save them in a file. Hidden measn when it starts no eindow should be appeared and also no icon in task bar nor in system tray
Actualy Windows service only runns on Windows NT, XP , 2000. may be windows services are suitable
I want to run my application on Windows 98 as well.
Please refere to a better solution / link
thanks
Regards.
|
|
|
|
|
but your program is show in TaskManager?
whitesky
|
|
|
|
|
What are you logging keys for?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I have just gave an example of key logging working , I am not working on keys.
Basicaly I want to hide the application in Task Manager Process tab . i.e. invisible from Task manager
Regards.
|
|
|
|
|
zahid_ash wrote: I want my application to run in invisible mode...
See if this helps.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
HI,
Could you please clarify that what is the diference between WIN32 Application and WIN32 Console Application wizard provided in VC++ (New -> Projects tab) wizards
Thanks
Regards.
|
|
|
|
|
The difference is that AppWizard generates a different stdafx.h for the two
project types. For a Win32 app, stdafx.h includes windows.h , but for a Win32 console app stdafx.h does not include windows.h.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
What the windows.h file makes diference in developement or programming
Regards.
|
|
|
|