|
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
|
|
|
|
|
In other words, you are an idiot.
Could I have your address ? Seeing as you approve of stealing, I'd like to steal your car.
Christian
come on all you MS suckups, defend your sugar-daddy now. - Chris Losinger - 11/07/2002
|
|
|
|
|
i will suggest the solution...
-----------------------------------------
just call one of ur galfriends..and take the number of hairs on her head..and tell me the exact number...and i will give you the key..!!!
-------------------------------------------------
Renjith-CPian.
|
|
|
|
|
Usually serial numbers come with products
|
|
|
|
|
in OnInitDialog()
in the end of the defenition...
return TRUE;
and here is a commment added by the wizard says...
"return TRUE unless you set the focus to a control
EXCEPTION OCX Property pages return false"
what is the matter behind that??? for why the wizard say that??
what happends when we return TRUE or FALSE ??
Anyone can Explain??
Thankx in Advance....
Renjith-CPian.
|
|
|
|
|
|
ok..but 4 y the activex controls return false??
-----------me too frm TVM
Renjith-CPian.
|
|
|
|
|
Hi,
I have two listcontrols adjacent to each other. When you click on an item in ctrl1, ctrl2 gets populated with specific items. I want the app to start up with item1 in list1 highlighted, and its options in list2 already displayed (In general the options are displayed when you click on an item in list1). ANy hints?
Appreciate it,
ns
|
|
|
|
|
assuming you have a member control m_ListCtrl1 then just do
m_ListCtrl1.SetCurSel( x );
where x is the number of the element in the list you want to select
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
It says SetCurSel is not a member of CListCtrl....
|
|
|
|
|
listCtrl.SetItemState(0, LVIS_SELECTED, LVIS_SELECTED);
Don't forget to set LVIS_SHOWSELALWAYS style.
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
Thanks. I used the first line, but did not set the style. It worked though. I put the control in from the toolbox, not programmatically. I am thinking of using something like:
// The pointer to my list view control.
extern CListCtrl* pmyListCtrl;
// Allow the header controls item to be movable by the user.
pmyListCtrl->SetExtendedStyle
(pmyListCtrl->GetExtendedStyle()|LVS_EX_HEADERDRAGDROP|LVIS_SHOWSELALWAYS)
Is this what I need to do? I wont know because it works already without the style being set.....
BTW, this selecting does not trigger the OnItemChanged function that I thought it might. IS that correct behavior?
Thanks,
ns
|
|
|
|
|
Easier way to modify the style: pmyListCtrl->ModifyStyleEx( 0, LVS_EX_SHOWSELALWAYS );
Yes, it is correct behaviour for the OnItemChanged to not trigger when changed programmatically.
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|