|
Yes, I did exactly that. I've tested some sources available here at CodeProject, but all samples have this 10 seconds delay so it seems it isn't my code whats going wrong...
I've solved the problem using the URLDownloadToCacheFile API. Yes, I've written that I don't want to use this function, but do I have another choice?
URLDownloadToCacheFile works perfectly. The file gets downloaded in milliseconds (as it is viewed in the browser), there is no 10 seconds delay.
Though, thanks for your reply
Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
(doesn't work on NT)
|
|
|
|
|
Has anyone got a sample of a windows service application which interacts with the internet? I need to submit database information to a web based application.
Any documents and/or url's will be most welcome.......
thanks
bart
|
|
|
|
|
I have a Window which creates dinamically some OCX. I have to use the WS_CLIPCHILDREN in order to reduce the flickering, but at same time I would like to force the repainting of the background of some of them.
I tried to add the rectangle to paint calling InvalidateRect() for all the OCX I want to repaint their background but it doesn't work.
What can I do?
Thanks in advance
|
|
|
|
|
Hi, I want to write a wrapper to a function, which has a "..." argument declaration. For example:
void foo(const char* format, ...)
{
printf(format, ??????)// what do I write here?
}
Any ideas? Thanks.
/=/=/=/=
Deus
/=/=/=/=
|
|
|
|
|
You would include stdarg.h and use vprintf to do something like this:
<br />
void foo(const char* format, ...)<br />
{<br />
va_list args;<br />
va_start(args, format);<br />
vprintf(format, args);<br />
va_end(args);<br />
}<br />
|
|
|
|
|
Hi, I am just starting to learn C(++) and therefore the following might be a silly question to you. But maybe your explanations will help me to understand some principles of C++:
As far as I know pointers are declared like char *xyz (with the * bound to the beginning of the variable name). But in the C++/MFC-Help, pointers are mostly declared as CWnd* xyz (the * is following the type/class name).
What is the difference?
Thx a lot
Christian Planckh
|
|
|
|
|
There is no difference. It's just a matter of style. You can put as little or as much whitespace as you want. The following would all be OK:
<br />
char*xyz;<br />
char *xyz;<br />
char* xyz;<br />
char * xyz;<br />
|
|
|
|
|
I have a Dialog app that creates a PropertySheet .
While performing
propertySheet.Create()
I had allowed the windows Style to be -1 as default. In my main Dialog I have a routine where I call a Method of one of the pages in the PropertySheet that does
a CFileDialog.DoModal(). With the above mentioned window style of -1 for the PropertySheet all works fine .
I changed the style of the PrpertySheet in the Create func to be
WS_VISIBLE | WS_CHILD and the call to the CfIleDialog.DoModal() doesnt end (I never see the FileDialog displayed ) . What is going on ? Any clues . Please help
Engineering is the effort !
|
|
|
|
|
Hello all
I wrote a windows service and installed it. I was able to start and stop the service from Control Panel - Administrative tools - Services. But whenever I try it from command line using the following
net start ServiceName
it's failing. The above command say's service started but the service is shown as stopped when I see it in Admnistrative tools - services. Even the task manager is not showing the service in the process list.
Any ideas?
Many thanks for your help,
Hari.
|
|
|
|
|
I'm developing a single document MFC application.
I'd like to know how I can center a CFromView into the client area of th main window.
I've tried CenterWindow method but it doesn't work.
Can someone help me?
Bye and thank you,
Wollet
|
|
|
|
|
Hi all,
I am trying to build my own C++ framework around the win32 API. The purpose of doing this is to learn how things work behind the (sometimes) mysterious scenes of MFC.
My question is the following:
When painting a dialog in VC, you can specify that a control has the WS_TABSTOP style. If you do that, you can also specify the taborder in which the focus will traverse when using the TAB key. In my framework, controls are also created using WS_TABSTOP.
Firstly, in my framework, it seems the tab key has absolutely no effect whatsoever. Is the taborder functionality programmed in MFC somewhere? I couldn't find it, but maybe I am not looking close enough.
Secondly, how can I specify the order in which the focus will traverse? It seems not related to the ID value of the control.
Thirdly, if someone is interested in the code I am using related to answering this question, let me know.
Best regards, Perry
|
|
|
|
|
All these functions are exported from Shlwapi.dll (7/24/2002) as (ASCII: StrRetToBufA, UNICODE: StrRetToBufW etc)
If not included in your version of Shlwapi.h you could consider checking in the latest W32 SDK (note that the standard MSDevStudio files are usually quite out of date).
Quick solution might be to add its declaration yourself in your code.
You would need of course to make sure that the right version of Shlwapi.dll is installed on the target system
|
|
|
|
|
Perry Bruins wrote:
it seems the tab key has absolutely no effect whatsoever.
You need to call IsDialogMessage() in your message loop for the standard keyboard navigation to work.
Perry Bruins wrote:
Secondly, how can I specify the order in which the focus will traverse?
Tab order is the same as the Z-order of the controls. Use SetWindowPos() to change the Z-order.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
Hi all
how I make my own Agent Character storage(.acs file) in VC++. can u tell me the format of (.acs file).
Thanks
|
|
|
|
|
In the following code which is a selfdeleting code on NT i cant seem to understand why the call CloseHandle((HANDLE)4); is there?
what is this 4 value that is casted to a HANDLE?
<br />
#include <windows.h><br />
<br />
int main(int argc, char *argv[])<br />
{<br />
char buf[MAX_PATH];<br />
HMODULE module;<br />
<br />
module = GetModuleHandle(0);<br />
GetModuleFileName(module, buf, MAX_PATH);<br />
CloseHandle((HANDLE)4);<br />
<br />
__asm <br />
{<br />
lea eax, buf<br />
push 0<br />
push 0<br />
push eax<br />
push ExitProcess<br />
push module<br />
push DeleteFile<br />
push UnmapViewOfFile<br />
ret<br />
}<br />
<br />
return 0;<br />
}<br />
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
|
I can't be the only one that thinks this can't be true, or you'd never be able to create more than one active file mapping for a given process?
Steve S
|
|
|
|
|
Yeah, I must not have interpreted it correctly. I don't really understand it, so I won't even try to interpret again. Anyone else?
|
|
|
|
|
Having read the thread, I think the answer is simpler. There's a qualifying comment that says mapping the file for the current EXE always returns 4.
I suspect that this is 'true' because the EXE is already mapped to address 00400000, and it's just something happening to obfuscate the value returned, or there's some shifting/misreading going on.
In other words, the code is committing suicide in a fancy way by unmapping itself from memory while it's executing. The CPU pipeline cache may then probably prevent a page fault while it terminates.
Steve S
|
|
|
|
|
Or for any other orelse they will overlap, right?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hi There!!
I'm gettin' mad with these debug errors:
game.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw4
Debug/game.exe : fatal error LNK1120: 1 unresolved externals
And note that I added the ddraw.lib in the 'Link' section, installed DirectX 9 SDK(and is at the top of the 'directories'list) and included ddraw.h in the source code... but the compilers is still gettin' these cursed errors!!!
What can I do?!?!?
|
|
|
|
|
Try linking with "dxguid.lib" ... should fix that error :> and btw, DirectDraw has version 7 and isnt going any further then that, just as a smal note :>
|
|
|
|
|
i need to write a C++ program to access the system environment variables..can someone help me out in this regard!
ranjani
|
|
|
|
|
|
or
int main(int argc, char* argv[], char* envp[])
u can loop on envp till its null
or
GetEnvironmentVariable
SetEnvironmentVariable
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|