|
I have only taken a year long course using C/C++ so I am a newbie. I was using the metrowerks compiler but I just got Visual C++. If it is not too much trouble. It would be very helpful if you could write out all the code. That would be the greatest. Thanx.
|
|
|
|
|
Hey Folks,
With all this talk of privacy and various registration schemes which are required with WinXP, do you think when you compile an application it stores anything about your PC (Mac Address, Disk Serial) in the actual EXE?
I read somewhere, and proved it with a hex editor, that a document created by word actually contains the MAC address of your network card.
Any comments?
Do you think MS stores the VC serial number in the exe?
Anyone have any code?
Mike.
|
|
|
|
|
Thats a good question for "The Lounge" I bet you'd get a lot more responses too.
|
|
|
|
|
that a document created by word actually contains the MAC address of your network card.
If there are any GUIDs in the document, then the last 6 bytes of the GUID will be your MAC address, since that's how MS makes GUIDs. MS provided a patch for Word that removed the addresses. (Note that starting with Win2K, UuidCreate() [and thus CoCreateGuid()] no longer puts the MAC address in GUIDs.)
--Mike--
http://home.inreach.com/mdunn/
"Make sure that if you are using a blow torch that you don't set anything on fire."
-- Chris Maunder
|
|
|
|
|
Hi again... (getting tired of all my posts? Please don't be...
Is there a way to define when the mouse pointer actually can drag the splitter bar... I have a pretty narrow bar but still I would want the cursor to become "splitter drag" at the very ends of the splitter bar. Any suggestions?
/Tommy
|
|
|
|
|
Hi all,
Is it possible to have CButtons in a CView? And I dont wanna use the dialog editor, i want to create them dynamically. How to I make the m_btn appear in my CView client area? Probably through the use of m_btn.ShowWindow(SW_SHOW) but from where should I call it?
Thx,
/Tommy
|
|
|
|
|
In OnInitialUpdate.
RECT rc = { 10, 10, 100, 100 };
m_Button.Create("Caption", WS_VISIBLE | WS_CHILD, rc, this, 1);
m_Button.ShowWindow(SW_SHOW);
The 1 is the ID, I suggest creating an ID range in resource.h and using it for dynamically created buttons, then use OnCommand to capture their being pressed. Michael Dunn gave some good advice on how this works in the thread on WTL dynamic buttons I started.
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|
|
Hi again all of you,
Does anyone know of some code that has been written to switch splitter layouts? Is this even possible to do? Because I want the initial views to be destroyed; I want to use them in the new layout.
What I mean is that if for instance you have a frame layed out with splitters in a 2x2 way, I want to be able to click a button to switch to a 3x1 layout (that is a 2 column splitter where the first column has a nested 3 row splitter)?
Thx,
/Tommy
|
|
|
|
|
You can use the DeleteColumn(), DeleteView() and DeleteRow() to remove them. See MSDN.
|
|
|
|
|
I tried to do something similar and wasn't sure if it was possible. My workaround was to make the first column in the splitter another CFrameWnd and then split that one to two rows.
Bret Faller
Odyssey Computing, Inc.
|
|
|
|
|
Hi all MFC pro's,
Have you ever nested a splitter inside another static splitter? Of course you have.
I've noticed a bug in CSplitterWnd here. Say we have a 2 column splitter where the left column encapsulates a 2 row splitter. Got it?
Ok, so whenever I click the vertical splitter bar without actually moving it, the bar moves approx. 2 pixels to the right...!??!!?!?!? Anyone knows how to get rid of this pretty annoying behaviour? It would mean a great lot to me!
Thx,
/Tommy
|
|
|
|
|
Just move the damn thing using SetColumnInfo..
|
|
|
|
|
How do you mean...? After I release the mouse button, call setcolumninfo with 2 pixels in the opposite direction... that's ugly!
|
|
|
|
|
What are the functions to convert Char to Byte and vs.
In Pascal:
Chr(65) returns an 'A' and
Ord("A") returns 65.
I've looked in every C++ book I've got and can't find this one. Duh!
Richard
|
|
|
|
|
Char and int are interchangable, so int a = 'A' would be ( from memory) 65, and assuming I am right, char A = 65 would equal 'A'.
Christian
#include "std_disclaimer.h"
The careful application of terror is also a form of communication.
Eagles may soar, but weasels don't get sucked into jet engines.
|
|
|
|
|
Or if you want to emphasize casting, you can do something like:
int a = (int) 'A';
char a = (char) 65;
but this is just a matter of taste, of course...;P
I vote pro drink
|
|
|
|
|
I am trying to make a toolbar with rearrangable buttons. After not being able to figure this out, I've settled for trying to allow my toolbar to be customized, which does drag/drop automatically.
According to MSDN docs, the customize dialog sends the messages TBN_QUERYDELETE and TBN_QUERYINSERT, and expects booleans returned. If those are WM_NOTIFY messages, then I only know how to handle them with afx_msg void functions.
Any help with this would be appreciated, including anything about dragging toolbar buttons
thanks a lot,
Jake
|
|
|
|
|
Store the return value in the handler's *pResult parameter.
--Mike--
http://home.inreach.com/mdunn/
"Make sure that if you are using a blow torch that you don't set anything on fire."
-- Chris Maunder
|
|
|
|
|
My main problem here is that when the Customize dialog begins to show, it disappears again. It's there for less than a second, and my functions to handle the query delete and insert never get called.
In the message map:
ON_NOTIFY(TBN_QUERYDELETE, IDR_TOOLBAR1, OnQueryDelete)
ON_NOTIFY(TBN_QUERYINSERT, IDR_TOOLBAR1, OnQueryInsert)
In the header file:
afx_msg void OnQueryDelete(TBNOTIFY *tbn, LRESULT *result);
afx_msg void OnQueryInsert(TBNOTIFY *tbn, LRESULT *result);
Why is the dialog vanishing without ever calling these functions?
thanks,
Jake
|
|
|
|
|
When I tried placing a RichEdit control in a dialog box, the dialog box would not show when its DoModal function was called. When I removed the RichEdit control, the dialog box showed fine.
What is really odd is the fact that in another project I had a RichEdit control on a property page, and there the dialog box, RichEdit control and all, displayed normally.
Has anyone else had this happen to them? Is there a way to get a popup dialog box with a RichEdit control to display?
"What would this country be without this great land of our?" -Ronald Reagan
|
|
|
|
|
Yu have the AfxInitRichEdit( ); in your CWinApp::initinstance()????
Cheers!!!
Carlos Antollini.
|
|
|
|
|
Didn't do that. Will put that in. Thanks.
"What would this country be without this great land of our?" -Ronald Reagan
|
|
|
|
|
did you call AfxInitRichEdit();?
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
I know, I know, this is not a Visual C++ quesiton, but given the fact that most people hitting this site are here for VC++ questions (myself included, ususally), I figured that this would be the best place to give this question exposure.
Any way, I have the following code in a custom Outlook Appointment Form. When I open a new appointment, I get a "Syntax Error" error (reduntant, I know... ). Any idea why?
Function Item_Open()
Dim Insp
Dim Bar
Dim Btn
Set Insp=Item.GetInspector
Set Bar=Insp.CommandBars.Item("Standard")
'Syntax Error appears on this next line...
Set Btn=Bar.Controls.Add(Type:=msoControlButton, Before:=2)
With Btn
.Caption="Board Room"
.FaceID=0
.OnAction="OnBoardRoom"
End With
End Function
Thanks in advance.
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
I would like to know how we could insert an icon in a dlgbox
thanks in advance
gerald
|
|
|
|