|
Hi can any one tell me how to create a Modal dialog box in CWinThread derived class
Here i can able to create an dialog box but it is acting as an Modeless dialogbox.
VimalKumar.T
|
|
|
|
|
Is this CWinThread a UI thread?
If not, you probably should post a message to one of your windows -- asking it to open the dialog. ???
Just a thought -- someone else will have an actual answer.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
vethathiri wrote: Here i can able to create an dialog box but it is acting as an Modeless dialogbox.
Just want to know how do you verify that it is acting as Modeless Dialog box, is debugger goes to next line after DoModal() call ?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I can able to work on the background "mean's i can operate menu items in modal dialog box it cannot be operated"
|
|
|
|
|
I can able to work on the background "mean's i can operate menu items. in modal dialog box it cannot be operated"
|
|
|
|
|
If the thread that creates the modal dialog is a different thread than the
thread another window (the main window, for example) was created on,
then of course it's going to behave like a modeless dialog - you have two
threads!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Typically, if I make a window in a separate thread, I do not give it the 'parent' of a window from a different thread. Some of the focus and input looping of a dialog gets mixed up if you do this. If you make a modeless dialog from a separate thread, better to give it the desktop as its parent. Then it and your main window can operate completely independantly of each other. If the modeless is created from same thread as parent, then by all means give it that parent.
|
|
|
|
|
Hi can any one tell me how to create a Modal dialog box in CWinThread derived class
Here i can able to create an dialog box but it is acting as an Modeless dialogbox.
|
|
|
|
|
how to change the color of caption text for a checkbox?
|
|
|
|
|
|
Can i use WM_CTLCOLOR in oninitdialog function. I want to set the color of caption text of a checkbox before displaying dialog in VC++.
|
|
|
|
|
I think is the best place to use it.
In the constructor you may have error/assertion because the window is not already created so you dont have any possibility to access visual controls, m_hWnd will be NULL and give you problems.
But in OnInitDialog all the objects are already created and it is called the very first time the dialog and its components are shown in the screen.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
subramanyeswari wrote: Can i use WM_CTLCOLOR in oninitdialog function. I want to set the color of caption text of a checkbox before displaying dialog in VC++.
you have to regularly handle teh OnCtlColor message for coloring the check box, and have to use SetTextColor there!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
I am using wxWidgets for the first time in vs2005. I have included the necessary directories but I am facing an error->
error C3861: 'wxStrdupW': identifier not found
in buffer.h. I can find the declaration of 'wxStrdupW' in wxchar.h and this header file is already included in buffer.h. But still I am getting this error. Can anyone help me with this
S.Yamini
|
|
|
|
|
What kind of libraries do you link against?
Is there a UNICODE version to link against?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
hi guys i am trying to use the datetime type in c programming which i have research that i need to include:
#include<time.h>
and the type is
time_t
am i correct? please voice your opinion
|
|
|
|
|
|
what if i want to do datetime comparison?
as what i am required to do is to let the user input his/her birthday and output how old he/she is currently.
so i am confuse as in what kinda datetime type i should use and variable.
most tutorial i seen so far only shows how to view the current datetime
|
|
|
|
|
neodeaths wrote: what if i want to do datetime comparison?
You can either compare the individual members of the tm structure, or look at difftime() . If you are using MFC, check out CTimeSpan and COleDateTimeSpan .
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
In one of my coding,i found the coding for bitmap button in the dialog.
it shows as
//mainfrm.h
public:
CMainFrame();
CSysWindow m_SysWnd;
CBitmapButton bmSCopy;
//mainfrm.cpp
m_SysWnd.SetBarStyle( m_SysWnd.GetBarStyle()| CBRS_ALIGN_TOP|CBRS_BORDER_TOP | CBRS_FLOAT_MULTI );
bmSCopy.AutoLoad(ID_SCOPY,((CWnd* ) ((CDialogBar *)((CSysWindow*)&m_SysWnd)) ) );
I dont know here where the bitmap image is get loaded in the button.
ID_SCOPY is the ID for button.
CSyswindow is CDialogBar class.
ANd it perfectly working.After executing, the button has the bitmap image what i made the image for that particular button.
I dnt know how its get loading.Pls clear me.
Anu
|
|
|
|
|
For load bitmaps on the a control of CBitmapButton it uses of LoadBitmaps.
|
|
|
|
|
In that coding, i didnot find Loadbitmaps function anywhere.
Anu
|
|
|
|
|
For the button caption “MYIMAGE,” for example, the IDs would be “MYIMAGEU,” “MYIMAGED,” “MYIMAGEF,” and “MYIMAGEX.” You must specify the ID of your bitmaps within double quotes.
|
|
|
|
|
Yes, I found that. Thank u so much
Anu
|
|
|
|
|