|
I cant understand the scenario. Have you refered sample given in one of previous posts.
|
|
|
|
|
i am having a tab control in a dialog named IDD_NETWORK wiht MyConfigTab:CTabCtrl. inside this tab i added two items LAN and WAN. these two tabs have separate dialog named (lansettings and wansettings dialogs resp) to display. if i click the button "next" in LAN dialog it should show the next tab ie WAN.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
deeps_cute wrote: lansettings and wansettings dialogs resp
These would be associated with CTabCtrl variable in some way for sure.Access that variabel and set next tab as active.
|
|
|
|
|
|
Microsoft Visual C++ (also known as MSVC) is an Integrated development environment (IDE) product for the C, C++, and C++/CLI programming languages engineered by Microsoft. It has tools for developing and debugging C++ code, especially that written for the Microsoft Windows API, the DirectX API, and the Microsoft .NET Framework.
Appu..
"My blood group is not B+.But I have it my blood"
|
|
|
|
|
|
WhiteSky wrote: isual C++[^]
one of my Favorite site for GK
|
|
|
|
|
Its interesting for me I can find every answers on the wikipedia.
|
|
|
|
|
Hi all:
I was trying to read in data from a file while it was written, but failed because the below hFile turn out to be invalid, Is it possible to reading while writing to the same file?
HANDLE hFile = CreateFile( _T("c:\\dat.txt"), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
|
|
|
|
|
LiYS wrote: HANDLE hFile = CreateFile( _T("c:\\dat.txt"), GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
The above code is to open a file for reading, but how the file was opened for writing?..
The access permission should allow shared reading, while opening the file for writing also..
Hope this will help...
Do your Duty and Don't expect the Result
|
|
|
|
|
|
You can alo use of CFile::Read
|
|
|
|
|
WhiteSky wrote: You can alo use of CFile::Read
Same thing happened to CFile::Read either.
|
|
|
|
|
So maybe problem is of file did you check it?
|
|
|
|
|
LiYS wrote: sa
LiYS wrote: You can alo use of CFile::Read
Use ShareDenyNone Flag!
|
|
|
|
|
Hello everyone,
Is there a way that a software interrupts be programmed in windows. I need to run a timer routine that sends an interrupt every 20 ms. I have tried using
Sleep(20) ---> Not deterministic
GetTickCount ---> Determinitic up to 100ms
QueryPerformanceCounter ---> Gives a good result.
But I am looking to see if there is some way that within windows scheduler or elsewhere itself a timer interrupt could be programmed.
Thank you,
Best regards,
Suraj.
|
|
|
|
|
Interrupts are handled in kernel mode, not user mode. Windows in a preemptive multitasking OS not a real-time OS; if you need super accurate timing you could be in for problems.
Steve
|
|
|
|
|
Hello,
I don't need perfect accuracy. But was wondering on only that if there are interrupts that can be set within my program so that the 20 ms time can be detected. Or is there is way in which any inbuilt timer (in windows) can be set so that it counts down and sends a trigger to the windows scheduler.
Thanks.
Suraj.
|
|
|
|
|
SetTimer(hwnd, 100, 100, NULL);
...OnTimer(...)
{
AfxMessageBox("");
}
why it can popup some messgebox, it look like a Multi-Thread...?
|
|
|
|
|
mfc_dialog wrote: why it can popup some messgebox, it look like a Multi-Thread...?
What are you asking?
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
INT g_nData;<br />
<br />
SetTimer(hwnd, 100, 100, NULL);<br />
<br />
...OnTimer(...)<br />
{<br />
if (g_nData > 0)<br />
{<br />
g_nData--;<br />
}<br />
else<br />
{<br />
g_nData++;<br />
}<br />
}
g_nData will not happen "Memory access errors"?unneed use ::EnterCriticalSection() and ::LeaveCriticalSection()?
|
|
|
|
|
Again, cant understand your question. By the way, you have mentioned last parameter of SetTimer as NULL . That means, there will be no timerproc associated with this timer.
|
|
|
|
|
mfc_dialog wrote: SetTimer(hwnd, 100, 100, NULL)
You didn't provide any timer functon for the timer 100.
So it will call default OnTimer(nEventID)...
I think you are using some other Timers too..
do your calculations by checking the Event ID parameter...
Hope this will help...
Do your Duty and Don't expect the Result
|
|
|
|
|
You may want to initialize g_nData:
INT g_nData = 0;
The timer messages should arrive on the same thread so you shouldn't need ::EnterCriticalSection()
and ::LeaveCriticalSection().
Are you getting errors at runtime?
Mark
"Great job, team. Head back to base for debriefing and cocktails."
(Spottswoode "Team America")
|
|
|
|
|
i have used the GlobalMemoryStatus(), but is can not renturn a process's physical memory number.
can any one tell me?thanks!
|
|
|
|