|
I can send code upon request as the code to generate and show the 2 windows is larger than it is appropriate to post to this forum.
Sean Cody (NullStream)
"Today is what ever I want it to mean."
- Beth Orton
|
|
|
|
|
You might have a look at using SetWindowPos to see if that can make a difference - though you might have tried that already.
What OS are you using? I have noticed different behavior in this area re w9x and NT/w2k.
|
|
|
|
|
Windows XP and Visual Studio 6 SP5.
Ok. I think my problem is coming due to a misunderstanding of how things are supposed to work.
For any Win32 program you create a main window.
You have to programmatically add any controls you want to this window.
I was/is trying to create the main window yet fill it's contents with a dialog I made in the resource editor. Is this even possible?
Then I would create another window in the same fashion and it doesn't show.... ugh.
one day i'll see it.... but i don't think it will be today.
Sean Cody (NullStream)
"Today is what ever I want it to mean."
- Beth Orton
|
|
|
|
|
Well... how bout using CreateDialog? ed. (er, for the main window I mean)
Mind, I do think its possible to do what you are trying to do, just checking.
|
|
|
|
|
I just saw that myself.
Basically I have 2 windows. Window #1 is a configuration window which accepts parameters for how Window #2 will work. Window #2 is just going to be a clean window which will have a DirectDraw surface on which I can paint via the options in Window #1. Now when Window #1 launches Window #2 I want it to go away as Window #2 will become the main window. When Window #2 closes the application closes.
Is that too confusing?
Sean Cody (NullStream)
"Today is what ever I want it to mean."
- Beth Orton
|
|
|
|
|
I'd make the DD window (#2) the main one - possibly with just the WS_POPUP style set.
At launch, show the config dialog first - DoModal would be easiest - then all you need to do is make sure it obscures the main one completely. If you want to ShowWindow(SW_HIDE) hide the main one, might have to make it a modeless dialog.
You might even be able to get away with a create dialog in WinMain, or a well posted message to the main wind before WinMain exits (caught before the DD wind gets a chance to paint itself), but I'd have to experiment with that.
|
|
|
|
|
Oops - as usual, just saw the flaws in that previous reply...
DoModal is the MFC for DialogBox, and I was wrong to use the phrase 'before WinMain exits' - what I meant was before WinMain fires up the main message pump.
DialogBox will execute its own message pump, so I think you can call it from WinMain - you will probably want to have a separate dialog proc for it though.
|
|
|
|
|
Hello!
I need to do RESUME for FTP file download using WinInet.
I am doing:
FtpCommand(FtpCon, // WinInet Connection handle
false,
FTP_TRANSFER_TYPE_BINARY,
_T("REST 111000"),
0,
NULL);
FtpCommand(FtpCon, // WinInet Connection handle
true,
FTP_TRANSFER_TYPE_BINARY,
_T("RETR test.txt"),
0,
&pFTPFile);
InternetReadFile(pFTPFile, ....);
But InternetReadFile reads the file from the very first byte. What I
am doing wrong?
Oleg Chebotar
Oleg Chebotar
|
|
|
|
|
The server needs to support streaming restart. If it doesn't, it will perhaps default to sending the whole thing (not sure what the RFC says on this). It might also support block restart, but there probably aren't 111000 blocks in file (er, just a guess).
Do you know for sure the server supports restart?
|
|
|
|
|
Yes server support restart command.
What should be the block size? I set block size in the InternetReadFile command to 2048.
|
|
|
|
|
there're so many strange file types in writting vc programs,like .tlb,.lib and .inl,etc.what's the function of them?And what's the relation between .lib,.tlb and .dll?
God blessing me...
|
|
|
|
|
A tlb is a type libray, it allows another project to create a COM pobject through smart pointers, etc. A lib is the compiled code for a block of code, which the linker can use. A dll is a compiled block of code, which may be a COM object, and which other programs can use at runtime.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
there're so many strange file types in writting vc programs,like .tlb,.lib and .inl,etc.what's the function of them?And what's the relation between .lib,.tlb and .dll?
God blessing me...
|
|
|
|
|
By an astonishing coincidence a guy named Al_carno has asked this very same question in a nearby post.
Nish
Oh, I don't know why she's
leaving, or where she's gonna go
I guess she's got her reasons but I just don't wanna know
'Cos for 24 years I've been living next door to Alice
24 years just waitin' for a chance
To tell her how I feel and maybe get a second glance
Now I gotta get used to not living next door to Alice
|
|
|
|
|
I've installed the full Platform SDK. Made sure that VC knows where all of the new includes are. I'm running VC6. I've made sure that service pack 5 is installed. And I still get SetLayeredWindowAttributes() as undefined. As well as WS_EX_LAYERED and all the other "cool" win2000 functions (yes I'm running 2000). Where is all this stuff? I've looked in Windows.h and winuser.h where msdn.microsoft.com say they are defined. But they are not there. Ok... so who stole my functions ?
any help would be appreciated?
nay
|
|
|
|
|
You need to make sure the PSDK is the first in the list of include and library paths, so it looks there first.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
Thanks Christian I did that. But it still doesn't work.
nay
|
|
|
|
|
Then I dunno. Do a search within files for the text of the command, see if it's in the SDK.
Christian
The tragedy of cyberspace - that so much can travel so far, and yet mean so little.
"I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?!
- Jon Hulatt, 22/3/2002
|
|
|
|
|
#define _WIN32_WINNT 0x0500
That has to be defined before #include <windows.h>
There's no mention of that in the msdn. I found it after hours of scouring the newsgroups.
nay
|
|
|
|
|
I'm trying to figure out how to store a word, when a user types it in.
|
|
|
|
|
Where do you want to store it?
Where are you getting it from? An edit box, the console ...
|
|
|
|
|
Kilo
Were you logged in? My posts are comin anonymous.
Nish
Oh, I don't know why she's
leaving, or where she's gonna go
I guess she's got her reasons but I just don't wanna know
'Cos for 24 years I've been living next door to Alice
24 years just waitin' for a chance
To tell her how I feel and maybe get a second glance
Now I gotta get used to not living next door to Alice
|
|
|
|
|
Yeah I am logged in, I do not know what is going on.
|
|
|
|
|
kilowatt wrote:
I do not know what is going on.
That makes two of us.
Nish
Oh, I don't know why she's
leaving, or where she's gonna go
I guess she's got her reasons but I just don't wanna know
'Cos for 24 years I've been living next door to Alice
24 years just waitin' for a chance
To tell her how I feel and maybe get a second glance
Now I gotta get used to not living next door to Alice
|
|
|
|
|
I think Chris disables the icons whenever he does maintenance to that part of the forum's code. The same thing happened for a few hours before the last update to the user icons.
David Wulff
http://www.davidwulff.co.uk (updated)
I could have created a cool signature brought to life with complex interactive DHTML, but I don't like to show off.
|
|
|
|