|
When opening that child window it has buttons in bar.
When i maximize,the buttons are added to mainfrmae(as usual,normally it will happen like this only).
Only the child window with empty bar(without system menu)is appearing.Anu
|
|
|
|
|
Please test it:
BEGIN_MESSAGE_MAP(CYourWnd, CBaseOfYouWnd)
...
ON_WM_GETMINMAXINFO()
END_MESSAGE_MAP()
void CYourWnd::OnGetMinMaxInfo(MINMAXINFO* lpMMI)
{
lpMMI->ptMaxTrackSize.x = 400;
lpMMI->ptMaxTrackSize.y = 200;
} virtual void BeHappy() = 0;
|
|
|
|
|
Actually i tried that.But wat happen is the X,Y positon of window is getting 0,0.But i want X=0,Y=60.
Because above 60,i have one dialog.Its always visible.So i made this child window below that dialog.
For this functionality i want this feature.Anu
|
|
|
|
|
Try also to change your reaction to :
void CChildFrame::OnSize(UINT nType, int cx, int cy)
{
CMDIChildWnd::OnSize(nType, cx, cy);
switch (nType) {
case SIZE_MAXIMIZED: {
MDIRestore();
int XBorder = GetSystemMetrics(SM_CXMAXIMIZED);
int YBorder = GetSystemMetrics(SM_CYMAXIMIZED);
SetWindowPos(NULL,0,60,XBorder-45,YBorder-60,SWP_NOZORDER );
}
break;
}
} virtual void BeHappy() = 0;
|
|
|
|
|
The window get maximized to full screen size. Anu
|
|
|
|
|
Does anybody know how to display button in one subitem for CListCtrl?
|
|
|
|
|
You could try to create a child button
(may be for each entry, stored in the item data as pointer)
at position (-1, -1, -1, -1)
and move it in the controls reaction on NM_CUSTOMDRAW virtual void BeHappy() = 0;
|
|
|
|
|
Have you try CListCtrlEx class ? Pay attention of this class and see how implement a radio button dialog of some column , in that way can you put there a button dialog !
modified on Monday, March 22, 2010 2:59 AM
|
|
|
|
|
Hi,
I'm creating a CWnd object on Top of CDialog object. I want to make that CWnd transparent and used following code. But that wasn't work. When this code used in the parent dialog both dialog and CWnd got the transparent effect.
HMODULE hUserDll = ::LoadLibrary(_T("USER32.dll"));
::SetWindowLong(m_hWnd, GWL_EXSTYLE, ::GetWindowLong(m_hWnd, GWL_EXSTYLE) | WS_EX_LAYERED );
::SetLayeredWindowAttributes(m_hWnd, 0, (255 * 70)/100, LWA_COLORKEY|LWA_ALPHA);
Please any one can explain why?
|
|
|
|
|
A layered window may not be a child (WS_CHILD)... virtual void BeHappy() = 0;
|
|
|
|
|
Thank you.
|
|
|
|
|
Hello Sir
Currently i am doing one client - server program,
when i connect client - server its shows error code 10049
server code :
WSADATA wsadata;
DWORD version = MAKEWORD (2,2);
int Result , Error_Code;
CString Error_Result;
Result = WSAStartup( version,&wsadata);
if ( Result != 0 )
{
Error_Code = WSAGetLastError();
Error_Result.Format ("%d",Error_Code) ;
MessageBox ( " Socket Opration Failed :"+Error_Result ) ;
}
else
{
SOCKET server_Socket;
if ( (server_Socket = socket ( AF_INET,SOCK_STREAM,IPPROTO_TCP) )== SOCKET_ERROR )
{
Error_Code = WSAGetLastError();
Error_Result.Format ("%d",Error_Code );
MessageBox ("Server Socket Creation is Failed : "+Error_Result);
}
else
{
SOCKADDR_IN serverStructure;
int Port = 808;
serverStructure.sin_family = AF_INET;
serverStructure.sin_port = htonl (Port);
serverStructure.sin_addr.S_un.S_addr = htonl(ADDR_ANY) ;
Result = bind ( server_Socket,(SOCKADDR*)&serverStructure,sizeof(serverStructure));
if ( Result==0 )
{
Result = listen(server_Socket,5);
if (Result!=0)
{
Error_Result.Format ("%d",WSAGetLastError());
MessageBox("Socket listen is Failed :"+Error_Result);
}
else
{
SOCKET ClientSocket;
if ( (ClientSocket = accept (server_Socket,NULL,NULL) ) ==INVALID_SOCKET )
{
Error_Result.Format ("%d",WSAGetLastError());
MessageBox ("Socket Accept is Failed :"+Error_Result);
}
client code:
WSADATA wsadata;
int Result_Client;
CString strClient_Result;
DWORD version = MAKEWORD (2,2);
Result_Client = WSAStartup( version,&wsadata);
if (Result_Client==0 )
{
SOCKET ClientSocket;
if ( (ClientSocket = socket (AF_INET,SOCK_STREAM,IPPROTO_TCP)) != INVALID_SOCKET)
{
int Port = 808;
SOCKADDR_IN ClientSocketStructure;
ClientSocketStructure.sin_family = AF_INET;
ClientSocketStructure.sin_port = htonl(Port);
ClientSocketStructure.sin_addr.S_un.S_addr =inet_addr("192.168.1.21") ;
Result_Client = <code>connect(ClientSocket,(SOCKADDR*)&ClientSocketStructure,sizeof(ClientSocketStructure));
</code>
if ( Result_Client == 0)
{
char* SendMessage_Server = "Test";
send(ClientSocket,SendMessage_Server,sizeof (SendMessage_Server),NULL);
closesocket(ClientSocket);
WSACleanup();
}
else
{
strClient_Result.Format ("%d",WSAGetLastError());
MessageBox ("Client: Sever Socket Connection is failed "+strClient_Result) ;
} Failure is Success If we learn from it!!
|
|
|
|
|
Game-point wrote: when i connect client - server its shows error code 10049
Exactly where in the code? Please tell where the program fails.
If you are new to network programming it is always good to start with working examples. Have a look at Beej's guide to networking programming[^] and Winsock Programmer's FAQ[^], there are client/server examples in section 6.
|
|
|
|
|
hi,
i have a multibyte application which i m making multilingual.the resource file is unicode.when i load the resources from string table of dll it shows ???? characters instead of japanese strings.wat may be the prblm?
|
|
|
|
|
The application and its used font should be Unicode-ready virtual void BeHappy() = 0;
|
|
|
|
|
no its necessary to keep the application multibyte.but resource file is unicode.can anyone give some solution?
|
|
|
|
|
Member 590310 wrote: wat may be the prblm?
The answer:
Member 590310 wrote: multibyte application ... the resource file is unicode.
Either make the application unicode ( my recommendation), make the resources multibyte, or code the program to transform the unicode resources to multibyte before using them. Also, if you are going to be using multibyte, check that you are using the correct code page for your situation.Please do not read this signature.
|
|
|
|
|
assuming that you converted your code to unicode, try using "ms gothic" font for dialog boxes which are using Japanese strings
HTH
|
|
|
|
|
Hi,
While running my application how can I keep track on any key event so that key logger should not get to know about pressed key?
|
|
|
|
|
I suppose your application cannot prevent a keyboard hook to do its job, if that was the question.
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
[My articles]
|
|
|
|
|
|
It really depends on your application. You may for instance, avoid keystrokes providing a virtual keyboard (graphical representation of keys, mouse activated).
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
[My articles]
|
|
|
|
|
If you want to keep track of the key events, then i suppose, your application wants to know whether any one is hooking the keyboard events.
Then surely it may be using SetWindowHookEx([^]) to achieve the goal of a key logger.
To find the Key logger, you can use the technique of API hooking to monitor any process doing something with a specified API.
Hook that API(API Hooking (LoadLibrary)[^]). I believe if you hook SetWindowHookEx API then you can monitor whether some one there for KeyBoard hooking.
A little bit complex, All the best, have a try Величие не Бога может быть недооценена.
|
|
|
|
|
I could user ip helper api (NotifyAddrChange and NotifyRouteChange) to get the notification when the user changes the IP address,subnet mask ,
but when the dns server address( main and the other) is modified , I could not get notification.
Is there any method ?
Thanks!
|
|
|
|
|
the three points ( center, start of arc ,end of arc) and the angle are known to me. I need to draw whenever these values are given. I saw CPie but for that you need to know the rect.
|
|
|
|