|
Thx for the response. Now, if I have to keep displaying accurate time, I will have to invoke a thread to repeatedly update it, right?? Please tell me if I am thinking on the right lines
|
|
|
|
|
girishc wrote:
Now, if I have to keep displaying accurate time, I will have to invoke a thread to repeatedly update it, right??
Yes, that's what you'll need to do. Need not have a separate thread. Just start a timer.
Nish
Has anyone seen my sig?
|
|
|
|
|
When updating the displayed time, be sure to update the displayed string only if it's (the string) different. Otherwise you'll see unnecessary flicker. If you're using a timer (as Nish suggested), set the interval to slightly less than one second.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Wont setting the timer to less than a sec. hog up CPU and my program might not be able to do anything else?? or is it ok??
|
|
|
|
|
No it won't hog up the CPU. WM_TIMER are among the lowest priority messages and are automatically compacted by Windows. That is, if you receive 4 WM_TIMER messages for the same timer, Windows will automatically compress them into a single message. Try it, you'll see!
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I wanna print some text.I have formview so I don't wanna use OnDraw().In my OnPrint(),I don't know how can I check if it reaches to the end of page ,and how to set the next page true.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
I think I find it.m_rectDraw and m_bContinuePrinting are the things I need,I guess.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Hello.
I have a cmd line process that returns a value via the command interpreter (using sytem()). How do I get the same result value using Createprocess()?
|
|
|
|
|
If I follow you correctly, you're creating a process and want to get it's exit code, right?
HANDLE hProcess = CreateProcess(...);
WaitForSingleObject(hProcess, INFINITE); // Make sure it's done
DWORD dwExitCode;
GetExitCodeProcess(hProcess, &dwExitCode);
If the process is still active, dwExitCode == STILL_ACTIVE.
Hope this helps.
|
|
|
|
|
sultan_of_6string wrote:
WaitForSingleObject(hProcess, INFINITE); // Make sure it's done
sultan_of_6string wrote:
If the process is still active, dwExitCode == STILL_ACTIVE.
It wont be active as you are waiting INFINITEly
Nish
Has anyone seen my sig?
|
|
|
|
|
I know. Just telling you.
|
|
|
|
|
sultan_of_6string wrote:
I know. Just telling you.
Ok, thanks!
Nish
Has anyone seen my sig?
|
|
|
|
|
Thanks.
Just what I needed.
|
|
|
|
|
How do I add a DLL to a project. I created the DLL so that is not a problem. I have exported the appropriate functions but I don't know how to add it to the project and load it etc. Thanks if you can help.
- Matt Newman / Anti-Linux Activist
-Sonork ID: 100.11179:BestSnowman
†
|
|
|
|
|
project-->properties---->Linker--->additional dependenceis
Here add your .lib
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Thanks, I found examples of how to export functions but not how to import it into a project. Thanks Again
- Matt Newman / Anti-Linux Activist
-Sonork ID: 100.11179:BestSnowman
†
|
|
|
|
|
It's seem that the App's m_pszAppName and m_pszExeName member only contain the module name,is there a way to get the App's full path?
Scratch
|
|
|
|
|
GetModuleFileName is one way to get it. GetFullPathName is another.
|
|
|
|
|
A Q&D way that has never failed (for me, at least) is to use value of "CWinApp::m_pszHelpFilePath", and just replace the extension with your app's extension (usually "EXE").
Peace!
-=- James.
|
|
|
|
|
when I delete a certain object I get an assertation
_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
what is this and how do I fix it? Am I forgetting to do something in the destructor?
Steve
Not all who wander are lost...
|
|
|
|
|
You have been writing to memory you haven't allocated.
|
|
|
|
|
Steve Severance wrote:
when I delete a certain object I get an assertation
_BLOCK_TYPE_IS_VALID(pHead->nBlockUse)
Several things may cause this:
o You are trying to delete an invalid pointer (or a valid pointer to a stack-allocated object)
o You are trying to delete something that has already been freed
o You are trying to delete a pointer that was not allocated off of the same heap you are trying to deallocate it on
o Something stepped over the beginning or end of the allocated memory, and trashed the heap's management information
o Your heap may be corrupted
Etc... Good luck! Hopefully, it is something simple like a double-delete.
Peace!
-=- James.
|
|
|
|
|
Ok this is quite a simple question, but..
In a modal dialog box message loop, how can
I make some code be executed as soon as
WM_INITDIALOG etc. has been processed and
the dialog is visible on screen?
Eg. I want something in the message loop like.......
case (dialog is now visible on screen):
{
blah;
blah;
}
I do not want to use any MFC.
Any thoughts/solutions welcome
|
|
|
|
|
You can do it in OnShowWindow(BOOL bShow) for example.
bShow will be true when the window is being activated or shown
Philip Patrick
Web-site: www.saintopatrick.com
"Two beer or not two beer?" Shakesbeer
Need ASP hosting? Check out 123HostNow.com
|
|
|
|
|
Isn't OnShowWindow MFC?
I am writing a non-MFC app..
I have tried
case WM_SHOWWINDOW:
{
blah;
}
But the message is sent just before the dialog box is drawn... I need a message or something that is sent
just after the dialog has been drawn....
|
|
|
|