|
see me wrote:
Hey this will cause error
And Why so:
LPTSTR-An LPWSTR if UNICODE is defined, an LPSTR otherwise.
Did you try using the code that I gave.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
see me wrote:
GetWindowText (CString& rString) const
Thanks for your comment.
But just have a look at your post . Shouldn't it be:
CString str;
m_editBox.GetWindowText(str);
No personnel issues but just to.......
say that we don't post the code here that is always optimized.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Map it to some variable (ex: m_edit)
While mapping it select long as its type.
In the code use the following lines
long val;
UpdateData();
val=m_edit
|
|
|
|
|
CString csText;
GetDlgItemText( IDC_EDIT1, csText );// here IDC_EDIT1 is the id of the edit control
nave
|
|
|
|
|
identity_85 wrote: how to get the input data (text) from text box in mfc dialog based application in v c++ 6
GetDlgItemText
|
|
|
|
|
I have a pointer to a CStatic object but i need a handle to it cos i need to reposition it on the screen with the help of SetWindowPos function. How can i obtain a handle to the object if I have pointer and is there any other way to move/reposition the CStatic object. Plzz Help !!!
Anshul
|
|
|
|
|
if StaticCtrl is an object of CStatic, then StaticCtrl.m_hWnd points to the handle to that static control.
nave
|
|
|
|
|
Err... You don't need its handle. Just call the MoveWindow function directly:
pStaticCtrl->MoveWindow(...);
|
|
|
|
|
HWND CStatic::GetSafeHwnd() const;
Maxwell Chen
|
|
|
|
|
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
|
|
|
|