|
I'm not sure of the project types that v7 offers, but with v6, you can create a console application that supports MFC. The resulting project contains two .cpp and two .h files. That's about as small as it gets. With a dialog-based project, you'll get three of each, plus a res folder.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Clickety[^]
God is Real, unless declared Integer.
|
|
|
|
|
Thanks,
Nice online samples!
Just one more question...
How do I create an empty project for a MFC application. For example if I use Visual C++ 7.0 to use the MFC wizard, I don't see an empty project option. The general hello world app looks much more simple, but what do I do if I want to start from scratch and make my own general hello world? I start out with way more files using the Wiz.
Thanks
|
|
|
|
|
File|New -> project tab -> MFC Application icon
then, follow the instructor...
TOXCCT >>> GEII power
|
|
|
|
|
Oh, sorry!
I found the properties tab to enable a normal empty win32 into an MFC application.
|
|
|
|
|
The problem is that, quite simply, you can create a Win32 app that links to MFC, which you may decide to do in order to get to CString or something, but an MFC GUI application really needs all those classes that the wizard is creating for you. The simplest thing is a dialog based app, which does not use Doc/View.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Is there any way to use the standard Windows OEM icons in a Dialog Template resource?
I'm using VC++6.0. When I add an Icon to a dialog, the dialog editor wants a path name to .ico file. I'd want to use the built in IDI_EXCLAMATION here (it's an alert dialog), rather than supply my own .ico file.
You can load this icon by doing ::LoadIcon(0, IDI_EXCLAMATION), but there doesn't seem to be anyway to do this with the resource editor.
|
|
|
|
|
Why do you need that icon resource in the resource editor? Wherever it is that you are going to display that icon, just call LoadIcon() as you have indicated.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi guys
Somebody can recommend me a good commercial Graphics Library in C++ useful to reduce problems about run out GDI graphics in W98.
My app has a lot of graphics and in w98 I run out them.
The comercial graphical Libraries reduce this problem?
There is some in the market that do a lot of things?
Best Regards
Doc
|
|
|
|
|
Are you saying that GDI+ is not an option?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I'm not programming in .net , is this a problem?
Best Regards
Doc
|
|
|
|
|
First of all, you can use GDI+ without using .NET, you can use it in C++ so long as you are using VC++7, or you have a recent SDK installed.
Secondly, if you're running out of graphics resources, no library will help you. The problem is almost certainly that you're leaking resources in your code, and the best a library can do is automatically handle ( and then clean up ) the errors that you have been making. That is to say, it may solve the problem, but it would be better for you to work out what is causing it instead.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Thanks , it's what I wanted to know about libraries and running out resources.
But, is not possible to run out resources without memory leaking?. Because the problem is when the app is running on the screen where I have >100 controls. A resource metter go down drastically when I open the dialog.
Best Regards
Doc
|
|
|
|
|
doctorpi wrote:
But, is not possible to run out resources without memory leaking?.
If you're running out of resources, then you're not cleaning up your graphics objects properly, for example if you have a DC and you select an image into it, you need to grab the image that is returned when you do so, and put it back when you're finished.
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
Hi, I installed DDK 2K and last SDK and VS6 in Win2K.
I biuld 'install' sample.
For test I used this command line:
install.exe "775FT.INF" "Monitor\GSM42D1"
If the monitor prevoiusly installed by system as "Plug and Play Monitor", upgrade is successful to Flatron775FT! (I grabed HID from inf file)
But when I first uninstall the monitor from Device Manager and retry to install monitor (or sample PortIO) I get the folowing error:
"Error: SetDeviceRegistryProperty FAILURE: The data is invalid."
Can anyone giud me?
Please give me some link about Device Installation.
|
|
|
|
|
|
|
I think the 4th parameter (HardwareId) in line 298 of the original code is causing this problem. Have you tried printing the value of this parameter when using SetupDiSetDeviceRegistryProperty(...)? Alternatively, you can use VC++ and use these setup functions in your own application (for easy debugging). The DDK compiler is not required for these SetupAPIs. Hope this helps.
-Tareq
|
|
|
|
|
Hi, i am trying to place a bitmap on a button but have had no success, i have read lots of ways of doing them and had a go at implementing them but i don't really understand about them. I was wondering if any one could explain it in simple terms maybe even give some sample code to make it easier to understand.
Thanks
Mav
|
|
|
|
|
Extremely simple if you are using VS6 with MFC:
<lu>
Set the bitmap option of your button from the styles tab in the resource editor
Create a member variable of your button control using classwizard
In your OnInitDialog() or OnInitialUpdate() overridden function, set the bitmap of the button using the SetBitmap() member function.
You will need to load your bitmap resource into a CBitmap variable
for use by the button.
So a sample code would look something like:
<br />
..<br />
<br />
m_bmpButtonImage.LoadBitmap(IDB_IMAGE);<br />
<br />
m_cButton.SetBitmap(m_bmpButtonImage);<br />
..<br />
I Dream of Absolute Zero
|
|
|
|
|
hi,
i have tried this method but what happens is that after compiling when we run the application instead of the bitmap there is a blank button or a white button.PLease check it n tell me.
vibhu
|
|
|
|
|
there is plenty of good articles on CP...
ther's surely one for you : MFC Button Articles
TOXCCT >>> GEII power
|
|
|
|
|
See if this helps.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
hi friend:
I try to add my voice recorder ActiveX control to a my company's mail posting page , but got in trouble: how to add just recorded wave file to mail server as an attachment?
thanks for any help!
|
|
|
|
|
Hi,
I want 2 capture the KeyPress event of CRichEditCtrl. How can I do that?
|
|
|
|