|
Hi,
How to format the date (CTime) using CString?
I need to convert the date like September 2,2010
How to do that?
|
|
|
|
|
As you may easily realize, reading the documentation CTime::Format[^], strftime[^] (for format specifiers):
CTime now = CTime::GetCurrentTime();
CString szDate = now.Format(_T("%B %d,%Y"));
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi!
I got the following exception while running my project.
Unhandled exception at 0x7706a4d2 in SlogOut3D.exe: 0xC00000FD: Stack overflow.
Here is the Call Stack:
> ntdll.dll!7706a4d2()
[Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
ntdll.dll!77086e27()
ntdll.dll!77086e0c()
ntdll.dll!770d1ec5()
ntdll.dll!7709ba51()
ntdll.dll!77087545()
ntdll.dll!77086e0c()
ntdll.dll!770871e6()
ntdll.dll!77086e0c()
msvcr90.dll!73593db8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
msvcr90.dll!73593eb8()
How to resove this exception?
|
|
|
|
|
T.RATHA KRISHNAN wrote: How to resove this exception?
Debugging?
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
None of my functions appeared in the call stack. How do I debug?
|
|
|
|
|
Still you may step with the debugger in your code (make sure you're doing it using the debug build).
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi!
Sorry. That Call Stack was the result while running Release mode. But, if I run in Debug mode, I got the following DLL missing error:
This application has failed to start because VCOMP90D.DLL was not found. Reinstalling the application may fix this problem.
What to do?
|
|
|
|
|
It looks like (Google told me) you're using OpenMP: check the requirements at the API page [^].
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.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
You can load the symbols from Microsoft servers (even in release mode): http://support.microsoft.com/kb/311503[^]
From what I see, some C runtime function is beeing called recursively and that causes stack overflow.
|
|
|
|
|
Also, if you KNOW you are recursing to a certian depth, expectedly of course, you could always modify your program to have a larger stack size. It seems most developers do not ever attmept this. The default with 32-bit Windows applications built with Visual Studio has been 1 MB for a very long itme.
Also consider moving your data off the stack and into a heap.
Look for alloca calls. Some of the MBCS->Unicode macros also consume stack space per string converted. You get one of those in a recursive function and can kiss your stack bye-bye!
|
|
|
|
|
Hi all,
i m using excel automation to write excel but is write date or any amount with currency symbol its not displayed properly in excel sheet.
please help me how can i display it.
thank in advance.
|
|
|
|
|
What does your call to PutValue() or PutValue2() look like? What does the cell look like afterward?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
HI ,
I am creating CListCtrl at run time and paining its row using CustomeDraw. But If any control is behind the list control, I am able to see and press.
How to draw the list control over another control.
|
|
|
|
|
Make it child of the control.
|
|
|
|
|
I created ListCtrl on Btn Click as child of dialog.
But controls that are already exist on the dialog they are getting diaply over the List control?
How to resolve this issue?
|
|
|
|
|
Change the position of listctrl using MoveWindow Or SetWindowPos.
|
|
|
|
|
This is not I am expecting
|
|
|
|
|
Hi,
Is there any one to solve this issue?
|
|
|
|
|
A much better solution would be to create the control at design time and then just show/hide it when necessary.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Can you show how you created the control? The fact that it's custom draw is probably not the issue here.
|
|
|
|
|
this->CreateEx(WS_EX_TOPMOST,WS_CHILD | WS_VISIBLE |LVS_REPORT |LVS_NOCOLUMNHEADER|LBS_HASSTRINGS|LVS_EX_TRACKSELECT|WS_TABSTOP ,rect, pWnd,nID);
this->SetWindowPos(&wndTop,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE); // here I m setting this control on the top.
|
|
|
|
|
Hi,
I am facing a problem related to window handle.
I have loaded two different OCXs in different instances of the same container application(OLE Server).
In OnCreate() method of second OCX control I am calling the AfxGetMainWnd()function.
It is called after calling the base class function of OnCreate() method.
Now trying to run both instances simultaneously.
The problem is sometimes AfxGetMainWnd()function returns the pointer to a window of first OCX control which is loaded in the first container instance just before. Why it happens?
Thankx in advance.
Regards,
SUnil
|
|
|
|
|
One of my program in VC++ uses the MS SQL Server 2000 as the DB and the app was coded in VC++ 6.0. The DB part was governed by the MFCs CRecordset and so on. The data is populated through the sequence as follows
1.CRecordset::AddNew();
2.Fill all the columnar data of the record
3.CRecordset::Update()
The problem now surfaces is, when the app running if the Optimization Job is done then the 3rd step throws the following SQL Error(By SQL Profiler)
Msg 16943, Level 16, State 4 Could not complete cursor operation because the table schema changed after the cursor was declared.
Please help me out in fixing this. Thanks in advance.
|
|
|
|
|
I really hope someone can offer some suggestions on this because I'm going bonkers here. I've spent days trying to hunt down this problem and I can't find it.
I have two combo boxes that are populated from atlas data. The first is a list of US states and countries. Once that selection is made, the second combo box is populated with a list of the cities in the selected state or country.
The code for the two is line-for-line identical - or as identical as it can be except for adding different strings. The combo box styles are identical, the event handling is identical. But one works (the state/country selection) and one has problems (the city selection).
In the state/country combo box, you can press the down arrow and move through the items. In the city combo box, the selection won't move with the arrow - or rather, it appears not to move. If you accept a selection and close the dialog, you find that the selection actually did change. You only can move one position with the arrow, and only the first time you try it. After that it appears stuck.
Also, when you make a selection with the mouse in the city combo box, you don't get what you select. You get a selection a few items off. The mouse selection works fine in the state/country combo box.
I have been over this code a million times and I can't see why one works and the other does not. Does anyone have any idea what the problem might be?
Thanks in advance.
|
|
|
|
|
Just a thought. If you made the "line-by-line identical" bits by cut/paste/edit, maybe you missed one combobox reference in the edit part. Very easy to do and difficult to see[1], particularly if the names are similar (using something like ComboBox1 and ComboBox2 almost guarantees a problem).
[1] Difficult to see yourself that is, but often sticks out like dogs' ****s to someone else!
Software rusts. Simon Stephenson, ca 1994.
|
|
|
|