|
The real numbers are always stored in normalized form. The high-order bit of the mantissa is always 1 and it is not stored in the real*4 and real*8 formats.
More info: MSDN Library Visual Studio 6.0 - "IEEE Floating-Point Representation and Microsoft Languages".
Regards,
Andrzej Markowski
|
|
|
|
|
I have my dll injected into another process. Is there a way from that dll that I can tell what other dll's are mapped into the process, and be able to get the module handle to one of them? Any help is appreciated.
-Dev578
|
|
|
|
|
Dev578 wrote:
Is there a way from that dll that I can tell what other dll's are mapped into the process
EnumProcessModules() will do that for you. MSDN has a page called "Enumerating All Modules For a Process" that should have you the code you need.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
#include "witty-quote.h"
|
|
|
|
|
Hi dudes,
I want to change the default background color of SDI client are to black color. Actually it is in white color now. I mean I want to change the background color of View. In dialog box we have WM_CTLCOLOR. But I don't know what to do in view.
Thanks in advance for helping.
Promise.
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
|
How can this be done? I know how to change its background color but the text I can't get right...
|
|
|
|
|
This is one of the features I plan to add to FooButton[^]. Will let you know when the article is updated.
Meanwhile, you might want to check out (pun intended) some of the other owner drawn buttons here[^].
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Hi,
I'm a beginner but I tried to figure it out for you. The following code doesn't work, but it's what I came up with, and maybe it will give you some ideas. I have a simple dialog box with a few controls and I added this function to the Dialog class(CCodeProject_Dialog2Dlg):
HBRUSH CCodeProject_Dialog2Dlg::OnCtlColor(CDC *pDC, CWnd *pWnd, UINT nCtlColor)
{
HBRUSH hbr = CDialog::OnCtlColor(pDC, pWnd, nCtlColor);
if(pWnd->GetDlgCtrlID() == IDC_WIN98)
{
pDC->SetTextColor(RGB(255,0,0));
pDC->SetBkMode(TRANSPARENT);
}
return hbr;
}
How did you set the background color?
I can't believe the previous poster wouldn't help you. I clicked on the link he posted, and any of the author's of those button programs should be able to tell you how to do that.
Also, what's up with a programming forum that doesn't allow you to post indented code?
|
|
|
|
|
Is there anyone that has experiences with embedding WMF files to PDF without converting it to a raster image format?
Best regards,
A. Riazi
|
|
|
|
|
See the "Other enhancements" section here[^]. Hope this helps.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
This feature is part of another software. I want some source code/tutorial/article about it.
But thanks for your reply.
A. Riazi
|
|
|
|
|
My program has a debug assertion failure and it appears when i close the program the ASEERT failue dialog box is diplayed for a fraction of a second and disappears i am begining to sespect that this is due to the thread i create in my CView constructor in the thread there is an infinte loop and it never exits it postmessages in each second i never worked with THreads is it because the thread associated function never returns a value that i am receving the debug asserion failure ???
;)
|
|
|
|
|
Run the program under the VC++ Debugger and when the ASSERT occures press Retry to go into the debugger. Then look at the Stack Backtrace to find the cause.
Threads should be closed properly by your code. There are several waits to do this. One is to wait on an Event that you signal when your app is closing. Another is to force the thread to raise an exception. See: http://www.codeproject.com/threads/threadlibrary.asp [^] for a good example of this.
I have to wonder why your thread is posting a message once a second and what the thread is being used for. Threads shouldn't be an infinite loop. They should either Wait or Exit when processing is complete.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
Neville Franks wrote:
I have to wonder why your thread is posting a message once a second and what the thread is being used for. Threads shouldn't be an infinite loop. They should either Wait or Exit when processing is complete.
First I wanted to make a thread to post a message each second because i was not satisfied with windows timer WM_TIMER messages i wanted to make a timer that is more or less accurate and won't be affected by other messages placed in the queue such as fast mouse cliks or so.
Neville Franks wrote:
Run the program under the VC++ Debugger and when the ASSERT occures press Retry to go into the debugger. Then look at the Stack Backtrace to find the cause.
The main problem is the Dialog box saying i have a debug assertion failure is displayed for a very short time and boom!!! it goes. i could not even see what the error message. let alone to push the button retry, i tired to capture the screen when the dialog box is displayed and it was to fast to do so by pressing the print screen key on the key board.
The debug assertion is caused when i close the window and especially for the first time i boot my comupter and run it from the VC++ editor, after the first build it occurs occasionaly
|
|
|
|
|
leyusha wrote:
Neville Franks wrote:
I have to wonder why your thread is posting a message once a second and what the thread is being used for. Threads shouldn't be an infinite loop. They should either Wait or Exit when processing is complete.
First I wanted to make a thread to post a message each second because i was not satisfied with windows timer WM_TIMER messages i wanted to make a timer that is more or less accurate and won't be affected by other messages placed in the queue such as fast mouse cliks or so.
This makes little sense to me. If your thread is using PostMessage() then you have no better gaurantee of the timer message being received at a specific time than WM_TIMER messages.
leyusha wrote:
The main problem is the Dialog box saying i have a debug assertion failure is displayed for a very short time and boom!!!
I would say you have a serious problem somewhere (not helpfull I know). I'd set a breakpoint in the debugger in the MFC ASSERT code that opens the message box. I'd also have a close look at the thread function. Maybe it is Posting to a Window that no longer exists. Multithreading is a complex area and should be avoided unless you have a very good understanding of how it all works.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
Neville Franks wrote:
Maybe it is Posting to a Window that no longer exists
Yeap u are right i added a sleep function in the destructor of CView and was able to see the "ASSERT falure dialog box" and saw the file and line number with the assertion failure it seems that the CWnd::PostMessage() first checks to see if the CWnd is valid and hey it fails there.
Thanks a lot (now i have added a volatile bool variable to exit loop and a check to see if the CWnd is valid before posting a message and if not to exit loop)
|
|
|
|
|
Is there any function to draw draw a line with GDI? I can't seem it..:S
|
|
|
|
|
|
yeah i saw that function but it only lets me set 1 point.. not 2:s...
|
|
|
|
|
|
Thank you very much
|
|
|
|
|
I wanna make a standalone audio visualization. For that i would need the waveform or the amplitude of samples of the audio being played.
Is there ne way in which i can get the waveform or the amplitudes of samples of the media playing on the computer through stereo mixer and/or line-in??
This is similar to the way sound recorder can record ne audio being played by any application on the computer.
Pls hlp.
--
Nikhil
|
|
|
|
|
i already have a dll i could call up from a vb application but i would want to export multiple functions from the c++ dll. anyone got ideas
thanks
larry_larry
larry_larry
|
|
|
|
|
It is very simple. Just create a regular dll and export as much as functions that you want:
#define DLLEXPORT __declspec(dllexport)
DLLEXPORT int func1()
{
return 0;
}
DLLEXPORT void func2()
{
}
DLLEXPORT void func3()
{
}
A. Riazi
|
|
|
|
|