|
|
i'll try it and see what happens...although isn't wininet an MFC class?
When I created my project I never bothered to add socket support, but I added a class which uses sockets. However it does not use MFC sockets, but rather generic raw sockets (???)
Thanks
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
Got it...appears to be the ws2_32.lib
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
|
I am sure I can find full documentation on the file format of Word documents, but I am lazy and only wish to count the characters in a document that are visible to the reader. A 1:1 ratio is not expected between char's and bytes in the file.
Anyways after quickly looking at a word document I noticed that visible characters appear to be clumped togather shortly after a lengthly header and are followed by what I imagine are the character switches.
I figured Word would use an RTF approach to formatting text in that each character would be preceeded by a set of switches (bold, italic, size, etc) but it doesn't appear this is the case. Which is awesome, because I only need a character count and if I could find the position where the text begins all I would have to do is extract all the text and count the bytes.
So can anyone tell me if i'm on the right track or does a Word doc sometimes use a different approach...?
I'm working with Word 2001/XP files BTW...
Thanks
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
I think word keeps track of the words, letters, sentences in a header somewhere.
You get to see this info when you rt click /properties on a word docment file.
Hope that is helpfull in someway.
P.R.A.K.A.S.H
|
|
|
|
|
You can do this by "Automating Microsoft Word "
Office applications expose their content and functionality to Automation clients.
check msdn for samples
greatest thing is to do wot others think you cant suhredayan@omniquad.com
|
|
|
|
|
I figured so much, but what I really wanted was the offset of those details inside the header.
I am actually reading a word doc using PHP so automation won't work
Thanks again
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
It looks like a minimal win32 api app uses 25K or so of clib code.
I'm writing a dumb little utility app.
It needs NO file i/o or sprintf or malloc or dbcs stuph.
ALL i need is basic c++ stuff including
new, delete, classes and exceptions.
Has anyone any tips?
I've tried this:
<br />
#include <windows.h><br />
<br />
int WinMainCRTStartup (void)<br />
{ STARTUPINFO StartupInfo;<br />
StartupInfo.dwFlags = 0;<br />
GetStartupInfo (& StartupInfo);<br />
return WinMain (GetModuleHandleA(NULL), NULL, (char *)GetCommandLineA (),<br />
StartupInfo.dwFlags & STARTF_USESHOWWINDOW<br />
? StartupInfo.wShowWindow : SW_SHOWDEFAULT);<br />
}
But the linker says i need:
(xx.obj : error LNK2001: unresolved external symbol BLAH)
"const type_info::`vftable'" (??_7type_info@@6B@)<br />
_sprintf<br />
_memmove<br />
_strchr<br />
"void __cdecl operator delete(void *)" (??3@YAXPAX@Z)<br />
"void * __cdecl operator new(unsigned int)" (??2@YAPAXI@Z)<br />
lp.exe : fatal error LNK1120: 6 unresolved externals
Now, i can replace sprintf, _memmove and _strchr myself.
And I guess I can do new/delete with HeapAlloc, eh?
But whatta I do about that type_info::`vftable' biz ???
Is that some kinda RTTI stuff?
Any ideers anybody?
Thanks
...Steve
|
|
|
|
|
Steve Hazel wrote:
But whatta I do about that type_info::`vftable' biz ???
Is that some kinda RTTI stuff?
yeah looks like it.
P.R.A.K.A.S.H
|
|
|
|
|
Do you know if i can do c++ exceptions w/out clib?
I can make my own new/delete and other clib funcs that i use.
But not sure bout doin exceptions w/out clib.
Thanks
...Steve
|
|
|
|
|
We have an app that uses __cdecl prefix throughout, however it calls LoadLibrary(...) and tries to make a function call to a function with the __stdcall prefix which causes it to bomb, aside from swithing the calling convention, is there any way around this? Thanks in advance. BTW, I have already read Calling Conventions Demystified[^].
- Nick Parker My Blog
|
|
|
|
|
Declare that function with the __stdcall prefix, in your application.
greatest thing is to do wot others think you cant suhredayan@omniquad.com
|
|
|
|
|
Sup? I wanna make a MDI program using WIN32 only (I don't wanna mess with MFC (yuck, to VB for me)). I know you use like WM_MDICREATE and/or CreateMDIWindow() but I've tryed it and it won't work. I can't find any WIN32 MDI tutorials or code online. If you could give me a link to some code, or something that would help me out alot, Thanks.
Kruncher, www.KruncherInc.com <- some cool OpenSource programs there.
|
|
|
|
|
If you don't want to use MFC why not use some other framework such as WTL or Qt? It's got to be less painful than straight Win 32.
Kevin
|
|
|
|
|
Nah, I've thought about using something like that but I wan't to learn not cheat. Yes I know its not "cheating" but it really doesn't teach me anything except how to use frameworks.
Kruncher, www.KruncherInc.com <- some cool OpenSource programs there.
|
|
|
|
|
I've never done straight Win 32 programming (though I recently had to adapt a program that did and turn it into a DLL). But it's my opinion that you still learn enough from frameworks such as MFC. It has been described as just a "thin" wrapper around the Win 32 API and in fact (perhaps for this reason) is not considered especially good OO! MFC is not just the same as doing GUI work in VB. It requires you to do a lot more.
But if you still prefer straight Win 32 then Charles Petzold's Programmming Windows is the Bible. http://www.charlespetzold.com/pw5/[^]
Kevin
|
|
|
|
|
How to post from VC++ application information to the WEB-form ?
or how to automatically access data, that required logging process , using descktop application ?
thank you !
|
|
|
|
|
|
Needs to compile some .cpp files from a running program.
Somebody got any suggestions how to do this ?
|
|
|
|
|
Just CreateProcess() for the cl.exe
|
|
|
|
|
i have a small launcher program showing icons from shortcuts. most of the shortcuts are fine, but i have a couple where i cannot load the icons with SHGetFileInfo .
one is a shortcut to my DUN connection, and the other is a shortcut to display properties in control pannel.
i think i need to do something with IExtractIcon . however, i am now TOTALLY out of my depth i have the impression that i cannot simply create an instance of IExtractIcon , but i dont know what to do instead.
can anyone provide some pointers on what i need to know? examples seem to be rather thin on the ground.
|
|
|
|
|
I have a program with the following defined in a header file that is included in many files. I need the var to be global so I have this in the header file:
Global.h
typedef struct _D2N_GLBL_STRUCT
{
long runways_line_pos;
...
}D2N_GLBL_STRUCT;
extern D2N_GLBL_STRUCT *D2N_GLBL;
.cpp
D2N_GLBL->runway... = -1;
I get linker errors saying it is undefined or already defined in files that I've include the global.h file.
What am I doing wrong?
Thanks for any help
|
|
|
|
|
You need to include global variables in one source file without the "extern" keyword.
One way to do this is:
#ifndef INIT_MY_GLOBAL
extern
#endif
D2N_GLBL_STRUCT *D2N_GLBL;
then in your main .cpp file use:
#define INIT_MY_GLOBAL
#include <global.h>
Having said all that globals are a realy bad idea.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
In the global.h you have
extern D2N_GLBL_STRUCT *D2N_GLBL;
Did you put
D2N_GLBL_STRUCT *D2N_GLBL; in one of the .cpp file?? if you dont do it, it will give you linker error.
P.R.A.K.A.S.H
|
|
|
|