|
Hi All,
I Have problem working with activeX custom property of type VARIANT_BOOL using VC++.Net 2003. I have added the VARIANT_BOOL custom property using MFC ActiveX wizard. and in the control constructor, I am initializing it to VARAINT_FALSE. But when I try to get the value using container application it always set as TRUE.
Please help me.
Thank you in advance.
Regards,
Gopal
Gopal Naik
|
|
|
|
|
Is it possible to make a function call to a dll from another dll?
If you could share an example on how it can be done, I would really appreciate it.
Thank You.
|
|
|
|
|
Yep, but you can't load the child dll while the parent dll loads, because LoadLibrary is synchronized. If you do, the application will deadlock, believe me, I've tried
heinzster wrote:
If you could share an example on how it can be done, I would really appreciate it.
You do as you always do, using LoadLibrary and GetProcAddress.
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
You can also statically link to any DLL that you have the .h and .lib files for.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fruity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Walliams (Little Britain)
|
|
|
|
|
Are there articles in CodeProject that demonstrate this? Could you recommend 1?
Thanks...
|
|
|
|
|
If you have the .h and the .lib files for the dll:
(VS .NET) In your (C++) DLL project: #include the .h file where you refer to the functions.
In the menu, you will find the menu item project->properties...
In the dialog window, locate the tree node [configuration properties]->[linker]->[command line]. In the 'additional options' text field, you add the name of the .lib file.
If you don't have the .h file, and/or you dont have the .lib file. You can do this (provided that you know the signature of the functions you want to use):
<span style="color: green;">
</span>
<span style="color: blue">void</span> DllTest()
{
<span style="color: green;">
</span>
HMODULE hDll;<br> <br>
<span style="color: green;">
</span>
<span style="color: blue">void</span> (* pPointerToFunctionInDll) (<span style="color: blue">char</span> * message);<br> <br>
<span style="color: green;">
</span>
hDll = LoadLibrary("test.dll");
<span style="color: blue">if</span> (hDll)
{
<span style="color: green;">
</span>
pPointerToFunctionInDll = (<span style="color: blue">void</span> (*) (<span style="color: blue">char</span> *)) GetProcAddress(hDll, <span style="color: red">"ShowMessage"</span>);
<span style="color: blue">if</span> (pPointerToFunctionInDll)
{
pPointerToFunctionInDll("Hello World!");
}
<span style="color: green;">
</span>
FreeLibrary(hDll);
}
}
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
Friends,
I've downloaded BOOST library and unzipped it in the directory. Now i want to install it with MS Visual C++. i.e i want to include all necessary headers and libs of boost with Visual C++ so that i whenever i need BOOS class i just include its header and use it.
Please tell me how can i do so with Visual C++. I am at the moment digging through BOOST documents but unable to find proper and easy information.
Imtiaz
|
|
|
|
|
Hi
does anyone here know how to get vs.net and vc6.0 to share the same system...?
well they both _work_ but after the install of VS.net, the older VC 6.0 could not access the MSDN/Help files...
does anyone have any suggestions on getting both to use the msdn etc? (other than just using vs.net - not an option right now!)
cheers
Bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
VC6 will not integrate with the new MSDN. So you'll have to maintain 2 separate MSDNs if you want both VC6 and VC 7.1 to have integrated MSDNs
In your case, you probably installed the VS.NET MSDN over the VC6 MSDN thereby messing up with VC6's integration with MSDN.
The MSDN that comes with VC6 is outdated and it's probably best to manually open the newer MSDN available. If you have an MSDN subscription, you should have got the Jan 2005 MSDN CDs which integrates easily with VS.NET 7.1
Nish
|
|
|
|
|
This happened to me and is very frustrating not being able to push F1 and get context help. I found if I simply reinstalled the older MSDN VC 6 now finds it. Just put it in a different spot than the newer MSDN on your HD.;)
michael judy
m_judy@hotmail.com
"According to my calculations there is no problem"
|
|
|
|
|
I would like to know more about SCard Coding or programming.
On Visual C++ 6.0, how to I identify a user who is having what kind of privileges? (i.e admin privilege, etc)
|
|
|
|
|
Hi, does anyone know how to change the FONT to the mainMenu Item in Visual C++? I am using Visual Studio .NET (VC++ .NET). I try searching in the property of the mainMenu but Font is not list in there...
Help?
Thanks alots!
|
|
|
|
|
|
hi,
I need to ask about the microsoft acoustic echo canceller in directshow. I m trying to find the tutorials and implementation but i couldn't find it. even it has very scarce documentation. Please help me out.
ALL for Knowledge.
|
|
|
|
|
guys...i m not sure whether this is the right place 2 post this message...if not please excuse me...
but i need help desperately...
i have 2 play mp3 and tone...i am able 2 play wave and midi using MCI...but not mp3 and tone...
if u guys have any idea...or code snippets...pls help me out..
thanks in advance..
vinnzy
|
|
|
|
|
Hi, I am a newbie to win32 programming and have a question:
I have the following code:
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_LBUTTONDOWN:
{
ShellExecute(hwndParent,"open", bsUrl, NULL, NULL, SW_SHOWNORMAL);
break;
}
}
return 0;
}
I went to be able to pass a paramater, bsUrl to WndProc so it can know what url to navigate to based on what was clicked. How can I do this?
|
|
|
|
|
make bsUrl static
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Sorry for the ignorance, but how do I make it static? You mean make it a static variable?
|
|
|
|
|
Put the keyword before the variable initialization:
static CString bsUrl , replace CString with the type of bsUrl, dunno how you declared it.
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Got it! Thanks for the help, you're a life saver.
|
|
|
|
|
Hello my best friends,
I'm a beginner to Visual C++ programming, so I have some "stupid" questions for you and I hope you guys to help me.
I'm working on my own very simple chatapplication, but I encounterd some problems. I've made a client and a server part, I've tested it out but I had the problem that I couldn't send a text string. My serverside establishes a connection with the clientside ( I know it because I put some control messages to be sure there is a connection).
But when I try to send a peace of text, it does nothing except that it shows the sending text on my display and the receiver part shows nothing on the display. I used the following code to send a string:
void CSimComDlg::OnSend()
{
m_Message.GetWindowText(strMESSAGE);
m_pArOut->WriteString(strMESSAGE);
m_pArOut->Flush();
m_MsgDsp.SetWindowText(_T(Name+":"+strMESSAGE+"\r\n"));
strMESSAGE.Empty();
}
And to read a received string:
void CSimComDlg::ReadReceive()
{
m_pArIn->ReadString(strMESSAGE);
m_MsgDsp.SetWindowText(_T("Chatter:"+strMESSAGE+"\r\n"));
strMESSAGE.Empty();
}
m_pArOut and m_pArIn are CArchive pointers (I use this in combination with CSocketFile to send data over internet).
Is there something wrong with these codes?
I've seen some other example codes on the internet, they include also the length of the message to send and they check also the buffer if there's more data coming in. But are they neccesary to put them in my code?
I hope you can help me boyzz
If my application works, I forget all my problems.
|
|
|
|
|
CYourApp::Instance()//<<=====your app class
{
....
if (!AfxSocketInit())
{
::MessageBox(NULL,"Can't use socke!","Error",MB_OK);
return false;
}
....
}
|
|
|
|
|
Thnx for the reply,
But what has this to do with sending test on the right way?
I just want to know how I can send or receive text (in string-format) in its simplest form using CArchive and WriteString() and ReadString().
If my application works, I forget all my problems.
|
|
|
|
|
SimCom wrote:
But what has this to do with sending test on the right way?
I just want to know how I can send or receive text (in string-format) in its simplest form using CArchive and WriteString() and ReadString().
If my application works, I forget all my problems.
what I think he is trying to say is check for error return values at every point, initialization to send/receive. Also since you did not include the initialize routine he showed, it may be as simple as initializing properly. The greater part of programming is learning how to find your own answers. Know what is wrong, and you can fix it. Run in debug mode, step through the operation, check error return values. Most of us do not have time to take your code, compile it into a full executable, discover the answers and give it back.
I highly recommend running in debug mode. at least then you can say all the return values operate as if they are actually sending the information, but I am not receiving it.
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
I use Visual C++ Toolk 2003 and I don't know how to add my resource file to my projects. How to do it with Visual C++ Toolkit 2003 Command Prompt???
|
|
|
|