|
Anybody knows how collect information from user`s computer and how this unformation use ?
How to debug those applications ?
|
|
|
|
|
check if following link is helpful
http://www.codeproject.com/debug/mapfile.asp
greatest thing is to do wot others think you cant suhredayan@omniquad.com
|
|
|
|
|
Hi!
I'm using sprintf to get an integer into a string.
When I using strcpy I can use strcat to get my values on the same row.
Is there a command for that for sprintf?
Example how I will have it:
09:03:43 Stefan 123456
end example.
123456 is an integer that is calculated.
Thanks for your help,
Stefan
|
|
|
|
|
sprintf(szBuffer, "09:03:43 Stefan %d", nMyValue);
or if nMyValue is a long
sprintf(szBuffer, "09:03:43 Stefan %ld", nMyValue);
or if the other values are also variable
sprintf(szBuffer, "%s %s %ld", szTime, szName, nMyValue);
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
Thank you!
it was "ld" I missed.
|
|
|
|
|
Hi!
Is it possible to use the MS calendar control without placing it in the dialog using the resource editor?
I think it works somehow by subclassing another window, but I don't know exactly how.
Thanks in advance
|
|
|
|
|
of course can, do it like insert an edit box
|
|
|
|
|
Hi all,
an MFC application, MDI. VC7. the wizard has generated few classes for me. and one of them is the main frame CMainFrame (CFrameWnd). If there are no children, the user can see light gray background. How can i customize this background (draw a bitmap)?
When i do ON_WM_PAINT ->
OnPaint(void)
{
CPaintDC dc(this);
// try to draw into dc
}
no effect! still standard light gray background!
how do i cutomize the way background drawn?
regards,
alex
debug - is my life style
|
|
|
|
|
|
wow!
thank you!!!
that't exactly what i looked for!
regards,
alex
debug - is my life style
|
|
|
|
|
I anyone be knowing where can be finding a code for rule editor liking the one in Outlook Express for email filter. Is nice way to building conditions and rules, and would like use of such thing.
Thank,
Quzi
|
|
|
|
|
Hi !
I'm trying to understand what is a XML-GUI....I tried to do a google search but couldn't find any relevant link.
Does anyone know a good site I could look at or could explain me what's a XML-GUI (I know what is a GUI, but cannot figure out what XML has to do with it !).
Thanks !
Jerome
|
|
|
|
|
lets just say that i think my comp sci 1 teacher bought his phd over the internet, cause i didnt learn too much. This is our first assignment for Comp Sci 2 and i'm pretty lost.
heres the problem:
Write a C++ program that will process the user’s full name (i.e., first, middle, and last name –> Joe Bob Allen is an example) and display the name in various ways. There is only one word allowed for the first name and one word allowed for the last name, but the middle name can consist of multiple words. The maximum length of the full name is 75. The maximum length of the first name is 25. The maximum length of the last name is 25.
For the little i do know, i would think it would be easiest just to create a loop that breaks off words at the spaces in the string. We dont actually have to output the middle names, so i'm guessing there would be another loop that starts at the end of the string and works its way up (to get the last name).
Any help would be much appreciated
|
|
|
|
|
Use strtok () function.
Regards,
Jijo.
________________________________
Yesterday is history,
Tomorrow is a mystery,
But today is a present.
|
|
|
|
|
Hi,
I think u should make a structure for name
struct MyStructType
{ char First[25];
char Middle[25];
char Last[25];
};
with this way u can easily maintain all..
Data type can be CString...
OK!Good Bye..Have a Nice Life..Bye..Sumit Kapoor
Never consider anything Impossible before trying to solve that..---Sumit Kapoor---
|
|
|
|
|
CString str1,str2,str3,str("first mid dle last");
int n,m;
n=str.Find(" ");
m=str.ReverseFind(' ');
str1=str.Mid(0,n);
str2=str.Mid(n+1,m-n);
str3=str.Mid(m+1);
AfxMessageBox(str1+"\n"+str2+"\n"+str3);
greatest thing is to do wot others think you cant suhredayan@omniquad.com
|
|
|
|
|
crimsonclear wrote:
lets just say that i think my comp sci 1 teacher bought his phd over the internet, cause i didnt learn too much. This is our first assignment for Comp Sci 2 and i'm pretty lost.
It's usually not a good idea to blame your shortcomings on someone else.
crimsonclear wrote:
Write a C++ program that will process the user’s full name...
In this context, "process" is too ambiguous. What do you mean by it?
I think you can take it from here:
strchr(string, ' ');
strrchr(string, ' ');
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hi,
I have an MDI application. I want to know the correct method of clsing such applications. The code I've used is following:
CMainFrame::OnButtonExit()
{
CleanUp();
OnClose();
}
Is this correct?I am experiencing some strange behaviour when App exits.
Shd I use SendMessage(WM_CLOSE,..) instead? What is the cleanest way of exiting such a program. What is the order in which all the main windows of the program r destroyed?
Thnks in advance
|
|
|
|
|
PostMessage ( WM_CLOSE ) should do it, since that's the same thing that happens when you click the Close button.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | 1ClickPicGrabber New v2.0.1! | RightClick-Encrypt
There is a saying in statistics that a million monkeys pounding on typewriters would eventually create a work of Shakespeare. Thanks to the Internet, we now know that this is not true.
|
|
|
|
|
Hi there,
I'm using a multimedia timer in my program. The timer is going off ok but one of the actions triggered by the timer is a call to CWnd::GetParentFrame() which is eventually giving a debug assertion on line 879 of CWnd, the bit that goes:
CHandleMap* pMap = afxMapHWND();
ASSERT(pMap != NULL);
I've used GetParentFrame heaps of times before, so I guess the problem must be something to do with either the timer or something caused by the timer. Does anyone know what can make afxMapHWND() return null?
|
|
|
|
|
MFC has different HWND Maps for Different Threads
If a window is created in one thread and the CWnd * ptr is used in another thread ASSERT Failure will occur , not sure if this is the problem here but
Try to use the HWND instead of CWnd
might work
Hope it Helps
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
Just a question
void main(void)
{
int i;
for(i=0;i<100;i++)
{
Check(1);
}
}
void Check(int i)
{
char szMsg[100];
}
if the Check function will be called 100 times, will the szMsg be
1) created and disallocated 100 times as well
2) created once and remained till the Main ended
3) created once and not freed at all
4) created 100 times and not freed at all
if the answer is 1 or 2, then what is the difference / advantages if i use malloc or LocalAlloc instead? will there be performance problem?
I am doing a project on embedded device and memeory managment is crucial.
I thanx anyone who gave me expertise answer.
|
|
|
|
|
Short answer: 1
But note that it is created on the STACK and not on the HEAP (like malloc would).
In an ideal world this wouldn't take any time at all (the SP has to be adjusted anyway) but (and I'm not 100% sure about this) the compiler might decide that the memoryblock needs to be zeroed out which ofcourse takes time.
By using malloc instead you would be going through the memorymanager which tracks the allocated blocks which is pretty slow.
The fastest way (IF the compiler clears the block) would be to declare the block static.
And if the paths that I have followed/have tread against the flow/there is no need for sorrow
I am coming home
Return, Crüxshadows
|
|
|
|
|
In Window CE devices, Will there be any difference in creating on the stack and heap?
I have a current program that sometimes during usage by client, will cause the program to crash.Went through the codes and debugging, still cannot find the bug. It only happens randomly but particularly at a specific places where there is a lot of loading of GUI on the screen.
Hence, i need to fine tune all this problems, hopefully an upgrade on the program won't cause this program. I am also trying the try-except method to prevent exception error.
|
|
|
|
|
Another factor to consider is the limited amount of stack available; by default, you have 64KB of stack, which has to encompass all of your thread's execution. If you run out of stack, Windows CE will raise a Stack Overflow exception. You shouldn't try to catch this - it indicates a serious problem. If uncaught, the thread will be terminated.
You should really only use the stack for short-lived items and in leaf functions (functions that call no other functions). Using the stack for anything that will have a long lifetime (e.g. your main frame window) isn't a good idea.
|
|
|
|