|
I was thinking that you meant member variable because you said they were in CMyClass. If they are global variables, then they should be declared in 'MyClass.cpp' and extern in 'MyOtherClass.cpp'.
So in the interests of survival, they trained themselves to be agreeing machines instead of thinking machines. All their minds had to do was to discover what other people were thinking, and then they thought that, too." Breakfast of Champions, Kurt Vonnegut
|
|
|
|
|
Let me answer my own question: FYI::
Put the global variables in the .h files and include the .h. and it'll be visiable to any class which includes .h.
Regards,
JJ
|
|
|
|
|
how create output text in richedit ctrl like mIRC channel textoutput ?
I mean text scrolling from bottom side to upper side....
[ sorry for my english ]
----------------------------
never stop coding.
|
|
|
|
|
You want to insert text at the bottom of the richedit control?
CHARRANGE cr;
cr.cpMax = LONG_MAX;
cr.cpMin = LONG_MAX;
richedit.SetSel( cr );
richedit.ReplaceSel( (LPCSTR)string );
richedit.SendMessage( SB_BOTTOM, NULL, NULL );
So in the interests of survival, they trained themselves to be agreeing machines instead of thinking machines. All their minds had to do was to discover what other people were thinking, and then they thought that, too." Breakfast of Champions, Kurt Vonnegut
|
|
|
|
|
thanx
----------------------------
never stop coding.
|
|
|
|
|
I want to learn development for pocket PCs (WinCE).
I already have VS 6.0 and VS.Net and have downloaded SDK for Pocket PC. Do i really need embedded Visual C 4 or I cna use the SDK with my VC 6 to start developing.
Wat else do i need.
Thanks in advance.
In my dream, I was dorwning my §orrow§
But my §orrow§, they learned to §wim
|
|
|
|
|
Hi All,
I want to use ADSI's IADsDomain Interface in my application to enable the password attribute- password complexity.The problem I'm facing is that I'm not able to set the ADsGetObject method's parameter 1 correctly.Hence unable to bind to the object.For convineince I'm giving the statement I'm including in my application.
hr = ADsGetObject(L"WinNT:",IID_IADsDomain,(void**)&pDomain);
Since I'm connecting to my own system hence I'm using the WinNT: parameter.
Can anybody help me out.
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
I want to create a provider for oracle. My own provider not oledb's one. How do you I do that. What are the entry points of oracle.
It will be a big help
|
|
|
|
|
|
Hi.
I have a program that creates a datagram(udp) socket and sends something using sendto(). But windows/winsock seems to determine the source port it uses (which varies somewhere around 1100). But i need it to be sent from an exact source port. I tried to play around with the bind() function and the sockaddr_in structure but no luck so far. Does anyone know how to do this?
Any help would be very much appreciated. Thank you.
Kuniva
--------------------------------------------
|
|
|
|
|
Try this:
SOCKADDR_IN sockAddr;
memset(&sockAddr,0,sizeof(sockAddr));
sockAddr.sin_family = AF_INET;
sockAddr.sin_addr.s_addr = inet_addr(lpszSocketAddress);
sockAddr.sin_port = htons((u_short)nSocketPort);
bind(socket, &sockAddr, sizeof(sockAddr);
hope this helps
modified 12-Sep-18 21:01pm.
|
|
|
|
|
good
A Programmer Never Dies..***
|
|
|
|
|
hi,
I already read some aticles about CRC, but need to get a thorough understanding of CRC, any one can help?
thanks
Extreme programming. Do the No.1
|
|
|
|
|
|
Have you even tried googling for "CRC polynomial"?
If you really need a "thorough understanding" of it, you need something close to a math degree. Really.
|
|
|
|
|
I want to add a toolbar in my win32 applicationn.....
Any Help?
Thankyou..
|
|
|
|
|
Do a search for Control Spy on MSDN. Control Spy is articles and source code showing how to work with toolbars and other win32 common controls.
|
|
|
|
|
Muzzamal wrote:
Any Help?
Ehhh, yes? The WWW world is full of examples of this. Not to mention you get it "for free" (not really, but close enough for your use) from MFC. It's all documented and with lots of examples.
|
|
|
|
|
I am sorry if I had chosen the invalid thread for my question.
I have a problem - I need to get the handles of all installed WH_KEYABOARD hooks in my system. Currently I need this for Win95/98/Me. I just know, that hooks are the USER objects, so there is a way to enumerate them. But MSDN does't say anything.
And one more question - is it possible to clear the hook chain retaining just mine and system - delete just user-installed?
I'll appriciate any suggestions and any help.
Thanks.
|
|
|
|
|
Hi,
I am in very New to VC, and I have written a code which will connect to another machine and return either a -1 or non negative value.
I am getting a "-1" for bind function. Please can some one help me
out with it..
==============================================================
#include <stdio.h>
#include <winsock.h>
#include <windows.h>
#include <iostream.h>
WSADATA wsData;
SOCKADDR_IN saServer;
SOCKET s;
void main()
{
WORD wVersionRequested = MAKEWORD(1,1);
int nRet,sd,d;
//
// Initialize WinSock
//
nRet = WSAStartup(wVersionRequested, &wsData);
printf("WSASTARTUP nret = %d\n",nRet);
sd = socket(AF_INET, SOCK_STREAM, 0);
printf("SOCKET = %ld\n",s);
saServer.sin_family=AF_INET;
saServer.sin_addr.s_addr = inet_addr("192.168.0.4");
saServer.sin_port=htons(80);
d = bind(s,(struct sockaddr*)&saServer,sizeof(saServer));
printf("BIND = %ld\n",d);
getchar();
}
=============================================================
|
|
|
|
|
try this:
memset((char *) &saServer, 0, sizeof(saServer));
saServer.sin_family=AF_INET;
saServer.sin_addr.s_addr = inet_addr("192.168.0.4");
saServer.sin_port=htons(80);
|
|
|
|
|
Hi guys.
I have a CListCtrl control in my application. I would to let one of its items be selected when the user click some buttons.
How can I do?
CListCtrl::SetHotItem doesn't work.
Hi guys. I'm a very fat man. Do you like fat men?
|
|
|
|
|
Use SetItem. mask = LVIF_STATE, state = LVIS_SELECTED;
|
|
|
|
|
I Developed a MFC dialog box,i want insert a flash file in the DialogBox, how can i do this ?
Any help...
Thank you.
|
|
|
|
|
Its simple.
I have done that for my screensaver.
Add Shockwave ActiveX control to your dialog by
Project->Add Components.
THen there in registered activeX components and then ShockWave ActiveX or watever u want.
Then put it in ur dialog and add a member variable to your activeX control.
Then use this code in ur app
<br />
m_flash.SetMovie(strFile);<br />
m_flash.Play();<br />
-----------------------------------------------------------
In my dream, I was dorwning my §orrow§
But my §orrow§, they learned to §wim
|
|
|
|