|
see i will tell u, there are many CStatic objects on the client window, right. Now what happens is that the user clicks on one of them and i get the address of that object in the 'this' pointer. Now i want to move this object according to the mouse drag on the screen, with the help of SetWindow Pos func and Invalidate(TRUE); I have the address of the CStatic object which the user is trying to drag.How do i get the handle of this object so that i can move it. is there any way to find out the handle with the help of this pointer.
otherwise tell me how i can move the CStatic window along with the mouse.
|
|
|
|
|
Hey....do you want to know that how to give the first param of SetWindowPos( )
u have an object to the CStatic like
CStatic objMyStatic;
then get handle like this
objMyStatic.m_hWnd;
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
see i will tell u, there are many CStatic objects on the client window, right. Now what happens is that the user clicks on one of them and i get the address of that object in the 'this' pointer. Now i want to move this object according to the mouse drag on the screen, with the help of SetWindow Pos func and Invalidate(TRUE); I have the address of the CStatic object which the user is trying to drag.How do i get the handle of this object so that i can move it. is there any way to find out the handle with the help of this pointer.
|
|
|
|
|
if you have a derived CStatic what do you need?
|
|
|
|
|
i need to move the CStatic object which is again a window along with mouse drag. The moment user clicks in the window i get the pointer to it in the this pointer, but SetWindowPos func takes the handle of the window as tha paramater so now what to do ????
|
|
|
|
|
See Here[^] maybe it is some helpful to you
|
|
|
|
|
Hi all,
I'm writing an application to model the effects of
different volcanic sources. For every source i put in a dialog box
a combo box to select the kind of source and all the control to set the parameters
of every kind of source. Selecting the kind of source in the combo box only
the meaningful controls for that kind of source are enabled.
Acting like that my dialog box takes too much space on the screen,
so i need to split the different kinds of source in a tab control.
Can i do that without rewriting too much code ?
Is there a way to know which tab is selected ?
Sorry for the question but i'm a newbie.
Thanx in advance,
Demsmo16.
|
|
|
|
|
Hi,
You should think about using CPropertyPage and CPropertySheets. Converting from existing dialog resources is quite simple, and theres a good article regarding this on MSDN called Converting Large Dialogs into Property Sheets. Just search for that in Yahoo and you will find the article.
Good Luck
|
|
|
|
|
hi i had made a service.when it starts it createitsleft and start himselsf.in servicemain func i had created a thread that stops the service after specified time interval but cannot do so.
when i put that code behind the button then it works fine. is it bcos that function is in thread and not main application thread.
Tasleem Arif
|
|
|
|
|
whats the function to make a copy of file in C run-time libraries
9ine
|
|
|
|
|
you have to read the original file, create a new one, and write inside it what you copied from 1st file....
the functions you can use are fopen() , fread() , fscanf() , fwrite() , fprintf() , fclose() ...
also, see fstream if you have any chance to code in C++...
|
|
|
|
|
no, no there should be functions similar to CopyFile from windows or not?
9ine
|
|
|
|
|
hey, you asked from the C-runtime, not Win32 API
if so, then NO, there's no "copyFile"-like function in the C runtime.
then, what's your need exactly ?
|
|
|
|
|
just make a copy of the file
then use CopyFile() from winAPI
9ine
|
|
|
|
|
9ine wrote:
whats the function to make a copy of file in C run-time libraries
copyfile
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Re
|
|
|
|
|
Hi all,
I could able to call function of one MFC Dll from another MFC DLL.But I
want to know how to call a MFC DLL inside a Win32 DLL. I Should get the
Return value from MFC DLL Back to Win32 dll.
MY Scenario is Like this
Actually I am writing a DB code in MFC DLL, I need to get return value
from this MFC dll to a Win32 DLL i,e I should call MFC DLL inside win32
DLL and get the return value back to Win32.
The function which i used in MFC dll is derived from CDialog.
reply early...
Try again and again,
At last you will say
I don't know the meaning for impossible.,.
|
|
|
|
|
I was wandering if someone could help me to solve this problem:
I created a C++ win32 application and I need to distribute it over a network,
I made an installer for it and I have my MSI package, at this point everything is ok, because I can deploy my app over the network and, using an unmanaged installation, I have my app installed and I have written in the Windows registry so that the app starts after login...
But then to run the app I need to reboot all the computers...
Does anyone know a way to automatically run my application after install?
I cannot made it work... I find many suggestions, no one worked, but I think it schould not be difficult, I just don't find it or I do not understand how to do it!
Thank you for your help and excuse me for my poor english.
Nicola.
|
|
|
|
|
You can use
WinExec( LPCSTR lpCmdLine, // command line
UINT uCmdShow ); // window style
to run your application.
rgds
aneesh
|
|
|
|
|
Ok, but where should I put this piece of code?
Should I build a DLL, and than run from a Custom Action in the Installer?
How do I pass dynamic parameters as the path of the app that I know only during installation?
I read about VBScripts that I can launch as Custom Action but I don't understand how to pass parameters.
Thank you for your help,
Nicola.
|
|
|
|
|
nico4 wrote: Ok, but where should I put this piece of code?
At the point in which you want the other application to start.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
I'm trying to connect with a HTTPS site and download its content. Unfortunately I stuck and I have got a problem that I cannot deal with. I still get an Invalid Certificate Authority Error although I used the code presented in: http://support.microsoft.com/default.aspx?scid=KB;en-us;q182888.
I really hope that someone will help me.
The full code that I'm using:
<br />
CInternetSession session;<br />
CHttpConnection* pServer = NULL;<br />
CHttpFile* pFile = NULL;<br />
<br />
session.SetOption(INTERNET_OPTION_CONNECT_TIMEOUT, 1,000 * 20);<br />
session.SetOption(INTERNET_OPTION_CONNECT_BACKOFF, 1000);<br />
session.SetOption(INTERNET_OPTION_CONNECT_RETRIES, 1);<br />
<br />
CHttpConnection* pConnection = session.GetHttpConnection("www.site.com",INTERNET_FLAG_SECURE|SECURITY_FLAG_IGNORE_UNKNOWN_CA|INTERNET_FLAG_IGNORE_C<br />
ERT_DATE_INVALID|INTERNET_FLAG_IGNORE_CERT_CN_INVALID,443,"login","password");<br />
pFile = pConnection->OpenRequest(CHttpConnection::HTTP_VERB_GET,"/",<br />
NULL, 1, NULL, NULL,INTERNET_FLAG_EXISTING_CONNECT|<br />
INTERNET_FLAG_RELOAD|<br />
INTERNET_FLAG_NO_CACHE_WRITE|<br />
INTERNET_FLAG_SECURE|<br />
INTERNET_FLAG_IGNORE_CERT_DATE_INVALID|<br />
INTERNET_FLAG_IGNORE_CERT_CN_INVALID|SECURITY_FLAG_IGNORE_UNKNOWN_CA|SECURITY_IN<br />
TERNET_MASK|SECURITY_SET_MASK);<br />
DWORD dwError;<br />
again:<br />
if (!HttpSendRequest(pFile,NULL,NULL,NULL,NULL))<br />
dwError = GetLastError ();<br />
<br />
if (dwError == ERROR_INTERNET_INVALID_CA)<br />
{<br />
DWORD dwFlags;<br />
DWORD dwBuffLen = sizeof(dwFlags);<br />
<br />
InternetQueryOption (pFile, INTERNET_OPTION_SECURITY_FLAGS,<br />
(LPVOID)&dwFlags, &dwBuffLen);<br />
<br />
dwFlags |= SECURITY_FLAG_IGNORE_UNKNOWN_CA;<br />
InternetSetOption (pFile, INTERNET_OPTION_SECURITY_FLAGS,<br />
&dwFlags, sizeof (dwFlags) );<br />
goto again;<br />
}<br />
<br />
CString out;<br />
TCHAR sz[1024];<br />
while (pFile->ReadString(sz, 1023))<br />
{<br />
out+=sz;<br />
}<br />
pFile->Close();<br />
CTestDlg::m_plik.SetWindowText(out);<br />
-- modified at 4:34 Thursday 27th July, 2006
|
|
|
|
|
Hi all,
i am working with MFC(VC++ 6.0).In my application i needed to disable a perticular item in a listbox when double clicking on it.Please help me and give some code also
Thanks
|
|
|
|
|
Vinod Moorkkan wrote: needed to disable a perticular item in a listbox when double clicking on it
It is not possible to make an item Disable. How do u except the disable item to behave? By disabling u mean that item should not get selected by mouse or keyboard ?
nave
|
|
|
|
|
if you dont need to this item why you add this item to your listbox
|
|
|
|