|
Naveen.R wrote: What do you think?
I was just asking for clarification. I've always referred to a "GUI thread" as one with a message loop, whereas a "worker thread" as one without a message loop. In reality, the latter can also interact with UI components but not trivially.
"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
|
|
|
|
|
After you asked me the question I tried to call the function IsGUIThread() function from a thread which was created using AfxBeginThread() and CreateThread(). the behavior I found was that the IsGUIThread() function return true when called from a thread created using AfxBeginThread() where as it retured FALSE when called from a thread created using CreateThread(). after checking the MFC code, I found that When we call the AfxBeginThread the Entry point is actually _AfxThreadEntry and inside that function a SetWindowsHookEx() is called. Thats why the IsGUIThread() function returned TRUE when called from such threads. But I didnt understand why..
|
|
|
|
|
Thank you very much -- I will investigate!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
I know it look stupid.. do you have control over source code!
"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
|
|
|
|
|
huh?
The reason I asked the question:
I have these objects -- with entrypoints....
They affect UI and work much better when called from a UI thread -- threads with a message queue attached.
I just wanted to put some assertions in to make sure the API's were used correctly.
I'll take a look at IsGUIThread
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />
Peter Weyzen<br />
Staff Engineer<br />
<A HREF="http://www.soonr.com">SoonR Inc -- PC Power delivered to your phone</A>
|
|
|
|
|
FYI
In VS 2008, the threads window now has a category column that shows the main thread, worker threads, UI threads, and RPC threads.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
hello,
I wanted to create a new table in access through a code in VC++.
Can I use CRecordSet to create a new table in access?
Prithaa
|
|
|
|
|
You can use CDatabase for this. Also, Google for "CREATE TABLE."
"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 all,
I just wanted to know that when we a make a dialog based application where are dialogs saved on disk as we have bmps saved in our res folder.
Thanks in advance
|
|
|
|
|
Do you mean dialog creation ?
Please refer here[^] for more information.
Regards,
Paresh.
|
|
|
|
|
Dialogs are on the RC files.Is this your answer?
|
|
|
|
|
Actually i m asking this thing because i have a dialog based application in a disk, when i copy same application on to another disk, size remains same but i am unable to get my dialog box in my newly copied application. I have opened resource file also, but definations are also not available there. Now i dont know how to get my previous dialog boxes.
|
|
|
|
|
neha.agarwal27 wrote: Actually i m asking this thing because i have a dialog based application in a disk, when i copy same application on to another disk, size remains same but i am unable to get my dialog box in my newly copied application. I have opened resource file also, but definations are also not available there. Now i dont know how to get my previous dialog boxes.
???
I am not able to understand your problem. Could you please mention your problem more clearly ?
Regards,
Paresh.
|
|
|
|
|
neha.agarwal27 wrote: when i copy same application on to another disk
u mean u copied the source code or the built output?
Thanks,
Anand.
|
|
|
|
|
|
When we create any dialog, when we use some controls on that dialog the implementation for that dialog is inside our MFC DLLs, also if we have some custom controls then implementation for it is in that particular DLLs, as the dialog is not external dependancy (unlike BMPs), it is inside the application itself, and the information related to that dialog is given in resource file, using Resource file information the compiler takes the corresponding resources and renders dialog accordingly. Wht you must have missed is to copy the resouce file properly. Copy it again and compile it .. Hopefully it should work then.
Thanks,
Anand.
|
|
|
|
|
No it is not working properly. i have tried copying it again but still the same problm is there.
|
|
|
|
|
Try recompiling the code again.
Regards,
Paresh.
|
|
|
|
|
neha.agarwal27 wrote: No it is not working properly
Then there must be some specifice problem to your project, ideally it should work.
Thanks,
Anand.
|
|
|
|
|
neha.agarwal27 wrote: when i copy same application on to another disk...
How?
neha.agarwal27 wrote: ...size remains same...
Of what?
neha.agarwal27 wrote: ...i am unable to get my dialog box in my newly copied application.
What do you mean by "get my dialog box?"
neha.agarwal27 wrote: I have opened resource file also, but definations are also not available there.
Definations? Can you open the copied .rc file and locate the dialog templates? If not, can you do so with the original .rc file?
Is the dialog created at design-time or at run-time?
"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
|
|
|
|
|
Dialog templates are stored in the project's .rc file. After compiling, they are in a .res file along with all the other resources (e.g., bitmaps, menus, icons).
"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
|
|
|
|
|
Hello everyone,
I am wondering how to set DLL property (when we select the DLL and using right click to choose properties), like version, language, company, etc.?
Do we need to write some code or just need to configure something in Visual Studio 2005?
thanks in advance,
George
|
|
|
|
|
Hi.
if you use ATL you can uses source editor. In source editor you could see version folder. double click it.......
holp it's helpful for you.
|
|
|
|
|
Hi chnuser,
I am not using ATL. But I can find a related resource to edit such properties in resource view. Thanks!
regards,
George
|
|
|
|
|
Take the resource view on the visual studio. right click on the project, select add->Resource. A dialog box will appear in that select Version and press new. You are done!
|
|
|
|