|
In managed C++ - use SetWindowPos to set the Z order to top. The panel shouldn't move, unless you tell it to.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
In MC++, use SetWindowPos with SWP_NOMOVE | SWP_NOSIZE and a position of TOP.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks for the help Christian.
|
|
|
|
|
Also i have noticed that if i change select statment, there would not be any effect.
|
|
|
|
|
I would like to make a programme that list active users that are connected to my pc.
How do i get access to these information.
What should i look into?
|
|
|
|
|
I have a button in a dialog which when clicked opens an OpenFileDialog box and the user can select a file. The problem I am facing is that when I try and copy the file & path using the FileName function into a CString, I keep getting a NULL value.
The thing is, the code works as intended in the debug mode but doesnt in the release mode.
Below is the code I am using:
void CDisColEnvDlg::OnBnClickedButtonLocalBrowse()
{
// TODO: Add your control notification handler code here
System::Windows::Forms::OpenFileDialog* appOpenFileDialog = new System::Windows::Forms::OpenFileDialog();
appOpenFileDialog->Filter = S"Trace File (*.tf1)|*.tf1";
if (appOpenFileDialog->ShowDialog() == System::Windows::Forms::DialogResult::OK)
{
CString szFileName = appOpenFileDialog->FileName;
AfxMessageBox(szFileName,MB_OK|MB_ICONINFORMATION,0);
}
}
Can anyone tell me what the problem potentially could be.
Also, is there a way to do this using unmanaged code?
Thanks in advance.
--
If a program is useless, it must be documented.
|
|
|
|
|
vajjalu wrote:
Can anyone tell me what the problem potentially could be.
The string in the dialog is probably wide, try using _bstr_t.
vajjalu wrote:
Also, is there a way to do this using unmanaged code?
Yes, these dialogs exist in MFC, CFileDialog or COpenFileDialog or something. You can get at them without MFC as well, by filling a struct and passing it to an API function, I believe.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
In your toolbox you have OpenFileDialog and SaveFileDialog. It's preaty easy to use it
|
|
|
|
|
Hi there!
I'm making an application using managed C++, and i'd like to know how
i could change the default appearance,with an easy way,(without using GDI+) of the form in something more presentable.(e.g adding some graphics). Is there any class that impements graphics or changes the resources of the form?
thanks in advance.
|
|
|
|
|
|
The Graphics class is the CDC equivelant in GDI+. If you don't want to use GDI+ in terms of drawing stuff yourself, you may as well avoid that altogether and just use picture box controls to put some images on your form.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello.
I have an element with attributes. Now i want to change attribute of an element. But i dont want to delete element and add. I would apritiace if there would be example.
Thanks.
|
|
|
|
|
If you have an XmlDocument, you can use SelectSingleNode with an XPath to get an XMLNode. This has an attributes collection, you can iterate through this and change the attribute you want.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Thanks. I have serious slowdonw. About 2 Minutes. So i have chose to use Accsess Database through Jet. But i have decidet that i will use XML as Inport, Export and setting
|
|
|
|
|
Saksida Bojan wrote:
I have serious slowdonw. About 2 Minutes.
Where ?
Saksida Bojan wrote:
So i have chose to use Accsess Database through Jet.
What is slow that you think this will help ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
By using objects like critical sections and mutexes to syncronise access to common objects between threads.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
thanks for your reply.
Hi, i am from china.
|
|
|
|
|
I have written __gc class. now i don't know how to make Event Hande, declare it and ovverride
Can you help me, please
|
|
|
|
|
Hi all,
What's the best way for me to switch from one panel to the last visible panel. i.e. I have three panels on a form, panel2 (after some use) switches back to either panel1 or panel3 depending on which one was last being viewed. Does .net provide ant functions for this or will I have to write my own. If so what steps do I need to take.
Thanks
Rich
|
|
|
|
|
|
Hi
I am working on a dialogbased application that contains a toolbar. I have been able to add more icons to toolbar but the problem is after clicking on new toolbar icons control does not reach their respective message handlers while the icons that were created initially are working fine.
Do anyone face any problem like this? Can anyone provide me a possible solution to this?
Regards,
Anant
|
|
|
|
|
Hello there,
I'm doing a class library in C++.NET, and I declared two classes, A and b,
as follows:
public __gc class B;
public __gc class A : public baseA
{
private:
B *entrada;
B *salida;
};
public __gc class B : public baseB
{
private:
A **entrantes;
A **salientes;
};
However, while compiling I get the following error:
error C3160: 'entrantes' : cannot declare interior __gc pointer or reference
as a member of 'espacio_nombres::B'
error C3160: 'salientes' : cannot declare interior __gc pointer or reference
as a member of 'espacio_nombres::B'
Why this error happens? What can I do about it?
I mean, I already read the MSDN documentation on such error, but as far as I
understood, it says that a __gc class cannot have as member a pointer to
another __gc class. This sounds rather absurd to me, that's why I'm posting
this message. Hope someone can either confirm that what I understood was
right (and then I'll throw C++NET to the trash), or explain me the reason of
such error.
Thanks for any thought,
KK.
One day you'll find
that I have gone,
for tomorrow may rain, so
I'll follow the sun...
|
|
|
|
|
|
Here is the outline of the problem.
I have some third party software which can only access unmanaged dlls and
I need to pull some data out of an Access database and pass it into this software.
I have written a .net dll to get the data (using OleDb etc) which works great.
I have written a win32 dll that the third party software can access.
How do I get the win32 dll to call the method in the managed dll and pass the data into the app?
Can any one help with this?
|
|
|
|