|
I am trying to use a hash_map that comes with VS.NET. The question is can I specify the size of the hash like in MFC with CMap::InitHashSize?
Thanks
Best regards,
Alexandru Savescu
|
|
|
|
|
Hi,
Is there anyway to get the information about all the users who had logged in that machine,also login & logout timing?
Thanks
Neha
|
|
|
|
|
I made an Excel automaion project to convert an excel document to PDF file.
In Excel 2000 (v. 9.0), it runs well with :
void PrintOut(const VARIANT& From,
const VARIANT& To,
const VARIANT& Copies,
const VARIANT& Preview,
const VARIANT& ActivePrinter,
const VARIANT& PrintToFile,
const VARIANT& Collate,
const VARIANT& PrToFileName);
But in Excel 97 (v. 8.0), a modal window asks for a PDF destination file, and i want to avoid it :
void PrintOut(const VARIANT& From,
const VARIANT& To,
const VARIANT& Copies,
const VARIANT& Preview,
const VARIANT& ActivePrinter,
const VARIANT& PrintToFile,
const VARIANT& Collate);
How can i do please ?
Thanks.
Aziz Rajim
|
|
|
|
|
H all,
I’m having a problem using the Micsoft DOM XML-Parser in C++. After an exception has been thrown and catched on another place in the application, the following occur: Some Elements can be read but not set. When I try to set certain elements, an exception is thrown. This problem remains until the application has been restarted. Has anyone seen these problem before? Do anyone knows where to find documentation on Microsoft DOM XML parser?
The application is COM-Based, using the version 3.0 of the DOM parser and developed in Visual C++ 6.0. I'm thankful for any input on this problem,
cheers,
/_henrik
Henrik Sternberg,
Cambridge Technolgy Partners, Germany
www.ctp.com/ce
henrik.sternberg@ctp.com
|
|
|
|
|
I am trying to mahe a multimon application with DDraw, I am working on visual 6.0 and DirectX 7.0 on W2K.
I would like to undestand why when I launch "DirectDrawEnumerateEx" with the flag DDENUM_DETACHEDSECONDARYDEVICES it does not enumerate my secondary screen device. In this case of course my second screen device is detached from desktop. When the second screen device is attached, it works well (with the flag DDENUM_ATTACHEDSECONDARYDEVICES) but I don't like much this configuration for a basic user is a little disturbing.
Any suggestion is wellcome, even if you know where I can find information about that
|
|
|
|
|
Hi all,
I have a strange problem: my application end in error when I refresh a scroll view under XP. The error is an ASSERT at line 354 on VIEWSCRL.CPP (the vaule of x position is < 0).
If I restore the old graphical interface (like win 98) all is OK.
Anyone know what appens?!
Thanks a lot.
|
|
|
|
|
I currently find trouble with using MCI command strings for stretching an avi movie to double size (by "put" command). The movie can run on some machines only, not all, although in MSDN says it is possiple. Could someone give me any idea?
Thanks in advanced.
|
|
|
|
|
Hi all. I'm a bit of an inexperienced programmer, in fact I'm a graduate Micro Engineer and didnt do a whole lot of programming at university, especially not any windows programming. In fact I'm very daunted sometimes at the scope that there is in programming and the fact that I know the tinyest little bit of it.
Anyway, at my new job, I've been having a great time learning (teaching myself) about it though and so far have successfully written my first program which is a dialog application (MFC) that connects to a bunch of different protection relays using serial, ethernet and fibre optic connections, to collect some data. This is a prototype and is working well but I'm going to have to do a bit more learning for the next stage.
They want an automated solution where the details of the relays at each substation are stored in a database and the data that needs to be collected can be done automatically. It looks like I'm going to learn about databases and windows services to get this done. If anyone could point me in the right direction as to where I should start it would be appreciated. I'm mostly daunted about database programming at the moment because I really have very little idea about what is involved with all that.
Thanks for any advice.
Life's not fair I tell ya, I life was fair I would've been born rich instead of so damn good looking!
|
|
|
|
|
You are in the right place! Codeproject is the place where you can
find source code that may help you to build a software from scratch!
There are many articles here, way to go is to look at them... Post some
message here (not in the lounge!), I am sure you will get some help!
Good luck!
One good thing about getting older, you don't lose the ages you've been!
|
|
|
|
|
Database access is easy - MFC provides a number of options that do the grunt work for you. I'd suggest looking in the appropriate section of CP and ask questions if that does not help.
Good luck !!!
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
Half the reason people switch away from VB is to find out what actually goes on.. and then like me they find out that they weren't quite as good as they thought - they've been nannied. - Alex, 13 June 2002
|
|
|
|
|
HI, I have added some menu items using CMenu::AppendMenu
and it all works nice. However, they miss the little help text that is displayed in the first pane in the status bar like when you create the menu items using the resource editor. Anyone knows a smart way to add help text string? Do I have to handle the message ON_UPDATE_COMMAND_UI for the ID_SEPARATOR which is the first pane in the statusbar? Or is there a better way?
Thanks, Patric
|
|
|
|
|
The fly by help is read from the string table. Make strings with the same resource ID as the corresponding menu items and it'll all automagically work.
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Doesn't the mainframe have to be the parent of the menu for that to work?
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
Thanks, yes it was that simple, just add resource strings. The menu must have mainframe as its parent otherwise it didnt work. The same goes with UPDATE_COMMAND_UI, it is only handled if the mainframe is the menus parent
/Patric
|
|
|
|
|
When I use CFileDialog in DCOM environment,But it can not work,Why?
For example:
Use MFC wizard generate a simple Dialog project,and add a button click handle;
add follow code segment,
void CTestOpenDlg::OnButton1()
{
// TODO: Add your control notification handler code here
CFileDialog dlg(TRUE);
dlg.DoModal();
}
compile,and run ,no problem!
1.
Now,Begin our test! add a code line to stdafx.h
#include <atlbase.h>
2.
and add _WIN32_DCOM to PreProcessor Definitions
(Project -> Settings set PreProcessor Definitions)
3.
add follow code.
BOOL CTestOpenApp::InitInstance()
{
HRESULT hRes = CoInitializeEx(NULL, COINIT_MULTITHREADED);
.......
...
}
int CTestOpenApp::ExitInstance()
{
CoUninitialize();
return CWinApp::ExitInstance();
}
4.
rebuild all project ,click button ,the CFileDialog can't diplay,and blocked in GetOpenFileName API.
Why? how to solve it?
|
|
|
|
|
1.
#include <<atlbase.h>>
|
|
|
|
|
Always initialize your main thread with AfxOleInit and it is not recommended at all to use CoInitializeEx(NULL, COINIT_MULTITHREADED) on your main GUI thread.
|
|
|
|
|
Thank you for your help.But use AfxOleInit instead CoInitializeEx(NULL, COINIT_MULTITHREADED) ,the program can not work ! some component CreateInstace fail .
Only can instead CoInitialize(Null).
please help me again!!
|
|
|
|
|
Is there a simple way of deciding when threads are better than not having them at all if optimisation is the goal?
Thanks all!
Kindest regards,
wilche
|
|
|
|
|
I have one rule, if the task may be long or asynchronous operation -> thread [yes]
if short task -> thread [no]
One good thing about getting older, you don't lose the ages you've been!
|
|
|
|
|
Hi,
I just wondered if anybody knew of any good example source code out there for file packers. I essentially just want to write a program that packs various files into one .dat (or whatever) file, which can then be unpacked and repacked on the fly.
Many thanks for any links/suggestions,
Keith
|
|
|
|
|
Keith,
See these articles:/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I have a class here that packs multiple files into a single file. And allows you to get back the files from the archive. No compression though. It's called CFileTar but is not to be confused with the Unix tar program or format.
http://www.codeproject.com/useritems/cfiletar01.asp
Regards
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Buy it, read it and admire me
|
|
|
|
|
Hey,
I need to programatically retrieve the exact file version number of RICHED20.DLL (such as "5.30.23.1205") and the control version (2, 2.1 or 3)
How can I do that?
I couldn't find the solution in MSDN Library.
Thanks in advance.
|
|
|
|
|
Have you tried loading the VERSIONINFO stuff from the DLL's resources?
Peace!
-=- James.
"Some People Know How To Drive, Others Just Know How To Operate A Car."
(Try Check Favorites Sometime!)
|
|
|
|