|
Get and use the zlib library.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
|
When I read about the bug last week, dummy me thought they'd already fixed it. However, for controlled data, I don't think it's a problem.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
I have a problem
I finished programming my c++ software
When I run the software, it is working normaly but when I exit the dialog using DestroyWindow() an error message appears saying: "Debug Assertion Failed!" winhand.cpp and line 229
Then, the software exit like it is suppose too but how can i get rid of this message
help plz it is very bothering
and i couldn't enter my name and e-mail to send this message for a reason although i am halawlaws and my e-mail is ahalwany@hotmail.com
thx
Halawlaws
|
|
|
|
|
Halawlaws wrote:
...but when I exit the dialog using DestroyWindow()...
Why are you doing this? Is this a modal dialog?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Try exiting the dialog using EndDialog(). Also, sometimes it is helpful to look at the code the error message is pointing you to, in this case winhand.cpp/line 229. And by the way,
Halawlaws wrote:
Then, the software exit like it is suppose too
The software is not exiting like it is supposed to. The software is aborting becuase of a debug assertion failure. If, for example, when exiting this dialog you were supposed to return to another part of the program, your software would still completely exit.
I can't tell anything more without actually seeing some of your code. Hope this helps!
Danny
|
|
|
|
|
Hey Dany thx man EndDialog(0) worked my program is now perfect but i still didn't know why this assertion problem occured
regards
Halawlaws
|
|
|
|
|
Hi there,
I have in my application a window in which I open files for edit. I present them in a tab style when there is more than one window open (similar to the source browser window in Visual Studio). what I'm trying to do is changing the name of the tab for views which are of the same document. Unfortunatly, I have no success till now.
First I try SetTitle() but ofcaurse that causes to all of the tab titles related to the same document to be changed.
Then I tried to do the following steps:
I add in
1. CChildFrame::PreCreateWindow(CREATESTRUCT &cs) :
cs.style&=~(LONG)FWS_ADDTOTITLE;
2. CMyView::OnInitialUpdate() :
GetParent()->SetWindowText("temp");
but it made no effect on the title.
How can I change the title of those tabs ? From where those tabs take the data for the title ?
I really need your help here,
thanks,
yaron.
|
|
|
|
|
Try overriding OnUpdateFrameTitle (undocumented) in your CChildFrame . Look at the standard implementation of CMDIChildWnd::OnUpdateFrameTitle in MFC source files to get a hint on how to implement it.
Hope that helps,
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hello,
I have a CString variable with a date and i want to extract the day.
My problem is that i don't know the regional settings of the machine (for example if date is yyyy-mm-dd or dd-mm-yyyy) so i can't use for example .left(2)
I want to know if i can access to the regional setting format date in C++ or how to convert a CString into a date.
Thanks
|
|
|
|
|
Using the win32 api, you could do something like this snippet here:
char caData[256];
caData[0] = 0;
GetLocaleInfo(LOCALE_SYSTEM_DEFAULT,LOCALE_SSHORTDATE,caData,sizeof(caData)-1);
m_cShortDateFormat = CString(caData);
char *p = caData;
while (*p && *p == ' ')
p++;
switch (*p)
{
case 'd':
m_cClientFormValidationDateFormat = "D/M/Y";
break;
case 'Y':
m_cClientFormValidationDateFormat = "Y/M/D";
break;
case 'M':
default:
m_cClientFormValidationDateFormat = "M/D/Y";
break;
}
onwards and upwards...
|
|
|
|
|
Something like:
CString strDate;
COleDateTime date;
date.ParseDateTime(strDate, VAR_DATEVALUEONLY);
TRACE("Day = %d\n", date.GetDay());
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi,
I'm using ClistCtrl to display some data I'm receiving.
I need to display only the updated data,so the old data will disappear when there is new data to display(i get new data every 200msec).
The problem is that my ListCtrl is flickering when I'm calling
MyList.DeleteAllItems() function(I'm doing it with timer event).
How can I avoid this annoying flickering?
With best regards,
Eli
|
|
|
|
|
Instead of using DeleteAllItems(), use CustomDraw message handler and in that one include to DeleteAllItems() and insert the new data.
Neelesh K J Jain.
|
|
|
|
|
Hi Neelesh,
Thanks for your prompt reply.
Do you have any example how to do this?
How should I use the CustomDraw message handler?
Regards,
Eli
|
|
|
|
|
Eli,
you can see the article "Dynamically Highlight Elements in a List Control" at http://www.codeproject.com/listctrl/highlightlistctrl.asp
Neelesh K J Jain
|
|
|
|
|
How about a call to SetRedraw() before and after the insert/delete operations?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I'd try this first:
SetRedraw
If you still get flicker, try drawing offscreen:
Flicker free drawing of any control
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
You can disable the painting on the list control with SetRedraw(FALSE);
I'm using this technique when updating my list controls.
m_lstCtrl.SetRedraw(FALSE);
m_lstCtrl.DeleteAllItems();
...
m_lstCtrl.SetRedraw(TRUE);
IMO this is easier than trying to implement Custom or Owner Draw
|
|
|
|
|
I am trying to implement an mfc dialog based application which will start when the system starts up just like a windows service...
|
|
|
|
|
Hello
You can place your app path into registry under the key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Andrew
|
|
|
|
|
Another Method is to place a shortcut of your application on the directory "startup"
AntonlioX
|
|
|
|
|
I have made an application. Now i want to put its icon in the right corner of my task bar. How can i do that? Moreover, how can i display my own tooltip when i hover my mouse over that icon in the taskbar.
|
|
|
|
|
|
See this thread.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|