|
mla154 wrote: I have created a dialog box and menu in the resource editor. How do I attach the menu to the dialog box? Any help is appreciated.
Select the menu id in the dialog box editor
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief And you
|
|
|
|
|
hi,
I want to handle vertical scrolling messages sent from a CListView control, so I mapped WM_VSCROLL message.. it works fine but I dont receive a message when I scroll the control by draging the scroll box and I do not know why!!!
any ideas?
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
List controls use the LVM_SCROLL message not WM_HSCROLL and WM_VSCROLL .
|
|
|
|
|
Hi,
thank you, but how can I receive this message, and how is it received in the parent window of the control?? I cant see it in the class wizard..
i tried to use the WM_NOTIFY message of the parent but it doesnt work... and no luck with MSDN..
Can u provide further help??
Thanks
Mohammad
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
look at "dc.SelectObject(&pen)" and "dc.SelectObject (&brush)",here no matter I use "&" or not it results the same. why is that?
[code]
void CMainWindow::OnPaint ()
{
CPaintDC dc (this);
CBrush brush (RGB (255, 0, 0));
CPen pen (PS_NULL, 0, (RGB (0, 0, 0)));
dc.SelectObject(&pen);
dc.SelectObject (&brush);
dc.Ellipse (0, 0, 200, 100);
}
|
|
|
|
|
bloodwinner wrote: look at "dc.SelectObject(&pen)" and "dc.SelectObject (&brush)",here no matter I use "&" or not it results the same. why is that?
Because CGdiObject , which is what CPen and CBrush are derived from, has a HGDIOBJ() operator. Control eventually goes to CDC::SelectObject(HGDIOBJ hObject) . When a pointer is passed instead, control goes right to CDC::SelectObject(CPen* pPen) .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
do you mean both these two ways are ok? which would you prefer here?
|
|
|
|
|
bloodwinner wrote: do you mean both these two ways are ok?
Sure. Otherwise, why would both exist?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi All,
I have an application developed using VC++. This application uses mail merge for word 2003. This application opens a word document and a xls file for data source. Does anyone have a sample code that does a mail merge??..
Thanks,
Bharani
|
|
|
|
|
The mail merge code that I have uses HTML file as data source. The mail merge object opens the data source using the function call shown below:
mailmergeobj.OpenDataSource(
strFilename,
(LPVARIANT)COleVariant( CString("html")),
&vtFalse,
covOptional,
covOptional,
covOptional,
covOptional,
covOptional,
covOptional,
covOptional,
covOptional,
covOptional,
covOptional,
covOptional,
covOptional,
covOptional);
mailmergeobj.Execute(covOptional);
When this code is executed it comes up with a popup for "Select Table". Can someone tell me how to suppress this popup??
Thanks
Bharni
|
|
|
|
|
bharanidharan wrote: Does anyone have a sample code that does a mail merge??..
Not sure but the obvious place to look would be Office Developer Center[^] at Microsoft.
led mike
|
|
|
|
|
I have a jpg. Image that shows up in a picture control in my application. I can draw a small rectangle over the image using the Rectangle function. However using this function, the inside of the rectangle gets painted the color of the Brush. There is no current color for transparent, so how do i get the region inside the rectangle to not have a color but just show whatever is on the image at that point?
Is this possible using the Rectangle function?
|
|
|
|
|
Either select a NULL_BRUSH into the DC before drawing the rectangle, or better, use a PEN to manualy draw the outline for the rectangle yourself.
|
|
|
|
|
NULL_BRUSH seems to make the inside black. Is this what it is supposed to do?
|
|
|
|
|
How did you select the brush? dc.SelectObject(CBrush::FromHandle(HBRUSH(GetStockObject(NULL_BRUSH))) would be the proper way to do it.
--
A Stern Warning of Things to Come
|
|
|
|
|
Thought I would give it a try but VC6 doesn't seem to like it
error C2061: syntax error : identifier 'each'
MSDN has little to say, anybody know what the deal is?
|
|
|
|
|
It's not a valid keyword.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
According to MSDN it is, they even give a C++ example showing it's usage.
|
|
|
|
|
Not if it's the example I'm thinking of (the new C++/CLI extensions). Please provide a reference that indicates "for each" is valid in VC++ v6.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
waldermort wrote: http://msdn2.microsoft.com/en-us/library/ms177202.aspx[^]
You must've conveniently missed the part about it being for VC++ 2005.
waldermort wrote:
It also says to compile with /clr which VC6 also doesn't recognise
Of course it doesn't (support something newer than itself). Why would you think it would?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Well, obviously it must be for a newer version of VS, but that page doesn't mention VC2005, or any other version of VC. It simple says "New Language Features in Visual C++". I did however notice the v80 within the link on my local copy.
|
|
|
|
|
waldermort wrote: It simple says "New Language Features in Visual C++".
That very New Language Features in Visual C++ page states, "Visual C++ 2005 includes new syntax..."
VC++ v6 stopped being supported September of last year, and even then, new features would not be added to a language on its way out.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
waldermort wrote: but that page doesn't mention VC2005, or any other version of VC. It simple says "New Language Features in Visual C++".
If you click on that "New Language Features in Visual C++" link, the first line on that page is:
New Language Features in Visual C++
Visual C++ 2005 includes new syntax for writing applications to target the common language runtime. This topic presents an overview of the new syntax.
While you can't use the for each-in syntax, you can use the STL for_each algorithm.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Hi,
I wrote a piece of code which initially uses a 128 by 47 2D array. It works fine. But when I changed it to 1600 rows by 47 columns, the program starts to crash. The error message said that a stack overflow has occured.
I would like to know if dynamic 2D arrays solve this problem?
There are also some 1D arrays with the size of 1600. Do they have to be converted to dynamic arrays too?
|
|
|
|