|
Who have seen the project ICONIZER in codeproject.com??? You can get it by http://codeguru.earthweb.com/shell/iconizer.zip
It is a great code. But I have found a big bug in it.
CASE: Open notepad.exe program -> run ICONIZER -> Open ABOUT DIALOG of notepad.exe -> exit ICONIZER -> press OK button in ABOUT DIALOG, finally, the notepad.exe crashed....
who can anwser this question???????
|
|
|
|
|
If I don't open taht ABOUT DIALOG, this bug will never appear...
|
|
|
|
|
Hi, everybody,
This may be a stupid question, but I really hope somebody to help me...
I got some trouble about the "unit" and "unit conversion" for rendering an image.
I have read some people's share codes on this web site. Those codes are all for image rendering with the COM interface IPicture. Here are my questions.
1. IPicture::get_Width: Returns the current width of the picture in the picture object. (from MSDN), the API is as follows:
HRESULT get_Width( OLE_XSIZE_HIMETRIC* pwidth //Receives a pointer to width );
My question is, what kind of unit we get from pwidth ? I mean, is pwidth in inch ? or in mini-meter ? or anything else ? Does this IPicture use MM_HIMETRIC coordinate system ?
2. If there are some code segment related to calculate the dimension (in pixels) of an image,
HIMETRIC_INCH is 2540
long hmWidth;
long hmHeight;
m_pPicture->get_Width(&hmWidth); /// m_pPicture is of type pointer to ///IPicture
m_pPicture->get_Height(&hmHeight);
rcResult.cx = MulDiv(hmWidth, pDC->GetDeviceCaps(LOGPIXELSX), HIMETRIC_INCH);
rcResult.cy = MulDiv(hmHeight, pDC->GetDeviceCaps(LOGPIXELSY), HIMETRIC_INCH);
Could anybody explain why HIMETRIC_INCH (2540) is used above ? And explain more about the above formula ? Is hmWidth (or hmHeight) in mini-meter ?
Thanks in advance ! Any reponse will be appreciated !
|
|
|
|
|
marouane miftah el kheir wrote:
C:\Windows\Desktop\mCpp2.cpp(8) : error C2146: syntax error : missing ';' before identifier 's'
Check your syntax. Are you missing a semicolon on one of your lines? Perhaps you're missing a semicolon after one of your "class {...};" definitions.
Jon Sagara
What about ?
|
|
|
|
|
LOL
He deleted all his posts
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Too bad, I was willing to help him.
Jon Sagara
What about ?
|
|
|
|
|
Where do i find the exception-declaration info for try-catch statements...?
I'm currently using catch(...) but i'd like to be a little more specific.
Do i have to use (CException* e) with MFC apps?
I can't much on try/catch in the online docs...any ideas?
TIA
"An expert is someone who has made all the mistakes in thier field" - Niels Bohr
|
|
|
|
|
I have some problems with windows messaging
I create a Custom control with the create funtion in my InitDialog function:
m_pGrid = new CGridCtrl(22,9,0,0);
m_pGrid->Create(rect,this,1);
How can I set my dialog up to receive notification messages?
I would use:
ON_NOTIFY(GVN_ENDLABELEDIT, ???, OnGridStartSelChange)
but I do not have the ID of the control.
Thank You
LP
|
|
|
|
|
By specifying the ID in the Create Function.
Sometimes you just search in the wrong spot.
LP
|
|
|
|
|
Hi,
Just wondering if anyone has any ideas on the following.
I have a largish memory mapped file (~80Mb) to which data is being consistantly written to and read from. The problem lays in the once part of the MM file has been written to on Win 9x (the problem doesn't exist on NT) memory is used, the only way to free this memory is to completely close the MM file and re-open it. This is a large hit to take, ie 70-80% of CPU for approx 2 seconds when flushing every 30 seconds. Is there any way I can consistantly flush the data out of memory when it hasn't been used for a specified time?
Thanks
Stuart
|
|
|
|
|
in a MFC dialog based app, i got my previous app to work finally but i also need the edit box to be checked for entered text, if nothing is entered it has to generate a message box stating so when the show button is clicked.
like i said i got it all working, i can enter some text and click the button and have a box pop up displaying what i typed. but i'm not sure how to make the button check the edit box for text and display my error message.
also it's not important but where would i put the updatdata to clear the edit box once ok is clicked on the message box.
here's the part of code i'm referring to:
void CProgEx3Dlg::OnShow()
{
GetDlgItemText(IDC_TEXT,m_sText);
MessageBox(m_sText,"Sample Dialog Box",NULL);
}
thnx again in advance
|
|
|
|
|
I am writing a program.
In this program I wanna know whether the CD-ROM's door is Opened or Closed?
How I can write code?
|
|
|
|
|
hi there,
a good starting point is to search the MSDN for MCI . Another (but much harder) way is the function DeviceIoControl() .
..have fun..
jk
|
|
|
|
|
I wanna know which Function I can use ?
|
|
|
|
|
mciSendCommand() or DeviceIOControl() .
There's no Function like Is_Drive_A_CDRom_And_If_Its_So_Is_The_Tray_Open(LPCTSTR pszDrive) .
RTFM
..have fun..
jk
|
|
|
|
|
Try (file-)reading-routines on the CD, if it fails drive is open, if it doesn't fail, drive is closed
|
|
|
|
|
Does anyone know of a good UNICODE Registry, or INI file class? If you do could you let me know? Thanks.
- Matt Newman
-Sonork ID: 100.11179:BestSnowman
Frankly AOL should stick to what it does best: Fooling millions of americans into believing that it, AOL, is the web. -Paul Watson
|
|
|
|
|
Hi,
Can some one post me a good example of a plugin based application. I would like to implement an app with a plugin structure like photoshop., I guess an expert with this must write a small plugin based example app with some good explanation. This I think is one of the difficult areas but still very useful
Any links, source code, articles welcome
|
|
|
|
|
I wrote an artical which does document/view plugins. Heres the URL:
http://www.codeproject.com/docview/docviewfromdll.asp
It may be useful for what you are doing.
Roger Allen
Sonork 100.10016
If I'm not breathing, I'm either dead or holding my breath.
A fool jabbers, while a wise man listens. But is he so wise to listen to the fool?
|
|
|
|
|
What are they, and why do they plague me so when creating ActiveX controls dynamically
|
|
|
|
|
Exceptions are error signals raised by the system (or the program) to indicate some kind of failure (much in the same way as C++ exceptions). Exceptions cause all the nested functions that are in progress when the exception happens to exit prematurely (this is called stack unwinding).
If the program does nothing to prevent it, exceptions unwind the stack all the way down till the program terminates (and possibly some system error message box appears). A program can however catch the exception with an exception handler (__except in C, catch in C++), so preventing the program to terminate. Hopefully, the exception handler deals with the problem and keeps the program running fine.
Regardless of whether an exception is caught or not, the debugger always sees it first, and reports on the debug output window. So, what you're seeing are exceptions occuring inside the ActiveX code that are handled internally yet reported by the debugger.
The moral of this story is: if you see a first-chance exception report but the program keeps running, assume in general everything is fine and do not worry about the matter.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Thank you,that puts my mind at rest
|
|
|
|
|
Hello,
I have an application that calls functions in a static library, which internally does something with sound card( static library is third party library). I call a function say x(on button click), and after the function call finishes the CPU usage goes to 100% ( on displaying the UI). The function work perfectly if i call the same in a console application and CPU usage is normal. Any help is appreciated.
Thanks
Ganesh.M.Ramaswamy
|
|
|
|
|
Have you tried breaking your program while it is using 100% CPU?
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Yeah, i did. after a long struggle it terminates.
Ganesh.M.Ramaswamy
|
|
|
|