|
singh_nav wrote: my project buid properly but terminate as i execute
Does this mean , it is crashing ?
Have you tried to debug it ?
|
|
|
|
|
yes i tried to debug it , But it crash before it comes in the App class Init function .
ND
|
|
|
|
|
I have a dll written in C where in the function parameter does not contain any device context.
I want to use that dll to draw in a view or dialog in VC++.
I am able to link the dll and the function returns the correct parameter value but no drawing appears
Can someone help please
mk
|
|
|
|
|
, code ?
|
|
|
|
|
mk79 wrote: C where in the function parameter does not contain any device context
And how do you get your Device Context for drawing?
(i.e. post code please...)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Can you show snippet code
|
|
|
|
|
Hi
How can we find out the difference between dates.Is there any method to find that .please kindely help me.
#sanroop#
|
|
|
|
|
Have you tried using class COleDateTime ,COleDateTimeSpan ?
|
|
|
|
|
Iam very thankful for your raply.I saw all methods in COleDateTime,COleDateTimeSpan here my problem is to find the difference between current date and any otherdate what ever i give.
#sanroop#
|
|
|
|
|
|
Sanroop wrote: ...my problem is to find the difference between current date and any otherdate what ever i give.
Which is what COleDateTimeSpan does, assuming you are using MFC. Otherwise, check out difftime() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
What format are your dates in?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
For converting to FILETIME you may use:
1) LocalFileTimeToFileTime()
2) "Converting a time_t Value to a File Time" article in MSDN
3) DosDateTimeToFileTime()
The FILETIME structure is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601 (UTC).
This time format is the most sensitive I ever met in Windows.
You may just construct an INT64 numbers and subtract them.
Every 10000 units == 1 millisecond (1/1000 second)
So I second contains 1000*10000 units.
Good Luck!
|
|
|
|
|
Hi,
I have a project to do which consists on implementing a solution to make firewalls more dynamic.
The code which I should write it must be integrated in XP firewall, free BSD,... .
How can I find an API compatible with different OS and which can manage firewall rules.
Thanks.
|
|
|
|
|
Search for UPnP. It has limited use in opening and closing ports and manipulating port
forwarding on UPnP-enabled devices.
If firewalls were programmable they'd be kinda useless
|
|
|
|
|
|
From what i've understood, the mainframe title is stored in the string table. How can i change it at runtime?
Here's what i want to do:
Let's say the application title is MyApp. For some reasons it becomes MyApp USERID. Doing this for the main window is easy with setwindowtext, but when i open a document it switches back to MyApp and the title switches from "MyApp USERID" to "My App - Document1"
How do i change it so that it doesn't change back?
|
|
|
|
|
eusto wrote: the mainframe title is stored in the string table.
CDocument::SetTitle . Read the docs too.
|
|
|
|
|
I was talking about the main window title. I would have to use CDocument::SetTitle() for every document that i open and...that's a bit too much
|
|
|
|
|
eusto wrote: I was talking about the main window title. I would have to use CDocument::SetTitle() for every document that i open and...that's a bit too much
That's how it's to be done in DV architecture.
If you want to force a different behavior override UpdateFrameTitleForDocument which again is not a virtual function.
You would like to look up FWS_ADDTOTITLE and FWS_PREFIXTITLE .
|
|
|
|
|
Nibu babu thomas wrote: If you want to force a different behavior override UpdateFrameTitleForDocument which again is not a virtual function.
If its not virtual, how different behaviour can be forced ?
|
|
|
|
|
eusto wrote: I would have to use CDocument::SetTitle() for every document that i open and...that's a bit too much
One line of code is too much. How so?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
AfxGetMainWnd()->SetWindowText("My Title");
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
|
|
|
|
|
Override CFrameWnd::OnUpdateFrameTitle() . The application framework calls this method whenever it needs to update the frame's caption. On-demand updating is preferred to setting a modified title. (Why? Because it reduces the chance of programmer error and centralizes the title logic to a single location.)
/ravi
|
|
|
|
|
Hi all
I have loaded (a copy just in case) of my project from VS2003 at VS 2005, it was converted fine with just a few errors that I fixed but I still have this one that I dont understand. I´m not an expert, I´ve few months programming MFC self learning and still a lot to learn.
The error Line :
static CALLBACK CallbackProc(HWND hwnd, UINT msg, LPARAM lp, LPARAM lpData);
The compiler error:
error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
Can I continue with my MFC project at VS2005 with no problems at all?
Why I cant see my dialogs, main form , etc.. just the code?
Where are they!!?
thx in advance.
Jdg
---------------------------------------------
"Don't panic!. All will become clear in time"
WYS Is Not always WYG
|
|
|
|