Click here to Skip to main content
15,894,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: OT- :) Pin
Eytukan29-Dec-05 0:23
Eytukan29-Dec-05 0:23 
AnswerRe: which is the Best book for 'C' Pin
ddmcr29-Dec-05 1:06
ddmcr29-Dec-05 1:06 
GeneralRe: which is the Best book for 'C' Pin
Eytukan29-Dec-05 1:13
Eytukan29-Dec-05 1:13 
GeneralRe: which is the Best book for 'C' Pin
ThatsAlok29-Dec-05 1:35
ThatsAlok29-Dec-05 1:35 
GeneralRe: which is the Best book for 'C' Pin
sunit529-Dec-05 1:44
sunit529-Dec-05 1:44 
GeneralRe: which is the Best book for 'C' Pin
Eytukan29-Dec-05 2:17
Eytukan29-Dec-05 2:17 
GeneralRe: which is the Best book for 'C' Pin
koothkeeper29-Dec-05 10:10
professionalkoothkeeper29-Dec-05 10:10 
QuestionCreating multiple forms Pin
navvara the infantryman28-Dec-05 22:43
navvara the infantryman28-Dec-05 22:43 
I dunno if this is the right palce for this but i'm new to this forum so bear with me.

So i finnaly got Visual studio.net 2003 and it's great i cannot believe how stupid i was to be sticking with visual studio instead of this. There's so many new things i can do with it, includinga form based application.

But here's the problem: I want to have some sort of a connection between different forms, have one form start another but when i try to run another form and launch it from a form by calling Application::Run(new newForm); i get the following message: "starting a second message que on a thread is illegal".
i can start a new form without getting this message, or any other error by calling either Application::Exit or Form::dispose, these both kill the old form's message que instanly and allow me to run a new form. the problem here is that the new form runs and closes imediately.
I really need my program to start new forms from another, lets say when a button is pressed so any ideas guys?

i have some of my own but i dunno how to implement them:

-having the form return a value to the winmain function and let the form creation be handled there, unfortunately i dunno how to have a form return a value
and writing a return 1 in the button's code won't help as the button is declared as a void function. besided since the form is a deiiferent application from the winmain the mesage won't know where to go.

-making an invisible window and letting that run and receive messages from forms an handle the creation. i think that SendMessage or similar funtions would work but the problem here is that since the form is an external app i dunno how to get the invisible's window handle

-starting a new thread whenever a new form is to be created, this might work ut it's too complicated and due to the architecture of my app i ould rather not use it.

-calling Form::StartDialog(new newForm); won't do the trick for me although it's recomended by the error message.

One other thing, whatever method you (hopefully) propose i would like it to include some sort of external function or callback that handles the form creation as in version 2 of the app i plan to have it receive it's messages through directplay rathr than them being sent by a form running on that putter (have forms creation messages sent by a remote putter and have a sort of clien-server app).
A method that just links forms together would also be fine, actually anything would be fine.

m$: It is normal for your screen to go blank and for your computer to restart itself several times
QuestionVS 2005 vs VS.NET 2005 Pin
QuickDeveloper28-Dec-05 22:41
QuickDeveloper28-Dec-05 22:41 
QuestionTransparent bitmap Pin
SAKURAVN28-Dec-05 22:06
SAKURAVN28-Dec-05 22:06 
AnswerRe: Transparent bitmap Pin
Identity Undisclosed28-Dec-05 22:39
Identity Undisclosed28-Dec-05 22:39 
QuestionTreeCtrl Display Problem (Unable to remove the black color around a node icon) Pin
Owner drawn28-Dec-05 22:05
Owner drawn28-Dec-05 22:05 
AnswerRe: TreeCtrl Display Problem (Unable to remove the black color around a node icon) Pin
Prakash Nadar28-Dec-05 22:26
Prakash Nadar28-Dec-05 22:26 
GeneralRe: TreeCtrl Display Problem (Unable to remove the black color around a node icon) Pin
Owner drawn28-Dec-05 22:33
Owner drawn28-Dec-05 22:33 
GeneralRe: TreeCtrl Display Problem (Unable to remove the black color around a node icon) Pin
Prakash Nadar28-Dec-05 22:40
Prakash Nadar28-Dec-05 22:40 
AnswerSomebody help me.... Pin
Owner drawn28-Dec-05 23:27
Owner drawn28-Dec-05 23:27 
GeneralRe: Somebody help me.... Pin
Identity Undisclosed29-Dec-05 0:17
Identity Undisclosed29-Dec-05 0:17 
GeneralRe: Somebody help me.... Pin
Owner drawn29-Dec-05 0:35
Owner drawn29-Dec-05 0:35 
GeneralRe: Somebody help me.... Pin
Identity Undisclosed29-Dec-05 1:16
Identity Undisclosed29-Dec-05 1:16 
GeneralRe: Somebody help me.... Pin
Owner drawn29-Dec-05 1:26
Owner drawn29-Dec-05 1:26 
GeneralRe: Somebody help me.... Pin
Identity Undisclosed29-Dec-05 1:48
Identity Undisclosed29-Dec-05 1:48 
GeneralRe: Somebody help me.... Pin
Prakash Nadar29-Dec-05 4:59
Prakash Nadar29-Dec-05 4:59 
QuestionHow can I use LoadBitmap() for loading a bitmap no button Pin
Saday Sarkar28-Dec-05 21:41
Saday Sarkar28-Dec-05 21:41 
AnswerRe: How can I use LoadBitmap() for loading a bitmap ON button Pin
Owner drawn28-Dec-05 21:45
Owner drawn28-Dec-05 21:45 
QuestionRe: How can I use LoadBitmap() for loading a bitmap ON button Pin
Saday Sarkar28-Dec-05 22:05
Saday Sarkar28-Dec-05 22:05 

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.