|
if you connect internet through a local network, your code won't work. you must specifiy a proxy as 3rd arg of InternetOpen()
|
|
|
|
|
Currently I use the MFC for all my programs, but I don't like the large library and the solid framework that comes along with it. So I thought I wanted to get rid of it, and thus I looked at plain Win32.
But as almost all my programs are heavily dependant of their GUI, programming in Win32 will be unnecessary cumbersome and repetative.
So I figured I do want some (light) framework to work with...
WTL looks very promising, but as microsoft doesn't officially support it, and because there is no documentation on it whatsoever I don't think it's an alternative either.
ATL and COM are (as far as I know) mainly for developing controls and such. I don't get the idea it's any good for designing functional user interfaces.
So... what should I do? Learn WTL despite the lack of documentation? Start with win32 (Pretzolts book - thanks guys) and build everything from scratch? Or should I give ATL a try? Or maybe there are other alternatives?
I hope somebody can shed light on this!
Thanks a lot in advance
Best regards,
Griffith
|
|
|
|
|
Griffith Sutherns wrote:
Learn WTL despite the lack of documentation?
That's what I've done. The method names in the GUI classes and control wrappers are almost identical to MFC's, so you can use the MFC docs for those, along with the gool ol' F12 key if you need to look up a particular method.
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Heh, but you're pretty professional and I am but an amateur.
I do like the -feel- of WTL, but is there any background knowledge neccecary to learn it? COM? ATL maybe?
"WTL is code that was released unsupported and we have no intention of updating it. We have no intention of continuing its availability. Frankly, it should never have been released and it will be removed from the platform SDK at the time of the next SDK revision." Bill Dunlap, Microsoft's Visual Studio 7 Lead Product Manager
This also bothers me...
Futhermore, there are but a few WTL articles here on CP. Are you sure it's the way to go?
Everything you say will be misquoted, ripped out of context and used against you. - Wise words indeed.
|
|
|
|
|
Griffith Sutherns wrote:
"WTL is code that was released unsupported and we have no intention of updating it. We have no intention of continuing its availability. Frankly, it should never have been released and it will be removed from the platform SDK at the time of the next SDK revision." Bill Dunlap, Microsoft's Visual Studio 7 Lead Product Manager
This also bothers me...
And dont remember the story behind that quote, but it
cirkulated here a while ago.
Anyway, it was just crap and you shouldn't be concerned with it.
/
- Don't sweat the petty things, and don't pet the sweaty things.
|
|
|
|
|
Well, the fact that WTL got a major rev a few weeks ago puts Dunlap's statement down.
WTL is not built on COM. It is built on the ATL windowing classes, so you need to know how those work. Here's a quick lesson:
CWindow: wraps an HWND
CWindowImpl<>: implements message handling
There you go The message map macros and handlers are slightly different, but all that is documented. Check out my hotfix checker for a full-fledged app that uses WTL.
--Mike--
Just released - RightClick-Encrypt v1.3 - Adds fast & easy file encryption to Explorer
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
It does sound very promising, I must admit.
Are there any good books which cover the WTL basics? And should I learn something about ATL first, or isn't that required?
I'll check out your hotfix checker, but it won't work on a 98 system...
Griffith
Everything you say will be misquoted, ripped out of context and used against you.
|
|
|
|
|
I would definitly not go with straight Win32.
MFC i dont like either, good as long as you stay
on the 'mainroad', but if you try something else
wierd things happens.
And it does not work to well with threads.
I suggest the WTL route.
Ok, it is not documented or supported, but
it builds on top of ATL and ATL is both documented
and supported.
There are documentation and samples for WTL on the
net, and you dont really need that much documentation
of WTL since it is a thin wrapper around Win32 windowing.
And what support do you need, you have the source.
I have switched from MFC to WTL, and with MFC there
was *always* wierd things going on behind the scenes,
with WLT everything works lika a clock.
/
- Don't sweat the petty things, and don't pet the sweaty things.
|
|
|
|
|
Yep, all the MFC majicks can be annoying. You mentioned there is documentation and samples for WTL on the net. Do you happen to have a few links outside of CP or CodeGuru?
Just wondering, I'm sure the more professional programs of MS aren't written with MFC. (IExplorer, Word, Powerpoint) Do those program use a framework?
Everything you say will be misquoted, ripped out of context and used against you.
|
|
|
|
|
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)
|
|
|
|