|
LOL
Now we know why you asked a "how to search the forums" doubt-question in the suggestions forum...
Nish
My miniputt high is now 29
I do not think I can improve on that
My temperament won't hold
www.busterboy.org
|
|
|
|
|
I tried searching the CodeGuru forums and got loads of rubbish, plus "matches" that basically didn't match!
Jeremy Davis
http://www.astad.org
|
|
|
|
|
Hey Guys
I have a dialog form i have made with a tree control in it. I have the dialog box rezizable how do i get the tree control to rezize with the dialog box.
Cheers
Peter
|
|
|
|
|
override OnSize and resize the tree control accordingly
afx_msg void OnSize( UINT nType, int cx, int cy );
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Add the OnSize Message in your Dialog, in this message you must to change the size of the treectrl...
Best Regards
Carlos Antollini.
Sonork ID 100.10529 cantollini
|
|
|
|
|
Cheers Guys
You couldn't also tell me what the function is to rezise the tree control is could you
Cheers
Peter
|
|
|
|
|
use MoveWindow to resize the tree control
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
I'm creating a SDi application where i need to draw my data in two different ways. I have both draw functions implemented in my view and i can switch them with a menu command. For the users simpicity i want to have a view with a tab in it. So the user can switch from view with a single mouse click instead of selecting a menu item. The problem is that i don't know how to implement this in a single view. I would like to have a look and feel like the tabs in visual studio, where you have the tabs to switch from one piece of code to another. Does anybody have any idea on how to do this and has some code to show me.
I allready took a look on the site and found this piece of code: http://www.codeproject.com/docview/dynviews.asp. This is allmost what i want. The only thing is that it uses multiple CViews, while i want just one.
Thanks in advance, Delvi
|
|
|
|
|
I'm wanting to write a program that takes control of windows messages , so if u write something in ur chat window.. not only is it read by another program but the other program also alters fonts and colours etc! how do i do this? could i use CHook or CHookManager, and if so then do u know a good place to find instructions for these interfaces???
cheers Jason (ps i'm new to MFC)
|
|
|
|
|
Hi!
If my sieve serves me right, there was an article here or on codeguru with a static control that did interpret some basic HTML tags like <b> and <i>. Did I dream of it, is it gone, or am I blind?
Thanks for your help
Peter
|
|
|
|
|
Hi all,
What is NMHDR exactly ...
I need explain for each data member in this structure ...
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
NMHDR is the "first part" of every notification that is sent by a child control (like a list box) to it's parent (e.g. a dialog)
hwndFrom: is the window handle of the child control (the windows thingie that is wrapped up by the MFC CWnd class)
idFrom: is the dialog control id of the child (e.g. IDC_LISTBOX1)
code: the type of tne notification. In case of a list box, e.g. LBN_SELCHANGE (the selection just changed).
Enjoy
Peter
|
|
|
|
|
You may want to check MSDN in visual studio or web.
Check ON_NOTIFY, TN061.
Good luck,
- God bless the World
|
|
|
|
|
Hi all,
I wanna set Text Format for EditBox ...
See it:
79077788 ---> Usual Text in Edit box
79,077,788 ---> My Format !
How can i do it ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
does anyone know a good (and simple) tutorial for making your first dll (without MFC!)?
thanks
Kuniva
|
|
|
|
|
Hi,
I have written a MFC application using VC++ 6.0.
I have an image displayed in my application,if i select the part of the
image,rest of the image color should be faded..It is like Quick Mask tool in
adobe photoshop.
Any idea...
Thanks in advance..
Neha
|
|
|
|
|
The easiest way to do this would be with a DIBSection or GDI+, so you can grab the bitmap and do a brightness filter with a negative value on the sections you want to fade.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Hi,
Thanks for the reply.
Could you pl give some code hints.
Thanks in advance.
Neha
|
|
|
|
|
Well, use Chris Maunders DIBSection wrapper and you'll have a bitmap you can treat as a HBITMAP, but also iterate through the bits directly.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Do someone know why if I put a socket listening using:
listen(MyServerSocket, 1); // Accept ONLY 1 connection
and then try to connect to this socket with 2 applications (at the same time) both connect ?!?!?!?
The first application that connects can send and receive bytes, while the second application cannot send/receive anything.
I've tried various socket examples (included some found on the MSDN and Microsoft website) but all of them have this problem.
Any clue?
Thanks very much in advance for any help!!!!!!!
SoftechSoftware
Davide Calabro'
davide_calabro@yahoo.com
http://www.softechsoftware.it
|
|
|
|
|
you have specified a backlog of 1
This means when there is one existing connection,one more connection is possible.
An ideal situation would have been to be able to specify a backlog of zero. Unfortunately if you use zero it is reset to 1 automatically and I really dont know why this is so.
I had similar situations often where I wanted only one connection. What I finally did was to set a flag and if the flag was true whenever a new connection came I closed the socket. I allowed a connection only when the flag was false. It's a silly work-around but that's the way it works.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Thanks very much for your help!
SoftechSoftware
Davide Calabro'
davide_calabro@yahoo.com
http://www.softechsoftware.it
|
|
|
|
|
Hi
I am using the following function to send a mail.
In a normal exe if I use it it works properly.But I have converted my application into a service.
Then in the following function connect function fails and WSAGetLastError returns error WSAECONNREFUSED.
int CSMTP::SMTPSendMail(char *lpszMail)
{
char szHostName[100];
SOCKET sSock;
bool bData = FALSE;
int iErr;
char szSendBuf[1000];
char szRecvBuf[2000];
int iSend = 0;
int iCount = 0;
int PORT=25;
DWORD dwRecCount = 0 ;
char * SMTPCOMMANDS[]={"HELO", "MAIL FROM:","RCPT TO:", "DATA", "QUIT"};
// Default Time Out Values See RFC 1123.Sec.5.3.1
DWORD TimeOut[6]={18000000,18000000,18000000,7200000,10800000,36000000};
DWORD dwSndTO = 90000;
gethostname(szHostName,100);
try
{
SOCKADDR_IN SendSock;
SendSock.sin_family=AF_INET;
SendSock.sin_addr.s_addr= m_dwServerIP;
SendSock.sin_port=htons(PORT);
if ( (sSock=socket(AF_INET,SOCK_STREAM,0))==INVALID_SOCKET)
{
wsprintf(m_szErrorMsg,"SMTPSendMail::Socket creation failed");
return -1;
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// Connect and Get Greeting SMTP ERROR CODE Success == 220 Failure = 421
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
if ((iErr=connect(sSock,( const struct sockaddr FAR *)&SendSock,sizeof (SendSock)))==SOCKET_ERROR)
{
wsprintf(m_szErrorMsg,"Connect Attempt failed to %s Server",m_lpszMailServer);
int code = WSAGetLastError (); // returns WSAECONNREFUSED
closesocket(sSock);
return -1;
}
iErr = setsockopt(sSock,SOL_SOCKET, SO_RCVTIMEO ,(char *)&TimeOut[0],sizeof(TimeOut[0]));
iErr = setsockopt(sSock,SOL_SOCKET, SO_SNDTIMEO ,(char *)&dwSndTO,sizeof(dwSndTO));
ZeroMemory(szRecvBuf,2000);
iErr = 0 ;
iCount = 0;
...
...
...
}
What is the problem?
Please help.
Thanks in advance.
rgds
Venkatesh
|
|
|
|
|
Hello, the codegurus around the world.;)
I don't understand the meaning of Win32 Service?
I think that you use the blocking socket, and WSAGetLastError() simple
gets the last error of the socket operation.
This means that even though you put on WSAGetLastError() in connect,
the other process, for example, gets the result of connect, and get to
the requirement of the user id and password of the email, this WSAGetLastError () may get another error generated the operation except connect().
Or, maybe Win32 Service has the conflict with your socket operation.
Please, don't send me your email about your questions directly.
Have a nice day!
Sonork - 100.10571:vcdeveloper
-Masaaki Onishi-
|
|
|
|
|
Hi,
I want to create a modeless dialog ( create, show...), but I don´t what is the correct way to avoid leakages when closing the dialog, or destroyin or... should I notify the parent that the modeless dialog has been closed to call there DestroyWindow, or... ?
Thanks, Bye !
Braulio
|
|
|
|