|
Paul Ingles wrote:
Creating Lightweight Components with ATL Book/CD Package, by J. Bates (Sams)
The best one I've found
Paul Ingles wrote:
Professional ATL COM Programming, by R. Grimes (Wrox)
Had the beginning one and it was too hard, so I imagine this one is completely not for beginners.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
I find
Professional ATL COM Programming, by R. Grimes (Wrox)
quite good, but it is maybe not for beginners.
Inside ATL, by Sheperd and King (Microsoft Press) is a good book to start with.
Cheers,
Fredrik
<right>Sonork ID: 100.11430:PhatBoy
"Felix qui potuit rerum cognoscere causas."
|
|
|
|
|
Hi world...
I want to disable a main title of a menu. for example the "File" title...
How to do that ?
Thanks in advance...
Hello World!!!
from Raphaël
|
|
|
|
|
CMenu* pMainMenu = GetMenu(); // in main frame
int n = 0; // number of File menu
pMainMenu->EnableMenuItem(n, MF_BYPOSITION | MF_GRAYED); // disable
pMainMenu->EnableMenuItem(n, MF_BYPOSITION | MF_ENABLED); // enable
|
|
|
|
|
hi all,
i want to know whether InstallShield able to setup ODBC DSN.
in my application , i connect to database with ODBC. so, i want to create a installer able to setup ODBC DSN for me.
i have no idea about InstallShield. pls give me some idea about this.
thanks,
jim
|
|
|
|
|
Yes, because system and user DSNs are simply registry settings. If it's a file DSN (not recommended for an installation of course) you could include it in the install, but I wouldn't do that personally.
Were you looking for a yes or no answer or details as to which registry settings as well?
Jeremy Falcon
Imputek
<nobr>"..." - Paul Watson 07-17
|
|
|
|
|
Can someone introduce to me a Autocad compatible drawing class library? I came across one at www.vdraw.com, but unfortunately, it is a ActiveX component. I prefer a C++ library that use MFC.
Thank you.
|
|
|
|
|
Can anyone give me suggestions on how to convert Word's .doc format to rtf format in an app ?
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
I am sick of fighting with Martin, I think I will ignore his posts from here on in, and spend the time working on articles instead.
Christian Graus
|
|
|
|
|
Is it on a machine with Word installed ?
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
Yes, that could be organized
But I wann do it via my own app.
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
I am sick of fighting with Martin, I think I will ignore his posts from here on in, and spend the time working on articles instead.
Christian Graus
|
|
|
|
|
Colin Davies wrote:
Yes, that could be organized
Then you can do it via COM
Colin Davies wrote:
But I wann do it via my own app.
Then you'd need to search the web for the Word file format, and hope that it is organised so you can cope with all the different versions easily.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
hi guys
whats the best way to disable ctrl-f4 in a mfc MDI app?
Bryce
|
|
|
|
|
this works for me
dont ya hate it when u post a Q and then 5 mins later hafta say you've sorted it
BOOL CMainFrame::PreTranslateMessage(MSG* pMsg)
{
if((WM_KEYDOWN == pMsg->message ) && (GetAsyncKeyState(VK_CONTROL) < 0) && (VK_F4 == pMsg->wParam ))
{
TRACE("CTRL-F4 DOWN\n");
return TRUE;
}
...
bryce
|
|
|
|
|
Kewl that you posted the answer.
But why is it that some folk avoid the PreTranslateMessage like the plague ?
Regardz
Colin J Davies
Sonork ID 100.9197:Colin
I am sick of fighting with Martin, I think I will ignore his posts from here on in, and spend the time working on articles instead.
Christian Graus
|
|
|
|
|
I have added "myfile.exe" to the my project's resource. The ID for the file in the project is "IDR_FILE2". After that,I created a newly open file with CFile with the following code:
CFile newfile("c:\\test\\quest.exe",CFile::modeCreate|CFile::modeWrite);
Which ofcourse will create a blank "quest.exe" in the directory. But I want to copy "myfile.exe" in the project's resource in to the newly create file "quest.exe" Could you please tell me the exact code that do what i want?
Thanks in advance for your help
noilivap
|
|
|
|
|
I guess you'd need to step over the file that is a resource, and write it's contents to the files. I could tell you how to do that with proper C++, but not with Microsoft's imitation classes.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
Could you please tell me the exact code(proper C++)?
Thank you very much for your help.
|
|
|
|
|
Does the file contain text only, or is it binary data, like an image ?
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
The file is a binary executable (.exe) and i want the newly created file be able to execute as well. And could you show me the code for text file too please.
Thank you so much for your help.
|
|
|
|
|
The part I'm not sure about is stepping through the original file object. I'll have a look tonight and LYK. Otherwise, a text object is easy.
std::string sObject; // Has been set to the text of the file
std::ofstream aa("c:\\myfile.txt");
aa << sObject;
aa.close();
You need to #include <iostream> and <fstream> and then that would be fine. The file can be opened with ios::bin as a parameter to be in binary mode, but unless you have a method of stepping through the file object, that does not help much. I'll do some research.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
I have compiled the boost library (specifically the regex++ portion), and have successfully used it in a test app in VC6. The problem is, that im getting no Intellisense (and I am using VisualAssist), and it is quite annoying. Its a small issue, but I am wondering what directories need to be included in VC and where I need to add those directories (I tried Tools:Options). Any suggestions?
|
|
|
|
|
I am trying to enumerate through all the process on running on my computer
so I can run through them and get a handle to the process using OpenProcess()
const DWORD dProcessCountGuesstimate = 200;
DWORD ardProcessIds[dProcessCountGuesstimate];
DWORD dNumberOfProccessFound = 0;
BOOL bReturn;
bReturn = EnumProcesses(ardProcessIds,
dProcessCountGuesstimate * sizeof(DWORD),
&dNumberOfProccessFound);
My question: Is there a better way other then guessing the number of process running on my computer. It kinda seems retarded to do it this way. Could someone please help.
Thanks.
|
|
|
|
|
The problem is that the process set is very volatile. Processes get started and stopped very regularly, without user intervention. Even if you could determine immediately prior to calling EnumProcesses how many there were, there's no reason to believe the count will be the same by the time EnumProcesses executes. So, just make a wild-ass overestimate of the count, and hope for the best. I'm sure that with statistical analysis, you could determine a value that has a 99.99% probability of being sufficient. But memory is cheap, right? Make your best guess at how many there will be -- and double that. Even if you allow for 1000 processes, that's just 4000 bytes.
Scot Brennecke
Software Developer
VC++ MVP
|
|
|
|
|
I have a strange problem that I am not sure where it is coming from. I have a program (GUI) that runs fine. I added another Form to my program and put label etcs on. All my labels I have made a label class to customize the behavior. As such I subclass all labels and such on all forms I make. And I have a lot of forms in my project.
OK. Today, after I added ONE single extra label, the system runs fine but when I exit, it gives me an access violation error.
What I want to know, is there a limitation how many controls there are in a project? Is there a limitation how many BRUSHes etc that I can create? The reason is that I have CBrush variable to hold brushes of all sorts in these so that they can change the bkgnd etc at will in the Ctlcolor function.
I hope someone can help. This is just driving me nuts.
Thanks in advance.
|
|
|
|
|
Yes, there is a limit, but it is quite large.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|