|
Here's the steps:
You already have a DLL that was made from a MFC extension DLL project. In this DLL you have some classes that are exported by means of the AFX_EXT_CLASS macro. These classes are declared in a number of .h files. By compiling this project you have the DLL file and the .lib file.
To use this DLL in another project you would:
a) include the header(s) declaring the exported classes in the relevant source files in your app project. This is the very same .h files you used when you compiled the DLL project.
b) put the path to the .lib file into the project settings: Project->Settings->Link tab->General category->Object/library modules
compile and enjoy
Cheers
Steen.
"To claim that computer games influence children is rediculous. If Pacman had influenced children born in the 80'ies we would see a lot of youngsters running around in dark rooms eating pills while listening to monotonous music"
|
|
|
|
|
Dear Steen,
Today was nice day for me ... because i got all my answers ...
Thanks
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
How can I run my application before password in win98
|
|
|
|
|
Add a value to HKLM\Software\Microsoft\windows\CurrentVersion\RunServices key. Also search MSDN for RegisterServiceProcess().
--Mike--
http://home.inreach.com/mdunn/
Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese?
Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
|
|
|
|
|
I added a value as your answer,but the pwd dialog display with my dialog at
the same time,I hope the pwd dialog display after my application end!
|
|
|
|
|
I'm trying to fix the bug in my CButtonSSL class regarding radio buttons. I'm getting there (at least it doesn't crash any more!), but I'm still having a few problems.
The Platform SDK: Windows User Interface documentation for Radio Buttons states:
When the user selects either state [checked or cleared], the radio button receives the keyboard focus. The system sends the button's parent window a WM_COMMAND message containing the BN_CLICKED notification code. The parent window doesn't acknowledge this message if it comes from an automatic radio button because the system automatically sets the check state for that style." ...
"When the user selects an automatic radio button, the system automatically sets the check state of all other buttons within the same group to be cleared."
My question is how? Where does the system handle this? If I have a group of radio buttons I can see the sending of the BM_SETCHECK and BM_GETCHECK messages to the radio buttons but when my button gets clicked there is no BM_SETCHECK message sent even though it has the BS_AUTORADIOBUTTON style set.
Derek Lakin.
Salamander Software Ltd.
|
|
|
|
|
Where does the system handle this?
Spy++ shows that it's a WM_LBUTTONUP which triggers the sequence of BM_GETCHECK and BM_SETCHECK messages.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I couldn't get a handle on where this was happening or why my buttons weren't getting BM_SETCHECK messages so I've handled it all in the OnClick event handler.
It traverses through the controls in the same group sending BM_SETCHECK to each in turn.
Does this seem like a sensible solution? It appears to work for radio groups of mixed standard and custom radio buttons and groups of all custom radio buttons.
Derek Lakin.
Salamander Software Ltd.
|
|
|
|
|
If it works, it is a sensible solution. Technically, the only difference between your code and Windows is that you're setting buttons states in response to (reflected) BN_CLICKED. With autoradiobuttons, BN_CLICKED notification is sent to parent dialog during WM_LBUTTONUP processing, after series of BM_SETCHECKs.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
|
What am I doing wrong with this code?
#include "msxml2.h"
HRESULT hr;
IXMLDOMDocument *pXMLDoc;
hr = CoInitialize(0);
if (SUCCEEDED(CoCreateInstance(CLSID_DOMDocument,
NULL,
CLSCTX_INPROC_SERVER,
IID_IXMLDOMDocument,
reinterpret_cast<void**>(&pXMLDoc))))
{
//Do some code
}
CoUninitialize();
And I get linker errors:
LNK2001: unresolved external symbol _CLSID_DOMDocument2
LNK2001: unresolved external symbol _IID_IXMLDOMDocument
Please, I need help !!!
|
|
|
|
|
LNK2001 usually is fixed by linking with the right .LIB file. If you do a text search of your LIB directory, you'll find IXMLDOMDocument in uuid.lib (but you need the Platform SDK installed so you have the latest LIBs). CLSID_DOMDocument2 is in msxml2.lib in the prerelease directory.
--Mike--
http://home.inreach.com/mdunn/
Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese?
Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
|
|
|
|
|
Sorry for my ignorance, but I'm learning and I didn't understand you. I've the file msxml2.lib, what I'm supposed to do with it?
thanks in advance,
|
|
|
|
|
Open the Project->Settings dialog in VisualC++, switch to "Link" tab and add the name of library "msxml2.lib" to the "object/library modules" line.
|
|
|
|
|
Thanks!
I'd actually found by myself by playing with Project->Settings, the problem I have now is that I should'nt have done it because now I get thousands of all kind of errors!!!
Do you know how to undo the disaster I've provoked???
|
|
|
|
|
It may be simpler to do a #import of the dll to get the typlib and header files needed for the namespace. This is normally how I do it when using MSXML in any of my projects. I don't have a sample of it where I currently am. I'll look for it when I return home.
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
|
|
|
|
|
Michael,
Do you tend to leave your schema as flat files or put them in a resource file?
TIA
eternal student
Give a man a fish and you feed him for a day; teach him to use the 'net and he won't bother you for weeks.
|
|
|
|
|
I have no idea. I've never done anything that complex with XML.
--Mike--
http://home.inreach.com/mdunn/
Ford: How would you react if I said that I'm not from Guildford after all, but from a small planet somewhere in the vicinity of Betelguese?
Arthur: I don't know. Why, do you think it's the sort of thing you're likely to say?
|
|
|
|
|
Hi all,
I have question about ADO,
How can i use Timeout and Idle time in ADO connection object ?
(Please write small example)
Thanks.
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Timeout
_ConnectionPtr pADOConnection;
pADOConnection.CreateInstance(__uuidof(Connection));
pADOConnection->ConnectionTimeout = 30; // 30 secs
|
|
|
|
|
Thanks Mr.Rashid,
In last i wanna know, Is in Connection object, function like Idle time ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
Hello,
I need a toolbar for my website like yahoo companion or Google toolbar. I'd like the code in VB or VC bt Vb is preffered.
I need it to be downloded from Internet (i.e. my website) and I'd appreciate the message box like Yahoo and Google Does like "Always trust content from My Website"
Please let me know what things do you require. I'll need the full source code and I'll need a manual of the updations to be done. I want it to be fully customizeable. That means I should be able to add new links, creat new menus and evrything that is possible...!!!
We can then talk later to discuss the other matters. Your name will be listed in the about box. CAn you please show me an online demo of your work..???
Please reply asap...!!!
Sincerely,
Ajay
|
|
|
|
|
Bloody hell, you don't ask much, do you ? The information to do what you want is all on this site. I don't know if it can be done in VB, but it can certainly be done in a *real* programing language like VC++.
I'd suggest that the first step in finding a willing slave if you're unwilling to learn to do it yourself despite the excellent tutorials on the site is to put a name to your posts.
Christian (on Jono's mchine, while my kids wreck the place around me)
|
|
|
|
|
Dear Jonathon,
Believe me I really don't know VC++ but I'm well versed in VB. CAn you please tell me if this can be done in VB and please gimme ome resourese or some contact of the person who can do this...!!1
Ajay
|
|
|
|
|
Okay,
So I have a menu from a system tray icon. In this menu is a static
popup menu. Inside that menu is a dynamic series of further popup
menus. In each of those menus are the actual menu items...
So far I handle WM_INITMENUPOPUP. Grab a CMenu* to the top level
static popup. Then loop: Create a dynamic popup menu. Create a new
menu with all the elements that will go in that dynamic popup. Then
AppendMenu that menu to the dynamic popup menu.
The problem, an Assert when expanding any dynamic popup menu (going
out of scope?). The code seems to work fine if I use a CMenu* popup
instead but ofcouse leaks memory.
How should I be doing this properly (ignore messages for now). CMenu*
or not? Where to delete? Handle one popup at a time perhaps? i.e.
First when initial menu is selected, then when popup expands etc. Any
pointers much appreciated...
<br>
void CMyDlg::OnInitMenuPopup( CMenu* pPopupMenu, UINT nIndex, BOOL
bSysMenu )
{
...
CMenu* pBase = pPopupMenu->GetSubMenu( 0 );
for( int i = 0; i < m_nPopups; i ++ )
{
CMenu popup;
popup.CreatePopupMenu();
for( int j = 0; j < m_nItems; j ++ )
{
popup.AppendMenu( MF_BYPOSITION | MF_STRING, 0, "test" );
}
pBase->AppendMenu( MF_STRING | MF_POPUP, ( UINT )popup.m_hMenu,
"popup" );
}
}
|
|
|
|