|
Ok i will, thanks for the help guys much appreciated.
Thanks.
Education begins a gentleman,
conversation completes him
|
|
|
|
|
Hi everybody,
I have several points in an array.
I want to add a code that permits that : if i stop the mouse upon one of this points on the screen show a ToolTip saying which is the order of the array of this point. How can I do it? I know that if instead of stop the mouse; it was doing button-right of the mouse I would have to call ON_WM_RBUTTONDOWN...but in this case? And if once showed the tooltip I move the mouse...how do I make it disappear? I have had a look to the codes already written...but almost all speaks about controls...and I need any point on the screen.
Thanks
Javier
|
|
|
|
|
The WM_MOUSEMOUSE will give you the poit of the mouse. so...
|
|
|
|
|
IS there any limit on the maximum number of controls we can add to a Dialogue box resource in VC++. One of my application needs many controls to be added. But after adding may be around 60-70 controls on that dialogue box, now its not allowing me to add any controls. Please suggest.
Ritheesh V Shetty
|
|
|
|
|
Ritheesh wrote:
IS there any limit on the maximum number of controls we can add to a Dialogue box resource in VC++.
Yes, 255 at design time. If you need more than that, add them at run time.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi experts
In my server side application i have used WSAAsyncSelect() for the purpose of setting it to non blocking mode.
The function executes successfully(returned value is 0) & waits for the client to connect.
Now when i execute my client application, it is able to connect successfully to the server but the server donot receives any notification that the client wants to connect.
Wher am i going wrong.
Waiting for suggestions.
Server side code:
BOOL CDpDlg::OnInitDialog()
{
CDialog::OnInitDialog();
// Add "About..." menu item to system menu.
// IDM_ABOUTBOX must be in the system command range.
ASSERT((IDM_ABOUTBOX & 0xFFF0) == IDM_ABOUTBOX);
ASSERT(IDM_ABOUTBOX < 0xF000);
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
CString strAboutMenu;
strAboutMenu.LoadString(IDS_ABOUTBOX);
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
}
}
// Set the icon for this dialog. The framework does this automatically
// when the application's main window is not a dialog
SetIcon(m_hIcon, TRUE); // Set big icon
SetIcon(m_hIcon, FALSE); // Set small icon
SOCKET server;
WSADATA wsaData;
sockaddr_in local;
WORD wVersionRequested = MAKEWORD(2,2);
int wsaret = WSAStartup(wVersionRequested, &wsaData);
if(wsaret != 0)
AfxMessageBox(_T("WSAStartup() failed!"));
else
{
AfxMessageBox(_T("Winsock version 2.2 dll loaded."));
local.sin_family = AF_INET;
local.sin_addr.s_addr = INADDR_ANY;
local.sin_port = htons((u_short)40000);
server = socket(AF_INET, SOCK_STREAM, 0);
if(server == INVALID_SOCKET)
{
AfxMessageBox(_T("Server socket cud not be created"));
return 0;
}
else
AfxMessageBox(_T("Server socket successfully created at the specified port no."));
if(bind(server,(sockaddr*)&local,sizeof(local))!=0)
{
AfxMessageBox(_T("bind() function has failed"));
return 0;
}
else
AfxMessageBox(_T("bind() function has successfully executed!"));
if(listen(server,2)!=0)
{
AfxMessageBox(_T("Server socket has failed to listen for any incoming connections"));
return 0;
}
if (WSAAsyncSelect(server, m_hWnd, WM_WINSOCK_NOTIFY, FD_READ | FD_WRITE | FD_CONNECT | FD_CLOSE) == SOCKET_ERROR)
AfxMessageBox(_T("WSAAsyncSelect() failed to xecute!"));
else
AfxMessageBox(_T("WSAAsyncSelect() xecuted successfully"));
}
return TRUE; // return TRUE unless you set the focus to a control
}
__________________
|
|
|
|
|
Hi guys
Can any body provide me with any suggestions.
Regards
|
|
|
|
|
hello,
i want to use the apihook to hide a specific file or directory,not let any user to see the file and directory expect me?
what can i do?
|
|
|
|
|
I'm curious what a hook has to do with hiding a file/directory. Just change the security permissions of the object so that only you, or a group to which you belong, can access the object.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi all,
this is roland working in S/W Comp. in pune I am doing a project in SDK which is related to desktop in which I also used printer for that i have taken a handle of printer.. i want the o/p as when user selects a perticular area on dektop he should get only that selected area on paper after printing...I am getting print on paper but problem is that print which i get is very small .. i am not getting WYSIWYG effect on paper. the print image gets compressed ...why this happen ? i am tring this from yesterday so plz can anybody help me for this solution.....
i hope i will get sol. from someone
thanking you
Roland
|
|
|
|
|
The print resolution of the printer (typically 600 pixels per inch) is much greate r than that of the screen (typically 72 pixels per inch) so you must use StretchBlt if you want it to appear tyhe same physical size on the higher resolution device.
|
|
|
|
|
I have a dialog-based app which runs in tray and loads at windows startup, but problem is i don't want to abuse user by showing up this dialog at every startup so i need it to start hidden(in tray) .
Can anyone help??
Regards
m0n0
|
|
|
|
|
Giorgi Moniava wrote:
start hidden(in tray) .
Hide you dialog by techniques Demonstarted in this article->
http://www.codeproject.com/dialog/dlgboxtricks.asp[^]
Write Code for Shell Tray icon in the OnInitDialog handller to show Tray Icon at Startup of your application.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
My problem is not to start dialog hidden or create a tray icon, my problem is to do that only at windows startup .
I want that when windows starts the dialog was simply launched in tray .
Regards,
|
|
|
|
|
Giorgi Moniava wrote:
I want that when windows starts the dialog was simply launched in tray .
Till I Understand, you want to hide you Dialog only at startup otherwise it always start in shown state , Right!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
|
Giorgi Moniava wrote:
Yes right !
Now you can implement same by using this logic,I Believe you starting you Application at windows startup using key stored in Registry location RUN .
Now to distinguish wheather the USer is Starting the Program by Clicking over it or Windows is Starting it at start up, you just provide a command line argument to that reg Location i.e. store application path as
c:\\your_app_path\\app.exe -hidden
Now When ever Windows start your application at startup offcourse, you will get -hidden as commandline argument, now you just have to parse the command line [use GetCommandLine() : to retrieve command line arguments]to hide or unhide your application.
There can be other solution also, It's upto you to choose better one.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I've also thought about that , but i did'nt know this function GetCommandLine().
Thanks, so you say that when i add the value to regedit (for my app started at startup) , in my value settings i'll simply write as progra path :
"c:\\myapp.exe -hidden" , and then when i call CommandLine() in OnInitDialog(), if it returns "hidden" , it means my app's started at startup.
Thanks i'll try it
m0n0
|
|
|
|
|
Giorgi Moniava wrote:
when i call CommandLine() in OnInitDialog(), if it returns "hidden" ,
Nope, It will return Application path + Command line Arguments, Something like this "c:\\myapp.exe -Hidden" .
From it,You have manually parse the "-Hidden" command line argument.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Yes , i've already done it and it works.
Thanks for help
m0n0
|
|
|
|
|
Giorgi Moniava wrote:
Thanks for help
It's my great Pleasure !
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
My application in my view, is getting quite large, now I have just got a Stack Overflow when I added new code.
If I comment out this new code, the program run OK.
Are they any setting that I can make to increase the programs parameters like Stack size etc to allow me to continue to add to this program.
Note the point in the code that causes the Stack Overflow is a bit strange in the debugger; a simple if statement keeps looping like a while loop.
Any comments please.
|
|
|
|
|
i'd advise you to split your code into functions you could include into DLLs...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Are you saying that they are no settings that I an make.
I will do a re-design later, but need this phase to continue.
I assume I have the default settings for Visual Studio (V7.1) being applied.
|
|
|
|
|