|
Either link with the import library (.lib) or use LoadLibrary()/GetProcAddress().
onwards and upwards...
|
|
|
|
|
Hello!
Use AfxLoadLibrary(). From MSDN:
"
Be sure to use AfxLoadLibrary and AfxFreeLibrary (instead of the Win32 functions LoadLibrary and FreeLibrary) if your application uses multiple threads and if it dynamically loads an extension DLL. Using AfxLoadLibrary and AfxFreeLibrary insures that the startup and shutdown code that executes when the extension DLL is loaded and unloaded does not corrupt the global MFC state.
"
and then use GetProcAddress() either by name, or by ordinal
|
|
|
|
|
I am working on a project in which we have to provide a UI to user in which all frames belonging to a selected mpeg2 video file are displayed. User then assign some attribute to each frame and then we have to store that video with those attributes added to each frame. Can any one give some idea about libraries or API's or controls which can help us.
|
|
|
|
|
Hello !
I'm facing a debugging problem: I have a class created dynamically (with new operator). When this object is deleted, an exception is thrown BUT, the destructor is called correctly and works fine, the error occurs after the last line of the destructor and before the next instruction in my program.
The error occurs at line 1062 in dbgheap.c (if that helps you).
So, my question is: how can I find the source of this error ?? The object is quite big and using memory window will be very a huge task...
Any idea ?
Thanks
|
|
|
|
|
hi guy,
the first thing that comes to my mind is that one :
isn't your class derived from one other?
if you forgot to specify the virtual keyword in such case, it must freeze...
TOXCCT
|
|
|
|
|
No, it isn't !
But I found the solution: I use the hard way. I comment almost all the code that has to deal with this class, then uncomment step by step and found at wich block of code the bug appear when the object is destroyed.
In fact I was writing something out of the bounds of a dynamically created array of my class and it doesn't fire an exception at this time neither when I destroy THIS array, but only when the object itself was destroyed.....
Uf, quite hard to find this one
|
|
|
|
|
Look in your CRT source code. C:\program files\Microsoft Visual Studio .NET 2003\vc7\crt\src for VC7.1, C:\program files\Microsoft Visual Studio\VC98\CRT\SRC for VC6.
Basically, it's telling you that one of your allocations went wrong. You may have freed the same block twice, or you may have overrun the allocation.
To help catch buffer overruns, you can enable page-level heap allocations in Windows. You can download the PageHeap tool as part of the Windows Application Verifier[^].
|
|
|
|
|
Thanks for reply but I found a solution (see previous post).
But thanks for the link !! I'll download this tool this will help me to catch further errors !
|
|
|
|
|
hi..
i have a problem here. I am making use of a tab control in a dialog box. Since I have 3 pages which all require edit boxes, i will need to have overlapping ones (in order to ensure that each tab page gets a edit box of its own).
However, i couldn't add edit boxes afer some time.
can anyone enlighten me? is there a restriction to the number of edit boxes that could be added?
is the way i do things correct? as in making edit boxes overlap each other so that they will be displayed correspondingly (in correct position) in the various tabs correctly. Hope You guys can help me out on this!!!
Thanks a lot!
|
|
|
|
|
Use the each tabl like an idependient Dialog.
For this you must to use CPropertySheet and CPropertyPage...
Best Reagrds
Carlos Antollini
Do you know piFive[^] ?
|
|
|
|
|
Sorrie right now what i'm not using CPropertySheet and CPropertyPage. Is it true that using tabs will always necessary need to use them?
So do i just need to modify my code or redo it entirely?Since my tabs are done in a overlapping fashion (do you get what i mean?) I hope I don't have to redo everything, cos it can be pretty tedious.
any hints on how to go about doing that???
Thanks for your help!
|
|
|
|
|
Yes, I know that is a very hard work....
If you want you can use the tabctrl with a lot of controls like editbox, labels, custom controls, in it, but is very dificult to use because you must to oredr the controls in the OnInitDialog. Other solution is to create the controls in OnInitDialog.
When you feel that you are going crazy, it's better to use Property Sheet and Property Pages, because you will have each control in its dialog....
Each Dialog that will be a tab must be derived from CPropertyPage and not from CDialog. Then When you need to principal dialog, with all the dialogs in it, you must to use the CPropertySheet class and use the funcion AddPage for add each dialog in the Property Sheet...
Regards
Carlos Antollini
Do you know piFive[^] ?
|
|
|
|
|
Yeah!! Thanks a lot for your help!!
i know that I have to make use of CPropertySheet etc but most of the books i referred to , dont give me any information on how to go about doing tabs at all...
Any good websites to recommend?
Hope i can manage to complete it on time.
Thank you very much!!!!!!!!!!!
|
|
|
|
|
I was looking here in CP, but each article about PropertySheet and PropertyPage are about special implementacion.
I pasted you a lines of code.....
Trie to start with it, and then read in MDSN....
Don't worry is very easy....
Rememeber: each dialog must be derived from CPropertyPage, not from CDialog
<br />
CPropertySheet dlgProperties("Properties", this);<br />
<br />
CMyPropertieDlg dlg1;
CMyPropertieDlg dlg2;
<br />
<br />
dlgProperties.AddPage(&dlg1);<br />
dlgProperties.AddPage(&dlg2);<br />
dlgProperties.m_psh.dwFlags |= PSH_NOAPPLYNOW;<br />
if(dlgProperties.m_psh.dwFlags & PSH_HASHELP) dlgProperties.m_psh.dwFlags ^= PSH_HASHELP;<br />
<br />
dlg1.m_strCubeName = m_strCubeName;<br />
dlg1.m_strCatalogName = strCatalogName;<br />
dlg1.m_strCreatedOn = strCreatedOn;<br />
dlg2.m_strLastUpdate = strDate;<br />
dlg2.m_strDescription = strDescription;<br />
if(dlgProperties.DoModal() != IDCANCEL)<br />
return;<br />
<br />
Regards
Carlos Antollini
Do you know piFive[^] ?
|
|
|
|
|
hello!!!!
I have finally understood what it means to use CPropertyPage and CPropertySheet... But then I realised that I couldn't display the tabbed page after adding a certain number of combo boxes...... I'm going crazy. How come does a problem with displaying the combo boxes??
thanks!
|
|
|
|
|
azure33 wrote:
is there a restriction to the number of edit boxes that could be added?
In the past, the resource editor was limited to 255 controls. Whether that is still the case or not, I do not know. I've never been in the position to require that many. Adding the controls dynamically is limitless, I think.
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
Hi,
for a small build helper tool, I need to
- check out a file from VSS
- modify it
- check it in again
does anyone know of a "drop in" solution
I know how to do that stuff through the command line, but that's not the nicest way to go...
Flirt harder, I'm a coder.
mlog || Agile Programming | doxygen
|
|
|
|
|
I'd stick with the command line. VSS does have an Automation model, but all the people I've seen who've tried to write an Import-from-VSS tool have concluded that it's like a leaky vacuum cleaner - it sucks and blows at the same time.
|
|
|
|
|
Command line works ok (except all the config stuff required)
However, I'm gettin "whacko" ExitCode's when I don't insert some sleeps
(CreateProcess / WaitFor(process handle) / GetExitCode)
Might be a different problem, though
Flirt harder, I'm a coder.
mlog || Agile Programming | doxygen
|
|
|
|
|
Visual SourceSafe integrates directly with Visual Studio. There is a Project/Source Control menu option where the standard check in/check out options are available. Does that not work for you?
A rich person is not the one who has the most, but the one that needs the least.
|
|
|
|
|
|
Hello,
This is kind of a hard question to ask but I have been trying to figure it out for days and I am still having problems...
I have an application that uses CHtmlView, I am trying to login to a website, the web site puts a cookie down on the machine so if you were to close your browser and re-open it you would still be logged in. So I wrote a login dialog (part of the same browser SDI) that asks for the user name and password.. I use CInternetSession to login to the web site.. this works fine (after I pass the login I grab the HTML and parse it for the "welcome" message so I know I am logged in). Then right after the login I show my CHtmlView and surf to the web site but it doesn't show me as logged in. Some times I get a error msg on the website stating that my browser is blocking cookies (I know it's not blocking them but I can't figure it out)
Any ideas?
Rob
Whoever said nothing's impossible never tried slamming a revolving door!
|
|
|
|
|
Hi all,
Im currently developing a MFC-program in Visual C++ 6.0 that will identifiy a user through his/hers fingerprint.
The C++ program needs to be launched from another program with VBA support (so Im currently testing it in MS Excel)
The C++ program also needs to return a textstring with the username (or ID or some kind of text like "George Lucas")
With my very basic skills in VBScript I have manged to run the C++ program. But is it possible to get something back from the program ??
Im guessing that the C++ program might need some kind of method to communicate back to the VB Script ... ?
Im would be very thankful for any kind of help !
/ daniel
|
|
|
|
|
I'd be tempted to write the app as a COM DLL, so that it can be launched as an in-proc, supporting automation. You could expose a method
HRESULT Scan([out] BSTR* userid)
that did the scan, any lookup, and returned an appropriate username (or a null string on failure).
That would make the communication with the program much simpler.
Steve S
|
|
|
|
|
Thanks for your reply !
The app is like 99% complete though and it's pretty complex with a lot of dialogs functions. Could it be converted to a COM DLL in any easy way ?? (I have very limited experience with COM-programming and creating DLL's)
And if not .. could there be any other way ?
|
|
|
|