|
Hi, I'm using visual Studio 2005 C++/CLI. I need to have some Graphics^ shapes on a display and I want them to have NO FILL so they will appear transparent. The System::Drawing::Color does not have a Color::None or Color::Clear. This is probably pretty simple but I can't seem to find the answer.
Buck
|
|
|
|
|
The color is transparent.
|
|
|
|
|
System::Drawing::Color::Transparent ?
*EDIT* Oops I see you knew that
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
dear Sirs,
I want that my forms size change according the screen size.
In MFC Visual C++ 6.0 I have got CHelpLayout Class. But In Visual C++ Net 2005 I don't know what to do.
When I put Maximise. The screen Is full but all controls are in the left only other place is empty.
Can you help me ?
|
|
|
|
|
Hi
I wrote this code with /clr , EnumChildWindows is C++ Interop
BOOL CALLBACK EnumWindowsCallback(HWND hWnd, LPARAM lParam){}
EnumChildWindows(hwnd, EnumWindowsCallback, 0);
Error error C3867: 'EnumWindowsCallback': function call missing argument list; use '&EnumWindowsCallback' to create a pointer to member
How to call EnumChildWindows function not using p/invoke ?
Thanks
|
|
|
|
|
EnumChildWindows(hWnd, (WNDENUMPROC)&enumChildWndCallback, 0);
D.
|
|
|
|
|
Thank for your reply , but
BOOL CALLBACK EnumWindowsCallback(HWND hWnd, LPARAM lParam){}
EnumChildWindows(Handle, (WNDENUMPROC)&EnumWindowsCallback, 0);
error C2276: '&' : illegal operation on bound member function expression
|
|
|
|
|
Hi,
I don't know the details in C++ but here is how I do it in C#; it takes a delegate,
and code along these lines where list happened to be an ArrayList:
public delegate bool LP_EnumWindowsProc(IntPtr hWnd, int lParam);
EnumChildWindows(hWnd, new LP_EnumWindowsProc(CollectVisibleWindows), 0);
private static bool CollectVisibleWindows(IntPtr hWnd, int lParam) {
if(IsWindowVisible(hWnd)) list.Add(hWnd);
return true;
}
|
|
|
|
|
I need to write this code in C++/CLI only , VS 2008 , /clr
After trying C++ Interop unsuccessfully , I use p/invoke and .NET delegate
delegate bool EnumWindowsProc(IntPtr hWnd, IntPtr lParam);
[DllImport("user32", CharSet=CharSet::Ansi, SetLastError=true, ExactSpelling=true)] static int EnumChildWindows(IntPtr hWndParent, EnumWindowsProc^ lpEnumFunc, IntPtr lParam){}
bool CALLBACK EnumWindowsCallback(IntPtr hWnd, IntPtr lParam){}
void UseIt()
{
EnumWindowsProc^ fp = gcnew EnumWindowsProc(EnumWindowsCallback);
EnumChildWindows(Handle, fp, IntPtr::Zero);
}
error C3350: 'EnumWindowsProc' : a delegate constructor expects 2 argument(s)
error C3867: 'EnumWindowsCallback': function call missing argument list; use '&EnumWindowsCallback' to create a pointer to member
I can't understand
|
|
|
|
|
delegate bool EnumWindowProc(IntPtr hWnd, Int32 lParam);
bool GlobalCallback(IntPtr hWnd, Int32 lParam)
{
return true;
}
DllImport("User32.DLL")]
public static extern void EnumWindows(EnumWindowProc callback, Int32 lParam);
EnumWindowProc^ ewp += gcnew EnumWindowProc(&GlobalCallback);
EnumWindows(ewp, 0);
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
How can I make a form so that,
I have a panel of the left where there are buttons, and when I clik one button; on the right side I have a form related.
It's must appear like codeproject forms; On left a menu and on right side details of each menu item when we click on.
Who can help me ?
I am using Visual c++ .NET 2005
|
|
|
|
|
Hi,
Does anyone has a good article or example to add the Flash.ocx to my application exe (VS C++).
I need to make a setup with a standalone flashplayer, without registering or installing the adobe flash ocx.
thx
Kurt
|
|
|
|
|
Dear Sir,
I am using Visual C++ Net 2005, I am a beginer.
I need to realise a Form like I see codeproject forms.
It means at left a column of items, when you choose an item the details appear at right side. And the left side stay like that without changing.
I try to use FLOWLAYOUTPANEL I put it at the left, but How to change on the right side.
I need that when I click on the button on the left side, I seen a panel with related control that I can fill or display on the right side
|
|
|
|
|
mikobi wrote: I need to realise a Form like I see codeproject forms.
Is this an ASP.NET form or Windows Form?
mikobi wrote: I try to use FLOWLAYOUTPANEL
Try using something else like a TableLayoutPanel or a Split Container.
|
|
|
|
|
I need to do it with windows forms
Can you help me
|
|
|
|
|
Your question is like a ASP.NET question did you ask on that forum?
|
|
|
|
|
Using Visual C++ 6.0, would like to detect anytime a variable value changes during execution, haven't yet discovered a way to do with the Microsoft Debug tool. Any ideas will be helpful. Thanks in advance, Sid Kraft.
Sid
|
|
|
|
|
sidkraft wrote: Using Visual C++ 6.0
is not possible for (Managed) C++/CLI development which is what this forum is for. Please post your questions in an appropriate forum. Take the time to read the directions/guidlines for posting in forums before you post. Your question belongs in the Visual C++ / MFC forum
|
|
|
|
|
Hi, I'm fairly new to C++ and I have a tricky problem with a program I am writing.
I have a loop in place to it keeps showing the data, but I would like a way for the user to be able to stop that.
I have got a snippet of code to pause a program, and want to see if i can use it for this.
void pause()
{
std::string response;
std::getline(std::cin, response);
goto (whatever);
}
Basically, as you can tell, when the user presses enter, the program goes to another point. or at least I think it does.
Any help would be much obliged.
|
|
|
|
|
You need to post your question in the Visual C++ forum. You only get C++/CLI (.NET Framework) answers here!
"We make a living by what we get, we make a life by what we give." --Winston Churchill
|
|
|
|
|
|
I really hope I'm not asking a question that has already been answered, I've searched and couldn't find an adequate answer so thought I'd ask and hope that those that understand this technology much better than me can help me out.
The problem: I have a program written in MFC, I want to remove a portion of it and wrap it into a .dll, including an object with over 200 properties and forms so that this common code can be accessed from the program it's currently in as well as newer programs being written in C#. Basically this DLL will allow a user to change many properties of an object and I want to pass that object back and forth between the C# programs and the MFC DLL.
Ideally I'd like to be able to create the object in the C# program, fill its properties, pass the object to the MFC DLL, allow user to edit properties, and pass back to C# program.
Is there a clean way to pass the class object or reference to it in one call without having to pass each property individually?
Thank you for any and all help!
|
|
|
|
|
MFC is natvie C++. Managed code is not. Using C++/CLI you can use both native and managed code
Native C++ (DLL) Managed Assembly (DLL)
\ /
\ /
C++/CLI Assembly (DLL)
Does that help
[modified] oops... I am lost without my CPHog.... Shog where are you man!
modified on Monday, December 10, 2007 11:41:20 AM
|
|
|
|
|
Please tell me how can we get signals or input from non computer devices into our program ?
|
|
|
|
|
r.srinivas wrote: non computer devices
You mean like a refrigerator?
|
|
|
|