|
Griffith Sutherns wrote:
Do you happen to have a few links outside of CP or CodeGuru
Here is a little tutorial
Part1
Part2
There is another nice one but i
cannot remeber what that place was called...annoying.
(I have all links on my work puter.)
/
- Don't sweat the petty things, and don't pet the sweaty things.
|
|
|
|
|
Those tutorials are great!
Thanks a lot, I'm sure these guides will give me a solid base to start with WTL.
Everything you say will be misquoted, ripped out of context and used against you.
|
|
|
|
|
I just found something you might find useful.
Complete Reference Atl 3.1
Also this might be intresting, it looks like it's pretty good.
Everything you say will be misquoted, ripped out of context and used against you.
|
|
|
|
|
The other one i got and use.
It is far from the MSDN help, but still better than
searching trought the headers.
The first link had a link to the other tutorials i
was trying to remember before though.
They are here clipcode
/
- Don't sweat the petty things, and don't pet the sweaty things.
|
|
|
|
|
Anyone have a routine for reading in the standardGPS data in the NIMA format? I want to be able to read in the GPS data on a pocket PC with an application written in VC++ (embedded 3.0). AN SDK with a few objects for parsing the data would be perfect but any help in reading the serial port as well would be better...
Thanks
|
|
|
|
|
I have two handlers for the two messages available for a menu item (command and command_ui..)
These are like:
void CFormViewMDIDoc::OnEnabledByadmin()
{
// TODO: Add your command handler code here
//AfxMessageBox"hello");
}
void CFormViewMDIDoc::OnUpdateEnabledbyadmin(CCmdUI* pCmdUI)
{
// TODO: Add your command update UI handler code here
pCmdUI->Enable(m_checked) ;
pCmdUI->SetCheck(m_checked);
}
I read that the menu item is initially disabled if theres no command handler for the menu. Even if I uncomment the messagebox in the command handler above, the menu item is still greyed out at startup. WHy is this?
Thank you,
ns
|
|
|
|
|
You might want to have a look at the value of m_checked.
Cheers,
Fredrik
<right>Sonork ID: 100.11430:PhatBoy
'It is so much simpler to bury reality than it is to dispose of dreams.'
- Don Delillo, Americana
|
|
|
|
|
Yikes! You were right! I'd set it to False in my constructor of the view class. I also see now that an uninitialized BOOL is TRUE by default. I wasnt sure what made UIUpdate function run automatically so I didnt connect things.
Thanks for clearing that up! So the constructor makes the UI handler run too...right?
|
|
|
|
|
No the constructor does not. MFC periodically calls the UI handlers for toolbar buttons and menu items when in the idle state, or when a menu is about to be shown.
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
If you have a look at the message map you'll see something like this:
BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
ON_UPDATE_COMMAND_UI(ID_INDICATOR_YOURFUNC, OnUpdateYourFunc)
END_MESSAGE_MAP()
There is a lot of stuff taken care of for you, so you don't see everything that is going on behind the curtains.
Cheers,
Fredrik
<right>Sonork ID: 100.11430:PhatBoy
'It is so much simpler to bury reality than it is to dispose of dreams.'
- Don Delillo, Americana
|
|
|
|
|
ns wrote:
I also see now that an uninitialized BOOL is TRUE by default.
No it's not. An uninitialised BOOL, or an uninitialised anything else, is undefined. An uninitialised variable will have an indeterminate value - you can't rely on it. I believe that in debug builds the compiler will assign special guard values (which are non-zero, and hence considered to be 'true') as soon as it allocates memory (i.e. before you initialise it), but that's only the case for debug builds and you should never rely on it anyway.
"We are the knights who say Ni" (The Knights Who Say Ni)
|
|
|
|
|
Well,
in the modeless dialog spawned by my docs menu, I have access to a customizable Create function so I can send over info to the dlg window - like doc members etc(theoretically - am going to try it)
How do I give the modal dlg a doc member value? I cant get the pDOc pointer and access it that way, or can I ? I suspect not since its not a view thats making the pointer (only place I've seen pDoc->GetMember() type stuff. Is it true that you can call this from any class where you instantiate the pointer, or only from the view, since its the only one who knows which doc to get the pointer to, and GetDocument is a View function.
Thank you,
ns
|
|
|
|
|
Any particular reason you can't pass a pointer to the document to the Create function? Or, for that matter, to the constructor? Then you can store the document pointer in your dialog, and Bob, as they say, is your green alien-like Uncle.
"We are the knights who say Ni" (The Knights Who Say Ni)
|
|
|
|
|
Well,
The way I've seen it, modeless dlgs get created with Create, but modal is just
CMyDialog dlg;
dlg->DoModal();
So theres no create function that I can see invoked for it. I'm new at this stuff so I can only base my info on stuff I see in books etc. Where d oes create() come in for a modaldlg? Thanks, and sorry if I seem clueless....
ns
|
|
|
|
|
I reread your response and think I can do what you say - sending it in via a constructor,. So sorry to be so hasty in my first reply (though I still dont see the Create conection)
|
|
|
|
|
Apologies - I slightly misread your first message, and thought you were talking about modeless dialogs all the way through, not just in the first paragraph. You're right, Create() isn't used for modal dialogs.
"We are the knights who say Ni" (The Knights Who Say Ni)
|
|
|
|
|
Hi
I am using the CRectTracker to drag controls around, there
are examples available also here on the site.
I face a problem, that when 2 controls overlap each other
and if they are selected( in other words they are showing
the tracker) then the CRectTracker get hidden in the overlapping place.
Please can someone tell me the solution on how to overcome this.
Thanks,
Sansky
John 3:16
For God so loved the world,
that he gave his only begotten Son ( Jesus Christ ) ,
that whosoever believeth in him should not perish, but have everlasting life.
|
|
|
|
|
Hello,
i'm looking for a compress / uncompress Routine, which is not Part
of a 5MB Lib with 300 Header Files. Has anybody a RLE Routine or
similar stuff ? I've tried cryptlib.lib, but i don't need the entire
Magic Code Stuff in GZIP Lib's.
Thanxs !
Marco
|
|
|
|
|
|
have you tried zLib by itself (without the crypto++ wrapper) ? it's only 20 files or so, compiles to a very small static lib, is very easy to use, is totally free, etc..
i use it in a bunch of places.
-c
Being just contaminates the void. --Robyn Hitchcock
|
|
|
|
|
I need to know how a program was started; by clicking an image or from a command line. How do I get this information? The starting point of this program is main().
-Janetta
|
|
|
|
|
You need to know who is the parend process (cmd.exe or explorer.exe),
look for undocument function ntQueryInformationProcess in ntdll.dll
|
|
|
|
|
My app crash on SetClipboardViewer in release mode but not in debug mode,
i call to SetClipboardViewer in OnInitDialog().
any ideas?? thanx
|
|
|
|
|
I have some troubles with MFC DLLs that contain resources.
First of all, I would like to know which MFC DLL project I have to choose exactly (Regular DLL or MFC extension DLL). And what about their differences ?
My problem is : when I have a resource (for example a Dialog) in my DLL which has the same Res ID that an another resource in my EXE, and when I want to show one of the two, I may have the other being displayed (because of the same ID). So currently I must compare the 2 "resources.h" to not have similar IDs which is not a great solution to my problem.
Please help me !
jpeg
|
|
|
|
|
I've got a MDI MFC app (without doc/view), with a CChildFrame and CChildView. I use SetWindowText to set the MDI child's title's, which works fine until I open a second MDI child, which then has its title set (correctly), but the first title is blanked out. If I toggle between the two of them they (the window titles) both disappear.
Whilst trying to figure out what I screwed up I used SetWindowText in CChildFrame::OnSetFocus and I can see the title being set but it then disappears straight away. Does anyone know what I've done wrong, or what I need to handle to get my MDI children to keep their titles?
Dylan Kenneally
London, UK
|
|
|
|