|
Hi,
U can use AfxGetApp to get a pointer to the Main application
thanks,
Nitheesh
|
|
|
|
|
Hi,
How to track the key "windows+d" preseed in my application?
|
|
|
|
|
What about a keyboard hook?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
|
I cant well dont no how to connect to a Mysql database using c++ because im making a program where i can alter peoples prefrences in a program. also can you tell me how to run queries.
db url: localhost;
db user: admin_root
db pass: **********
db db: logon
thanks
|
|
|
|
|
Have you heard about ADODb, OleDB, ODBC? If not then try to figure out what do you want to use and why. After finding a solution to this you can go and drill down to the basics and intricacies of the method you choose to use.
I now know what your database password is
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
1) ->[^]2)->[^]
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Although it is a bit more than you need, here is an example.
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
|
I sow the sample there is in this site how to add menu to the IE and actually done something quit similar in the pars, its was good for the IE6 but doesn't looks good on the IE7
Is there a way to add a 'real' drop down menu to an IE Toolbar button that will look like the original buttons that come with the IE7.
|
|
|
|
|
Hi EveryOne,
In ActivexDLL I have written a method called Connect(..)inside a class. The method exposes the functionality of connecting to another system using sockets.
The problem here is when I compile my project I am getting link errors(unresolved external symbol). These errors are thrown when winsocks methods are called like htos(),inet_addr(),connect() are called.
Unresolved symbol (upto my knowledge) are thrown when the function definition is unknown or its different from the one that is implemented. since I am using an inbuild function (used the header file winsock2.h) what might be the cause to the problem? How would I Overcome it. Please find the code below.
STDMETHODIMP CRAPClientX::Connect(BSTR serverIP, BSTR serverPort,BSTR *output)<br />
{<br />
<br />
<br />
WSADATA wsaData;<br />
char returnString[150];<br />
<br />
int iResult = WSAStartup(MAKEWORD(2,2), &wsaData);<br />
if (iResult != NO_ERROR)<br />
printf("Error at WSAStartup()\n");<br />
<br />
<br />
SOCKET ConnectSocket;<br />
<br />
ConnectSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);<br />
<br />
if (ConnectSocket == INVALID_SOCKET) <br />
{<br />
sprintf(returnString,"Error at socket(): %ld\n", WSAGetLastError()); <br />
*output=SysAllocString(_bstr_t(returnString)); <br />
WSACleanup();<br />
return S_OK;<br />
}<br />
<br />
<br />
sockaddr_in clientService; <br />
<br />
clientService.sin_family = AF_INET;<br />
<br />
clientService.sin_addr.s_addr = inet_addr("127.0.0.1" );<br />
<br />
clientService.sin_port = htons( 27015 );<br />
<br />
<br />
if ( connect(ConnectSocket, (SOCKADDR*) &clientService, sizeof(clientService) ) == SOCKET_ERROR) <br />
{<br />
sprintf( returnString,"Failed to connect.\n" );<br />
*output=SysAllocString(_bstr_t(returnString));<br />
WSACleanup();<br />
return S_OK;<br />
}<br />
<br />
sprintf(returnString,"Connected to server.\n");<br />
*output=SysAllocString(_bstr_t(returnString)); <br />
WSACleanup();<br />
return S_OK;<br />
}<br />
kinldy reply.
Regards,
LG.
lgatcodeproject
|
|
|
|
|
lgatcodeproject wrote: Unresolved symbol (upto my knowledge) are thrown when the function definition is unknown or its different from the one that is implemented. since I am using an inbuild function (used the header file winsock2.h) what might be the cause to the problem?
Not linking to the lib file in which these functions are defined might be one cause . So, did you link your project to ws2_32.lib ?
|
|
|
|
|
Cedric
Once I posted this question, I got the question which u asked; in my mind and then included the library (which I missed out earlier )WS2_32.LIB. So I fixed it in the time you answered the question. sorry for wasting your time Cedric and thanks for the reply.
Regards,
LG.
lgatcodeproject
|
|
|
|
|
|
In fact, I had to open a project in which I'm using sockets to recall the name
|
|
|
|
|
So guess its toooo much of Memory Recall hapenning today hmmm
Regards,
LG.
lgatcodeproject
|
|
|
|
|
Hello,
I am using Visual Studio 2008. I have to create a DLL in Project Type Visual C++ and i have to call this dll in Windows Forms Application Template.
Which Template i have to select to create dll:- Class Library or MFC DLL?
How i can call or import this dll in my Windows Forms Application?
Plz help me.
|
|
|
|
|
MSDN[^] should help you if nobody does and sometimes nothing helps. Not even MSDN .
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
Windows Forms Application is a CLR project - that means it's managed/.NET.
Use the appropriate DLL project - If you're using MFC, make an MFC DLL.
If using just Win32 in your DLL, make a Win32 console project and add the
appropriate Windows DLL code. etc....
Nikesh Jagtap wrote: How i can call or import this dll in my Windows Forms Application?
It depends on what your DLL exposes as an interface. If your DLL has
managed interfaces it's easy. Unmanaged may require some kind of interop
from the managed code.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
can hdc be passed between processes?
dont want,dont want thinking,climbing on head and jumping grass!
(venda venda ennu vicharikumbol thellayill keyaree chadunnoda pulle!)
|
|
|
|
|
I don't think so, but in general it's not a problem: simply conjure up one in the target process from the HWND in question (HWND s can be shared between processes).
Steve
|
|
|
|
|
Hi all,
Anyone can tell me how can set back image in ListCtrl while view of ListCtrl is Report view.
Thanks in advance.
IN A DAY, WHEN YOU DON'T COME ACROSS ANY PROBLEMS - YOU CAN BE SURE THAT YOU ARE TRAVELLING IN A WRONG PATH
|
|
|
|
|
I haven't tried it but isn't CListCtrl::SetBkImage good enough? Have you tried this?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hai,
I am very new in VC++/MFC Programming. I have a problem to load a high resolution icon and Png Image to toolbar. How can i load. please tell me any article or help with examples link.
Regards
Bagavathikumar
Bagavathikumar
|
|
|
|