|
The code you areshowing is the one where the selected node name is put inside the variable m_strNodeName when you double click. Create another member variable in your CTreeItem class, for instance m_strNodeID, retrieve the ID (I do not exactely know what you mean with "ID", but you must know it) at the same places where the m_strNodeName gets its value.
Then, after your child tree dialog is dismissed, you must have somewhere code in your parent dialog where the content of m_strNodeName is copied inside the Editbox. Simply do the same with your second variable.
Hope this helps.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|
|
Thanks Boss, iam trying what u said.
|
|
|
|
|
Hi
Can anyone help me capturing a part of the window as a bitmap? Currently, the code i wrote captures the top-lying windows as well. I dont want it to capture them.
HGDIOBJ prev = SelectObject(memdc, mybitmap);
//Drawing functions.
BitBlt( memdc, 0, 0, w, h, sourcedc, SRCCOPY);
SelectObject(memdc, prev);
Thanks
cheers
rajesh.r
|
|
|
|
|
With GDI, I am honestly not sure you can blit a window if it is hidden behind others (since you do not blit a window but a device). What you can do (if this is not unituitive for the user) is bring the window as topmost, and blit it.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|
|
If you get the device context of an underlying window, shouldn't it output the display of that window?
i.e. if you have the handle to the window you want to bitblt, you should be able to do a GetDC() on that window, then blit from that dc... It should blit what is being displayed on that window, regardless of a window is over top of it. I think.
Where are you getting the sourcedc in the example?
|
|
|
|
|
Greg Daye wrote: It should blit what is being displayed on that window, regardless of a window is over top of it.
Not so. Once it's on the screen it's on the screen. Device contexts obtained for windows
represent the device the window is rendered on (the screen).
|
|
|
|
|
Yeah. Greg is right. Blitting somehow doesn't restrict itself to the lower level window dc. It takes information from the top level window as well. What I felt was, to somehow update the memory dc after the draw operation. I tried sending WM_PRINT message, which I found in msdn said, it updates the dc. This too doesn't help me. Anymore insights or workarounds to do the job?
Thanks
cheers
rajesh.r
|
|
|
|
|
Hello all,
I am facing a problem in replacing a view to display the output.
I have a pieceof code as follows ::
**************************************************************************
///
some print statements;;
...
...
//////
CRuntimeClass *ptr = RUNTIME_CLASS(COutputRichEditView);
pMainFrame->ReplaceView(0,1,ptr,CSize(200,200));
///
again some print statements;;
...
...
//////
CRuntimeClass *ptr = RUNTIME_CLASS(COutputRichEditView);
pMainFrame->ReplaceView(0,1,ptr,CSize(200,200));
***************************************************************************
The above code initially prints a set of statements and displays them to the user. Then it takes some other input from the user.Calculates the values.It again has some print statements. The second set of print statements are to be displayed after the first set. So i need to write the
following 2 lines again.
CRuntime....
pMainFrame....
As soon as i repeat the above statement, access violation occurs.
I tried using following code as well. I defined a class COutputRichEditView1.
CRuntimeClass *ptr = RUNTIME_CLASS(COutputRichEditView1);
pMainFrame->ReplaceView(0,1,ptr,CSize(200,200));
But its not working...
Any help in this context will be useful.
I have already hunted information,but doesn't prove to be useful.
Please help..Its urgent.
Regards,
shraddha
|
|
|
|
|
Shraddha Gautam wrote: i repeat the above statement, access violation occurs
What does debugger says ?
Shraddha Gautam wrote: pMainFrame->ReplaceView(0,1,ptr,CSize(200,200));
what does ReplaceView does ?
|
|
|
|
|
Have you declared you COutputRichEditView with DECLARE_DYNAMIC ?
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Do not feed the troll ! - Common proverb
|
|
|
|
|
i want to get a unique sign as the encryption code~
but i doubt there do not have the unique sign to specific the certain Floppy Disk.
who have the idea?
|
|
|
|
|
The best solution I can think of is to use the serial number of the floppy disk. It's meant to be (fairly) unique.
The reason why the "unique" serial numer exists is, AFAIK, the only way for the floppy driver (in the OS) to find out that the diskette has been replaced in the floppy drive, and hence, the directory structure has to be reloded by the driver/OS.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
i kown this way. OS can allocate a serial number to the diskette by format.
but if two OS format the diskette can set the same serial number?
i am not sure~
|
|
|
|
|
Yes, that's why I wrote "fairly" unique.
The serial number is just 4 bytes long (32 bits).
But if you want a more unique number, You could create a file on the diskette, and use the time stamp for that file.
Combine the time stamp of that file with the diskette serial number, then you will have a more unique number.
Would that solution be good enough?
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
thanks~
this way looks like a compromise.
|
|
|
|
|
Well, it isn't the ideal solution.
But if you want to have an encryption key on the diskette itself (without violating things), this is one way to go.
Else, I guess you could make the diskette bootable and then overwrite a part of (one of) the boot files (IO.SYS or MSDOS.SYS) with the decryption key.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
|
|
|
|
|
hi,
i have a dialog created in my application i saw in one website the coding snippet for a creation of bitmap button.
They have used the constructor for initiallization.
It goes like this:
Use the constructor to load the bitmaps of each button:
CGeomeSheet::CGeomeSheet(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)<br />
:CPropertySheet(pszCaption, pParentWnd, iSelectPage)<br />
{<br />
m_psh.dwFlags |= PSH_NOAPPLYNOW;<br />
<br />
AddPage(&Quad);<br />
AddPage(&Circ);<br />
AddPage(&G3D);<br />
<br />
btnBmpOK.LoadBitmaps(IDB_OK_DEFAULT, IDB_OK_SELECTED,<br />
IDB_OK_FOCUS, IDB_OK_DISABLED);<br />
btnBmpCancel.LoadBitmaps(IDB_CANCEL_NORMAL, IDB_CANCEL_SELECTED,<br />
IDB_CANCEL_FOCUS, IDB_CANCEL_DISABLED);<br />
btnBmpHelp.LoadBitmaps(IDB_HELP_NORMAL, IDB_HELP_SELECTED,<br />
IDB_HELP_FOCUS, IDB_HELP_DISABLED);<br />
}
i need to know how they hav used CPropertySheet in the constructor for the default base class to be CDialog???
how to chose CPROPEERTYSHEET as base class ne 1 plz help me!!!!!!!!
zari
|
|
|
|
|
zareee wrote: how to chose CPROPEERTYSHEET as base class
Using menu Insert-->Insert class .
|
|
|
|
|
Hello,
I want to know is there any method to distinguish among file and folder?
|
|
|
|
|
if u r using MFC then use CFileFind or FindFirstFile(Win32 API)
never say die
|
|
|
|
|
I have tried using CFileFind::IsDirectory() method.
But can you guide me with any method in C++, i have to identify file or folder provided in string format.
|
|
|
|
|
tony1-udz wrote: with any method in C++,
Did you mean not using MFC ?
What about PathIsDirectory ?
|
|
|
|
|
Is SetCurrentDirectory helpfuls?
|
|
|
|
|
GetFileAttributes. A folder will have FILE_ATTRIBUTE_FOLDER, a file will not.
(I hope I remember the constant name correctly).
|
|
|
|
|
hii ,
Can somebody help me ..
For the buttons on the toolbar how can we give the effect as highlighted when pressed or when the mouse is move on it .
Thanks
Shikha
"If there is a will there is a way"
|
|
|
|