|
You may have a look at ON_CONTROL_RANGE and ON_COMMAND_RANGE macros.
Best regards,
Alexandru Savescu
|
|
|
|
|
can i use both modeless and modal dialogs in a dialog based appication in VC++?
kalyan
|
|
|
|
|
yes, of course. there is nothing about an application type that determines the kinds of dialogs you can use.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Where can I get help html creation program at?
|
|
|
|
|
http://www.microsoft.com
in search type in " html help workshop"
then download the it and install it.. after that
1) open html help workshop program
2) create a new project. which will create yourhtml.hhp and yourhtml.chm
3) write your html pages.....
4) use shellexecute to call yourhtml.chm
hope it helps.
|
|
|
|
|
Theres no onInitialUpdate sort of function in the doc class. SO where does one initialize doc variables? I am thinking I'll do it in a view class through the doc pointer, but surely it can be directly??
Thanks,
ns
|
|
|
|
|
Inside OnOpenDocument() and/or OnNewDocument() . These get called when the document is opened or created. Similarly, document cleanup should occur in DeleteContents() .
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
If you have MDI app, put the init code in the constructor. SDI reuses CDocument-derived object, so you have to override OnNewDocument/OnOpenDocument/DeleteContents.
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
Thanks very much for the ideas. According to MSDN,
"CDocument::OnNewDocument. This method is called by the framework as part of the File New command."
SInce in my MDI app, there is no File/New button or menu item by design, I did not know if I could use it. I like the constructor idea so I think I'll use it since thats always guaranteed to run in MDI. I just dont know if OnNewDocument is called automatically, or only when the user presses File/New.
about this.
Thank you for the replies.
ns
|
|
|
|
|
How to put the desktop into a device-context ??
|
|
|
|
|
Try PaintDestkop function. However, it will not work with memory DCs on 2K/XP.
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
Well , i need it to w2k and above .. why it will not work ? any other ideas? thanx
|
|
|
|
|
adara wrote:
why it will not work ?
I have no idea. It works on 2K/XP when you pass client (not memory) DC to PaintDesktop. Maybe they've decided that this will be some security hole
You may try GetDesktopWindow and WM_PRINT instead.
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
Straight from the SDK sample Switcher:
if (hdc = CreateDC (TEXT("DISPLAY"), NULL, NULL, NULL))
{
int xSize = GetSystemMetrics(SM_CXSCREEN);
int ySize = GetSystemMetrics(SM_CYSCREEN);
StretchBlt(memDC, 0, 0, destW, destH,
hdc, 0, 0, xSize, ySize, SRCCOPY);
DeleteDC(hdc);
}
|
|
|
|
|
Hi all!
Does anyone know if there is a way to override the default project settings in VC.NET or VC60?
By this I don't mean the manual tackling with Project/Settings dialog. To make myself clear I'll give a little example: When you create a new Win32 project, it defaults to use single-threaded run-time libraries, but almost all my projects are multi-threaded. So, after creating the project, I *always* have to go to Project/Settings dialog and make appropriate adjustments. It would be nice to be able to override these default settings for good, so every new project will be automatically set to use multi-threaded run-time libraries.
I tried to automate this task using IDE VB macros in VC60 but I didn't succeed.
Thanks for any help
Pankaj
Without struggle, there is no progress
|
|
|
|
|
This maybe lame help... but I think you may want a 'custom application wizard'... or something like that. I have not done this yet... but I really should.
|
|
|
|
|
I am writing MFC apps and I have included a c++ file with header ( I have built them previosly in win32 console project ) without errors. And when I removed the main() and put into MFC project it comes out with the following error:
fatal error C1010: unexpected end of file while looking for precompiled header directive
Any idea?
|
|
|
|
|
You did not include "stdafx.h"
Suc6
|
|
|
|
|
I just want to confirm this. Is it s fact that when OnInitialUpdate runs it calls OnUpdate ? I know that UpdateAllViews calls it, but wanted to make sure that the very first time the view is created, its called also. I put in a messagebox in the OnUpdate and it did trigger initially before the view came up. however I want to get absolute confirmation.
Thanks,
ns
|
|
|
|
|
|
Hmmm. I dont know. I didnt call OnUpdate explicitly from my InitialUpdate, but the msgbox I put in OnUpdate fired before the view was created. I'm doing something with char*, and if I do call it explicitly, the items in a listbox I am populating in OnUpdate get messed up. Why in the world am I getting the messgaebox in OnUpdate even though I havent called it explicitly. Incidentally, thats the place I populate my listbox(in onupdate) and it is getting populated when the view appears. ????
Thanks for answering.
ns
|
|
|
|
|
OnInitialUpdate() is called when the view is attached to the document. OnUpdate() is called when the doc is modified. You can cause OnUpdate() to be invoked by marking the document dirty (by calling SetModifiedFlag() ) or by calling UpdateAllViews() .
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
...for most of the day. Have to leave before my housekeeper shows up. I'm told I get in the way.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
If you really need to get down into the guts and see what's happening, there are several articles on CP about debugging trace statements, etc. A very simple way for trying to see the sequence of just a few functions is to put an ASSERT (false); at the beginning of those functions. Yes, there are much better ways that scale up nicely, but just to get a sense of how these few functions act in sequence, try this. When each assert fails, and you get your message box, click on ignore and let the functions proceed.
Good luck,
Dave
"You can say that again." -- Dept. of Redundancy Dept.
|
|
|
|
|
As a matter of fact I am good looking, tall, smart, and on top of all I have lots of girls.
Still I have certain problems in life. E.g. I don't know the 25 chars product key of VS .NET and without that I look pretty poor, fat, and bald.
Could somebody help me please in getting back to my old style?
Thanks
pepepp493@hotmail.com
|
|
|
|