|
If you want an easy solution (yeah, I always prefere a solution where I don't need to read a bunch of articles ), you can simply launch the debugger (press F5) and then, when your program exits, you will have a dump of all memory leaks your program produced (and you can double-click on the lines and it will show where the memory has been allocated).
But this works only when the memory has been allocated with new and of course it only shows you the memory leaks your program produced (not all potential ones). That is, if there is function that is called when you press a button and if there is a leak within it, if you don't press the button, the leak won't be detected.
|
|
|
|
|
hi
how can i have a custom control in a property page?
i think i may register a window class, but i don't know how.
i think another way may be overriding OnPaint on a CStatic, but i know how to do it only in a dialog, not in a property page.
besides, controls may have undefinable IDs, that is a control may get its ID dynamically which is not constant to define a variable based on it.
help me please
|
|
|
|
|
Hi,
I'm trying to separate the mouse cursor movement from the mouse movement...
The problem is, when using a touchscreen monitor, I can capture the touch events using RawInput, and I want to process those events internally, without the mouse cursor moving.
However windows sees the touch event and moves the cursor.
So, is there any way of separating mouse events from the on-screen cursor movement, such that the on-screen cursors position is controlled purely by my application.
Thanks...
Simon
|
|
|
|
|
U can use the HOOK fundamentals of the windows OS
just track the mouse_events
Get the mouse coordinate sotre it in some variable
in the application the u can reset the mouse cursor
to its original coordinates
Its a long time i have used hook so u can just go
throught some projects on this site , and check that
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
Thanks,
Unfortunatly, this doesn't prevent windows moving the cursor, so you still get the cursor jumping to the unwanted position then going to the wanted position...
|
|
|
|
|
How can i use the Dynamic Data Exchange with the combo box.
I just want to initialize my combox box with an element at
index 0.
Is it possible by DDX to restore the selection done by a user??
thank you
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
vikas amin wrote: I just want to initialize my combox box with an element at
index 0.
If the control is empty, use AddString() . Otherwise, use InsertString(0, ...) .
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi David
Actully i mean that i wanted to use the
dynamic data exchange.
As for the Edit box we can Initalise & use the variable defined
as the CString by using the Wizard.
To initalise a editbox varibale CString m_passwordvalue
we can add this code to the dialogbox constructor
m_passwordvalue = _T("1");<br />
m_usernamevalue = _T("PMR");<br />
By the DoDataExchange function the data from the edit box is
transfered to the varibale (m_passwordvalue) on doing
UpdateData(FALSE)in any of our functions ;
<br />
void LoginBox::DoDataExchange(CDataExchange* pDX)<br />
{<br />
CDialog::DoDataExchange(pDX);<br />
DDX_Control(pDX, IDC_PASSWORD, m_password);<br />
DDX_Control(pDX, IDC_USERNAME, m_username);<br />
}
I wanted to use the same fundamental for the ComboBox is it
possible ???
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
vikas amin wrote: is it
possible ???
Anything is possible, but the bigger question is why would you want to? Populating listboxes and comboboxes using DDX is just kludgy.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I want to use "Specstrings.h" , Perhaps I should install "Microsoft Platform SDK for Windows XP SP2",
But in microsoft site , I couldn't find "Microsoft Platform SDK for Windows XP SP2", who can tell me where can I find it?
Please help, Thanks a lot !
|
|
|
|
|
Do any one know were can i find the code
for the hufman in assembly language or
in C.
thanks
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
hum, if i remember well, i've already seen such a thing when i was hardusing my TI-89 calculator. i believe that the sources can still be found on the web as they are free...
see on Leiber[^] web site, and on this library[^] in particuliar. search in the zip for flib2.c and look for the string "komp:" in the file to see the algorithm in C.
for assembly code, see in this[^] zip file.
it may be assembly for Motorola 68k, but hey, that's already a big code, isn't it ?!
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Thank you TOXCCT
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
is that what you were looking for ?
(if so, don't forget to vote for it !!! )
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hello,
I am setting maximum length of the Edit box as 36 bytes using the API SetLimitText(36).
Since each japanese character is 2 byte long, it should accept only 18 japanese characters.
But in case Japanese XP OS only, it is accepting 36 japanese characters instead of 18 japanese characters.This happens only in Japanese XP.In other OS's the same character is used and it is accepting only 18 japanese characters.
Please provide some solution for this problem.
Thank you,
Shiva
|
|
|
|
|
shiva e balasubramaniam wrote: I am setting maximum length of the Edit box as 36 bytes using the API SetLimitText(36).
Which implies ANSI.
shiva e balasubramaniam wrote: Since each japanese character is 2 byte long, it should accept only 18 japanese characters.
Which implies Unicode.
Are you re-compiling the code for each environment, or is the same .exe being used for each?
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
Hi,
Thanks for your reply.
We are using a single .exe. In the project settings->process definitions shows we are using _MBCS.
Thank you
Shiva
|
|
|
|
|
HELLO!!!!!
I am working on an MFC application. On execeting the program it is not giving any errors. But, on clicking on a the command button, it gives error message,"Run Time Error!! The program has requested runtime to terminate in an unusual way"
What should i do, to remove it? I had not called abort anywhere in my program. Please help me.
Thanx a lot
|
|
|
|
|
It happens because an unexpected error occured in your program (it is a bug).
kind_person wrote: What should i do, to remove it?
That is really simple: remove the bug .
Without seing code, it is impossible to help you. Post the code where the problem occur (use the code tag to format the text correctly). Did you use the debugger also to see where your program crashes ? (Press F5 to start the debugger).
|
|
|
|
|
Hello!
When I debugged my program, it is giving the following message:
"Unhandled exception in PracticeINI2XML.exe(KERNEL32.DLL): 0xe06d7363:Microsoft C++ Exception. "
Also in the Output Window it is giving message:
"no matching symbolic information found" against kernel32.dll and gdi32.dll.
how to remove the bug now??
|
|
|
|
|
Find and open the stack window in Visual Studio when the program has terminated. Follow the function calls on the stack until you find a function in your program. And there you can find the cause of the problem.
|
|
|
|
|
kind_person wrote: "no matching symbolic information found" against kernel32.dll and gdi32.dll.
That is normal, don't pay attention on that.
kind_person wrote: "Unhandled exception in PracticeINI2XML.exe(KERNEL32.DLL): 0xe06d7363:Microsoft C++ Exception. "
Ok, but in which file is the problem occuring ? Try to use the debugger correctly, that is setting breakpoints (F9) at precise points of your program. You said that this error hapenned when you press a button then you can put a breakpoint in the function and go step by step in the program to see where it crashes. You could also post HERE the code of the function (only the code of the funcion and using the code tags).
And please, don't send private mails with source files as I don't have Visual studio installed on my computer. So I cannot test your program. You'll have to be more precise in your question (I cannot go into all of your files and read everything).
|
|
|
|
|
Hi
I have developed the dialogbased MFC application and in that I want to print a text a marquee. i.e it scrolls from right to left horizontally.
For this i have used a timer control and on every few ticks I am showing my text by TextOut() functions at one pixel or few pixels ahead of last time.
But here when I use large font size i.e of 200 or like that, it gives me more flickering.....and also it moves bit slowly....is there a way to remove flickering and moving text fast....
Thankx in advnce
Amarelia Maehsh
Gujarat
India
|
|
|
|
|
Amarelia wrote: For this i have used a timer control and on every few ticks I am showing my text by TextOut() functions at one pixel or few pixels ahead of last time.
This the problem. I suggest you should use some backbuffering here. This needs two draw spaces : One that is displayed, and one on which you draw your text, and you swap them "every few ticks".
For this, I recommand showing at CMemDC (search for this on Codeproject).
~RaGE();
|
|
|
|
|
First of all since you are using a dialog base application, I suggest you not to use DrawText. Rather you can use any Level control to put display the text. And you can Invalidate the Level control in regular interval.
|
|
|
|