|
Thanks, I knew I missed something
|
|
|
|
|
Just one question then.
If I want to modify from the CMyDialog the CDocument it's mandatory include the CMyDocument.h ?
Then always the complete app is recompiled if I add a member to my CMyDialog?
And then If CMyDialog affects CMyFormView (through CMyDocument) I have to update with Updateallviews from CMyDocument?
Thanks
-- modified at 14:31 Wednesday 11th April, 2007
|
|
|
|
|
doctorpi wrote: it's mandatory include the CMyDocument.h ?
Not mandatory. You can create a Controller for the Dialog that isolates it from the document.
led mike
|
|
|
|
|
I am using MSXML2::IXMLDOMDocument2Ptr to generate an XMl file.
Is there a property that i can set to have the data in the file indented?
|
|
|
|
|
LCI wrote: to generate an XMl file.
LCI wrote: Is there a property that i can set to have the data in the file indented?
I don't think so. If you are using MSXML DOM to "read" in an existing file with indentation then you can use the preserveWhiteSpace property so that if you save it out again it will be indented. But when you create the XML using the API like createElement(..) etc, no. However I think you can use a XSLT transform to produce the indented format. I can't remember all the details but look at TOPXml.com for them.
led mike
|
|
|
|
|
What is the difference in terms of code generation with these two switches? I understand one if for DLL code and one for Multithread code, but it seems that this means I need to generate four static library versions with each library (six if I include single threaded), since I need a release and debug version.
Are people really generating six versions of each static library or am I just missing something important?
|
|
|
|
|
When you specify /MD the compiler will link MSVCRT.LIB(MSVCRT.dll/MSVCR71.dll must be available at runtime) to your object code. If you use /MT the compiler will link the static version of C runtime (LIBCMT.lib) to your application. There is no need for you to generate four static library versions.
You can choose either of these two. Multi-threaded runtime DLL Version(/MD) - Or Multi-threaded runtime LIB version(/MT).
Cheers
-- modified at 6:03 Thursday 12th April, 2007
|
|
|
|
|
I'm making a program that reads data from a device. The data is then used to make a graph in real time. The problem I'm having right now is that when I open any window on top of the graph it erases everything. How do I solve this problem? Any suggestions? Thanks
------------------------
Impossible is Nothing
|
|
|
|
|
You need to save your data somewhere and paint everything in response to the WM_PAINT message only.
Whenever a part of your window needs to be repainted, you will receive a WM_PAINT message and you need to do the drawing there, and only there !
|
|
|
|
|
I was thinking, if it was possible to know when the window went out of focus, I could copy that section of the screen into the clipboard, and then repaste it when the WM_PAINT was called.. wouldn't that be easier, if its possible that is
------------------------
Impossible is Nothing
|
|
|
|
|
nevermind, ur suggestion worked out perfectly, and it wasn't nearly as difficult as i thought it would be. Thanks!
------------------------
Impossible is Nothing
|
|
|
|
|
ok I'm having another problem tho, It seems sometimes it jus stops painting. I don't know why this is happening, but by minimizing and restoring the program it starts to work again. Anyone know why this might happen?
------------------------
Impossible is Nothing
|
|
|
|
|
One message to reply to all your questions
First, your suggestion of using the clipboard when the window loose focus is not really good (it is even very scary): imagine that all applications will do that. Do you imagine what a mess it would be ? And the poor user which desperately tries to copy/paste something
In fact, once you understand the philosophy, everything makes perfect sense. I suggest that you google to find some tutorials about win32 programming (you'll probably find some usefull articles on this website). If you plan to program in win32, it is highly recommanded.
Now, for your last question: in fact the WM_PAINT message is not sent continuously: it is sent only when your window needs to be repainted (so when you minimize it, when something comes in front of it, ...). But, if you need to refresh it (for example because new data needs to be displayed), you need to invalidate it, which will cause a WM_PAINT message to be sent. For that, you can call InvalidateRect[^]
While searching for the link to this function, I came upon this link[^] which is probably what you need to get started.
Enjoy
|
|
|
|
|
Hello,
I've tried the follwing code. everything works fine except conversion from _variant_t to char*.
Any idea of how to do it?
Many thanks for your advice.
int yy = 4;
int zz = 1024;
float ff = 13589.025;
char* chh = "MyString";
_variant_t** test = new _variant_t*[4];
for(int i= 0; i
|
|
|
|
|
Arris7 wrote: Any idea of how to do it?
_variant_t var(_T("hello"));
CW2A ansiBuffer((_bstr_t)var);
cout << ansiBuffer << endl;
led mike
|
|
|
|
|
I wanted to try Visual Studio Express as a debugging medium.
I brought over a project and tried to compile it.
It complained that it couldn't find afxwin.h which is all the MFC core stuff. I looked around and couldn't find it either on that computer.
My question is: can I add something to make the express edition support MFC?
Thanks,
Ilan
|
|
|
|
|
IlanTal wrote: does visual studio express support mfc?
no
|
|
|
|
|
I am new to VC++.Can anyone tell about the concept COM with MFC.PLZ Give any article And sample mfc program with com.
|
|
|
|
|
Is the search engine broken?
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
See these[^] articles are helpfuls?
|
|
|
|
|
Thank you
|
|
|
|
|
|
I am using "CreateFile" function for accessing CD-ROM drive in the service program but it is resulting in error. I checked error through GetLastError() and found error code = 5 (Access Denied).
But calling "CreateFile" function from other program (non-service program) is working fine for accessing CD-ROM drive.
Any idea/help would be highly appreciated.
Thanks
A_K_C.
|
|
|
|
|
check the account type of the service, for instance, a LocalSystem one should have access to the CD-ROM device.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Yes, I have checked the service access and it is LocalSystem type service.
So what may be wrong with the service if it is already LocalSystem type? Probabily there is need to set security attributes of the service component through DCOMCNFG tool.
Thanks.
|
|
|
|