Click here to Skip to main content
15,922,407 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
AnswerRe: HOW TO get length of BYTE variable in C++ Pin
led mike2-Nov-07 4:48
led mike2-Nov-07 4:48 
QuestionJPEG to Grayscale conversion [modified] Pin
Rajish Sajayan1-Nov-07 21:35
Rajish Sajayan1-Nov-07 21:35 
AnswerRe: JPEG to Grayscale conversion Pin
Christian Graus2-Nov-07 19:18
protectorChristian Graus2-Nov-07 19:18 
Questionhow to use code using C++ for splash screen display Pin
yolmo1-Nov-07 3:04
yolmo1-Nov-07 3:04 
AnswerRe: how to use code using C++ for splash screen display Pin
Mark Salsbery1-Nov-07 11:21
Mark Salsbery1-Nov-07 11:21 
QuestionNoob help in c programming need!! Pin
cue_ball30-Oct-07 21:23
cue_ball30-Oct-07 21:23 
AnswerRe: Noob help in c programming need!! Pin
Luc Pattyn31-Oct-07 0:21
sitebuilderLuc Pattyn31-Oct-07 0:21 
QuestionInherited forms troubles [modified] Pin
Xpnctoc30-Oct-07 9:29
Xpnctoc30-Oct-07 9:29 
The problem I am having seems to be a C++/CLI forms designer issue. If I duplicate my steps below as a C# project, everything is fine. If I keep it as a C++/CLI project and actually run the application, everything is fine...

I'm trying to create a parent form class "FParent" so that I don't have to keep recreating controls common to each of the child forms. The child controls need to be contained in a Panel control, which I would also prefer to set in the parent form so that I don't have to keep re-creating the container panel.

When I create the child form "FChild", I go into the code view and change the class declaration from "public ref class FChild : public System::Windows::Forms::Form" to "public ref class FChild : public FParent".

At first, I could not drag a control into the parent panel area. However, if I go into the parent code and make "panel1" PROTECTED instead of PRIVATE, now it lets me drag a control.

So then I tried to drag a button onto the panel, and in FChild code I could see the line: "panel1->Controls->Add(button1)". This is exactly what I want. HOWEVER, when I close the designers, rebuild the project, and reopen the designers, the child button no longer renders properly. Instead of rendering as a child of the panel, the control is relative to the FChild client. In other words, if I had dropped a button at Point (3, 3) into the panel which was located at Point(20, 20), the button gets rendered at client point (3, 3) instead of the desired Point(23, 23). To make things worse, if the parent panel overlaps the child control, the parent panel is rendered over the top of the child control.

In other words, I have to design the child form in one sitting and pray that I never have to revisit it, because the only way to change the layout of the child form controls is to delete the form and start over since the parent panel covers over the child controls.

Does anyone know how to get around this and make the control render as a child of the parent panel, or do I need to compromise and make the container panel a member of FChild instead of FParent?

Thanks for your help.



-- modified at 15:43 Tuesday 30th October, 2007
Questionlate binding Pin
Sonia Gupta29-Oct-07 19:32
Sonia Gupta29-Oct-07 19:32 
AnswerRe: late binding Pin
Mark Salsbery30-Oct-07 8:18
Mark Salsbery30-Oct-07 8:18 
Questionhow to read an PNG file using c and Process it Pin
googlejumbo29-Oct-07 18:05
googlejumbo29-Oct-07 18:05 
AnswerRe: how to read an PNG file using c and Process it Pin
Christian Graus29-Oct-07 23:38
protectorChristian Graus29-Oct-07 23:38 
QuestionReading/displaying Image in raw format Pin
Raza568029-Oct-07 12:50
Raza568029-Oct-07 12:50 
AnswerRe: Reading/displaying Image in raw format Pin
Mark Salsbery29-Oct-07 13:37
Mark Salsbery29-Oct-07 13:37 
GeneralRe: Reading/displaying Image in raw format Pin
Raza568029-Oct-07 13:49
Raza568029-Oct-07 13:49 
QuestionRunning Managed Code Pin
CodeWolf)29-Oct-07 4:43
CodeWolf)29-Oct-07 4:43 
GeneralRe: Running Managed Code Pin
TJoe29-Oct-07 5:31
TJoe29-Oct-07 5:31 
QuestionNamed pipes drive me crazy... [modified] Pin
Andrewfx29-Oct-07 1:01
Andrewfx29-Oct-07 1:01 
AnswerRe: Named pipes drive me crazy... Pin
Andrewfx29-Oct-07 22:45
Andrewfx29-Oct-07 22:45 
QuestionAbout global namespace in cwchar.h Pin
minihotto28-Oct-07 22:35
minihotto28-Oct-07 22:35 
AnswerRe: About global namespace in cwchar.h [modified] Pin
George L. Jackson29-Oct-07 1:21
George L. Jackson29-Oct-07 1:21 
GeneralRe: About global namespace in cwchar.h Pin
minihotto5-Nov-07 22:52
minihotto5-Nov-07 22:52 
QuestionCreation of class Objects Pin
achichandu28-Oct-07 22:30
achichandu28-Oct-07 22:30 
AnswerRe: Creation of class Objects Pin
George L. Jackson29-Oct-07 1:28
George L. Jackson29-Oct-07 1:28 
Questionboyer-moore alogritim for seraching hex values Pin
aamir ali28-Oct-07 22:27
aamir ali28-Oct-07 22:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.