|
Hi PJ Arends,
Thank you for your answer! I already tryed our solution, but for a reason that I can't determine, the program crashes because of the declaration of my variable. In the class related to my program's page, I declare as public variable:
<br />
public:<br />
int Configured;<br />
and then I initialize to zero this variable before the configuration. Afterthat I set the variable to one and check in in my handler like that:
<br />
<br />
void CExcitaPage::OnEnChangeAmplitude()<br />
{ <br />
if (Configured) <br />
{ <br />
}<br />
}<br />
When I try to close the program, I become a classic Debug Error, Damage Block...
Do you have an other idea?
Thank you in advance
NikoiD.
|
|
|
|
|
You obviously have other errors in your program. I use this technique frequently if no problems. The debugger's error messages will usually give you a clue as to where the error is, although some detective work may be necessary.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Hi,
I am trying to use 'LoadLibrary()' & 'GetProcAddress()' functions to call the following function :
'D3DXCreateTextureFromFile(...)'
Now, this function is typedefed in 'd3dx8tex.h' as
#ifdef UNICODE<br />
#define D3DXCreateTextureFromFile 3DXCreateTextureFromFileW<br />
#else<br />
#define D3DXCreateTextureFromFile 3DXCreateTextureFromFileA<br />
#endif
So I wrote the following piece of code in my prog hoping to get things running at runtime...
################################################<br />
<br />
.<br />
.<br />
.<br />
<br />
typedef HRESULT (WINAPI *PFTEXT) (LPDIRECT3DDEVICE8, LPCSTR,LPDIRECT3DTEXTURE8*);<br />
<br />
HINSTANCE hLib1;<br />
PFTEXT pfText1;<br />
<br />
hLib1 = LoadLibrary("D3D8.DLL");<br />
<br />
if(hLib1 == NULL)<br />
return false;<br />
<br />
pfText1 = (PFTEXT) GetProcAddress hLib1,"D3DXCreateTextureFromFileA");<br />
<br />
if(pfText1 == NULL)<br />
{<br />
FreeLibrary(hLib1);<br />
return false;<br />
}<br />
<br />
if(FAILED(pfText1( m_pD3DDevice,szTextureFilePath,&m_pTexture)))<br />
{<br />
FreeLibrary(hLib1);<br />
return false;<br />
}<br />
<br />
FreeLibrary(hLib1);<br />
return true;<br />
<br />
.<br />
.<br />
.<br />
<br />
################################################
though it seems a working code it is not running properly giving NULL in 'pfText1' ie the function is not getting located from DLL. Also i think ( ) that there is a problem in DLL itself ie i am not able to find out where this function is defined (in which DLL). Please help me get this thing to work...
thxx.
gogizmo
|
|
|
|
|
its easier to put into the include directive in afx.h
Its better to use apparently the AfxLoadLibrary
heres a link for load library
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_core_link_explicitly.asp[^]
save your self trouble and type
#include <D3DX8.h>
at the top. make sure in tools->options->projects you have the paths linked up.
Building and executing a D3D sample will let you know.
my 2 cents from my experience, but I am in know an expert at c++
I'm not an expert yet, but I play one at work. Yeah and here too.
|
|
|
|
|
has anyone seen code that finds mersenne prime numbers???
|
|
|
|
|
Google for the GIMPS project. I was going to refer you to the Mersenne site but it is currently down.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
|
how can i find out the information about my computers processor like - Manufacturer, Clock Speed etc.
|
|
|
|
|
Try the Win32_Processor WMI class.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
and...how do i do that.....im pretty new to c++
|
|
|
|
|
WMI is a tall order to tackle if you are not that familar with C++ and COM. You might want to use the performance counters first to get the feel of things. See my example here.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
can i find out through code, the amout of processing power my application is using.
|
|
|
|
|
See if this helps.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
has anyone come across a matghematical equation or something similar which when executed on a computer takes a lot of time. something like umm....trying out all the possible combinations of a 14 character password.
|
|
|
|
|
uhm, this should do it
void main()
{
int i = 0;
while ( true )
{
i++;
}
}
Chris Meech
I am Canadian. [heard in a local bar]
Remember that in Texas, Gun Control is hitting what you aim at. [Richard Stringer]
Nice sig! [Tim Deveaux on Matt Newman's sig with a quote from me]
|
|
|
|
|
not something so simple....id like something more complex
|
|
|
|
|
|
Hi,
I've got two Tab controls placed on one Dialog window. The first Tab control is always visible and has two tabs. When i click on the second tab I want to display second Tab control inside the first one. Unfortunately first Tab control covers the second one although i gave it the WS_EX_TRANSPARENT style. How can I solve the problem?
|
|
|
|
|
is it possible to use splitter windows in a non doc/view application? if anyone has made such an application, I'll highly appreciate if u could tell me how.
thanks a lot,
Ankur
|
|
|
|
|
Check out the class CSSplitter found here on CodeProject. I use it in an app that has a re-sizeable dialog as the main window. Just search for CSSplitter and it's the only hit you'll get. It works very well.
|
|
|
|
|
Hey. I'm attempting to "lock" a Microsoft Word document using a simple MFC application. I've been searching high and low for flags or functions I could use to effectively "lock" the document. By "lock" I would like to make it so it can never be editted again. I could settle for having it password protection and I could just generate a random password and throw that away. Does anyone have any ideas or clues to help me get started searching? Thanks!
|
|
|
|
|
Hi everybody,
I have a program which runs in tray and it's dialog, let's call it 'main dialog' and i also have a popup dialog which should popup sometimes(for example every 15 minutes),my problem is that when my popup window pops up and receives focus(i.e user simply clicks it) then 'main dialog' shows up and i don't need that .i want to make my popup dialog 'independent' from 'main dialog'.
My problem is also that when both of the 2 dialogs are open i can't set focus to 'main dialog' untils i close the popup dialog.
Can anybody help?
Regards
m0n0
|
|
|
|
|
|
Thanks, but I've done it but it did not help
m0n0
|
|
|
|
|
Look into using a non-modal (or modeless) dialog. that is a dialog that does not "block" its parent. That alone will solve the second problem. You need to both do that and have an alternate parent window (not the Desktop, but NULL ) - doing both should accomplish what you want.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Tip for new SUV drivers: Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|