|
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.
|
|
|
|
|
zahid_ash wrote: What the windows.h file makes diference in developement or programming
Yes if you want to Windows based GUI apps. Otherwise you'll get errors
|
|
|
|
|
The system creates a new console when it starts a console process, a character-mode process whose entry point is the main function. For example, the system creates a new console when it starts the command processor. When the command processor starts a new console process, the user can specify whether the system creates a new console for the new process or whether it inherits the command processor's console.
A process can create a console by using one of the following methods:
-A GUI or console process can use the CreateProcess function with CREATE_NEW_CONSOLE to create a console process with a new console. (By default, a console process inherits its parent's console, and there is no guarantee that input is received by the process for which it was intended.)
-A graphical user interface (GUI) or console process that is not currently attached to a console can use the AllocConsole function to create a new console. (GUI processes are not attached to a console when they are created. Console processes are not attached to a console if they are created using CreateProcess with DETACHED_PROCESS.)
Currently I am working as software engineer at Network System Technologies Pvt. Ltd (NeST). Most of my project are in C++. Most interesting are is GUI programming.
|
|
|
|
|
There are two major differences between Win32 console and Win 32 application.
1.If it is win32 console application, mainCRTStartup() gets called first,which inturn calls main() method.
If it is win32 application,then WinMainCRTStartup() gets called as Entry point ,which in turn calls WinMain
2.Under compiler settings, the /subsystem flag is set to /subsystem:windows for Win32 application, /subsystem:console for Win32 console application.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
zahid_ash wrote: please clarify that what is the diference between WIN32 Application and WIN32 Console Application wizard
Simple.
Win32 app creates a MSWindows type interface and Win32 Console Application creates a MSDOS (Similar to command prompt).
http://www.sunlightd.com/Windows/FAQ.html#ConsoleIntro[^]
|
|
|
|