|
I think the values in the WINDOWPLACEMENT structure are opaque, in that they don't relate to "real" coordinates. We have the same requirement for one of our apps, and what we do is call GetWindowPlacement when closing the app, save all the values in the structure, and on startup, recreate the WINDOWPLACEMENT structure, and call SetWindowPlacement .
|
|
|
|
|
Hi Graham,
Thanks a lot for replying. I think that you are correct about the values of the WINDOWPLACEMENT structure not being "real".
My trouble is that the way in which we store window information, i cant currently store the WINDOWPLACEMENT structure and then restore it using that. We only store the starting point (x,y) and dimensions (cx,cy), and also whether it is maximised or not. Unfortunately i am limited to this and so i really need the actual restored point and dimensions.
Im sure that there must be a way to get this information, as the window is correctly restored by the SDK and so it must be able to work out the window's original placement info (even if it uses the WINDOWPLACEMENT structure to determine the "real" dimensions).
Thanks again for your suggestion, much appreciated.
Any further suggestions or help on the problem would be greatly appreciated.
Thanks,
James
|
|
|
|
|
OK then, my other suggestion would be to handle the WM_SIZE message in the top-level window, and keep track of size information there. One of the parameters of the WM_SIZE message says what kind of sizing has happened, so you could store both the state and normal size in response to this message, and then use those values instead.
|
|
|
|
|
Hi Graham,
Thank you for your second suggestion.
I have just figured out my problem. I was calling GetWindowPlacement() for the each bar/window in the mainframe to get their placement information, but it was always returning the maximised dimensions. I then attempted to call GetWindowPlacement() for the window's parent FRAME instead, which actually gave me the correct dimensions. I didnt realise that this would make a difference but obviously it seems to. It makes sense i guess.
Anyway, thanks very much for your assistance! Much appreciated.
Regards,
James
|
|
|
|
|
Hi
Is any way I could get notified when a HID device is conected/disconnected to the USB port? So I shouldn't be checking each 3 seconds if my device is connected?
Thanks
|
|
|
|
|
|
Hi,
I am placing a bitmap on a button using LoadBitMap and SetBitMap.
The problem is that when I draw the bitmap, I want the background to be transparent so it will appear nice on the button.
From some reason, the "Draw Opaque" is checked by default in VisualStudio on the "Image" menu and I can't change it.
How do I use a transparent background on a bit map I am drawing.
Shay
|
|
|
|
|
Hi,
my name is marco and i am working for Project Zero.
Project zero has taken over the Development of Soldner Secretwars.
I can`t tell much here, but from jan. we get a budget for it.
Jowood finally came true.
I am the lead coder, wich is great.
The bad side is that i have to code the new mod in c/c++ by myself.
Is there a tool that MAPS globals in a DEEP NESTED class archy?
example:
struct SOLDIER{} * t_SOLDIER;
class a,public b,public c
{
a() :c:var_a(0) {this=t_SOLDIER;}
};
Not exactly correct but who cares, i see this mess every day.
What i want is a tool to map all vars,globals,classes,structs.
Becouse i need to create a overview of +-2500 code files.
If you wanna help...... send me a email.
You will run away after a week
And u need math!
direct-x math!
i need 2 bring orde into this chaos.
Any sugestions about tools are verryverryverryverryverryverryverry apreciated.
Bye and thanx.!
Marco project zero lead c/c++ coder. check out www.secretwars.net
|
|
|
|
|
|
Hi,
you could try this, there is a trial version availabele.
http://www.scitools.com/ucpp.html[^]
Good luck
BTW: yikes, I always thought game writing was just pure fun
codito ergo sum
|
|
|
|
|
oversight-[project-zero] wrote: Any sugestions about tools are verryverryverryverryverryverryverry apreciated.
what about http://www.rationalrose.com/[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Did you try Visual C++ ??
oversight-[project-zero] wrote: If you wanna help...... send me a email.
definitely not
TOXCCT >>> GEII power [toxcct][VisualCalc 2.20][VisualCalc 3.0]
|
|
|
|
|
yes,
i use visual c/c++.net2005 (coded a build booster to speed it up).
The whole project is build with make_master.bat wich calls various makefiles.
I can also load it in dev studio and build but this is slow...
it takes 20 minits on my amd64 1gb ram to build soldner.
the c/c++ code calls python,xml (mixed.....)
Its real spagetti code....
And we have lots of fun!
i wish i had some more c/c++ college`s
anyone voluteering?
|
|
|
|
|
Only 20 minutes? You are lucky. Our product takes 2 HOURS to build. And that is on damn fast machines (2.8 Ghz or faster).
1179 CPP files
628 C files
2175 H files
186 DSW (Project) files
No shirt, no shoes, no brains, no service.
|
|
|
|
|
i wrote a build booster, coz as usual Micro$oft doesn`t tae in account that i use a 1Ghz++ pc.
Its just verry simple: create 2 structs:
process_info and startup_info
void RunProgram(char * path,char * appname="tryme.bat")
{... u know how it works...
}
Set thread priority to what u think is safe
And call a Make_master.bat or Make_label.bat so each process that gets called from those bats... will run at high priority.
its a lame way to boost compiling speeds.... But hey i am a friend of simple solutions
|
|
|
|
|
Can anyone tell me whether CopyFile APIs of win32, calls NtCreateFile native API for its internal implementation or not? and if yes, how can both of these calls can be related to each other, i mean looking at NtCreateFile and CopyFile API's it it possible to identify which NtCreateFile is called due to CopyFile?
Regards
Abhinav
HCL Technologies, Noida(India)
|
|
|
|
|
I would assume that CopyFileW would call CopyFileExW which would call CreateFileW which would call NtCreateFile. CopyFile/CreateFile etc are Win32 User APIs (kernel32.dll), while the NtCreateFile would be a lower level system API (ntdll.dll).
|
|
|
|
|
I have successfully implemented sending a fax into our software but I'm having a problem retrieving the status. When I submit a fax (FaxStartPrintJob), I get back a job number. The first number was 1, and it's always going up by 1 each time I send. Seems fine. If I call GetFaxJob though for any of those IDs, I get an invalid parameter error. If I go into the fax console and look at the properties on a fax, it displays JobID's like 0x0201c5fa84b842a6 which are way to big for a DWORD. Here's the code in case I did something wrong. Are the job id's in the fax console right or should they be 1,2,3... like the ones I got when submitting the fax?
HANDLE hFaxServer;<br />
PFAX_JOB_ENTRY pFJE;<br />
<br />
if (!FaxConnectFaxServer("", &hFaxServer))<br />
{<br />
writeOutputString("MSFax - Unable To Connect To Server\n");<br />
return;<br />
}<br />
<br />
if (FaxGetJob(hFaxServer, nJobID, &pFJE))<br />
{<br />
}
Thanks,
Sean Capstick
|
|
|
|
|
Why don't you try calling FaxEnumJobs and compare the information in the queue with those you already submitted. Maybe you cna see how the jobs get numbered.
No shirt, no shoes, no brains, no service.
|
|
|
|
|
Hi
Is there a way to detect when windows receives a new ip-address from a DNS, or even better, hook the actual call to the DNS?
I've gone through windows hooks and messages, but without any luck.
tia
/Niklas
|
|
|
|
|
|
Is this for a normal app or a service.
Services can specify: SERVICE_ACCEPT_NETBINDCHANGE, SERVICE_ACCEPT_HARDWAREPROFILECHANGE.
This allows them to receive: SERVICE_CONTROL_NETBINDADD, SERVICE_CONTROL_NETBINDREMOVE, SERVICE_CONTROL_NETBINDENABLE, SERVICE_CONTROL_NETBINDDISABLE, SERVICE_CONTROL_HARDWAREPROFILECHANGE.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hello guys,
I have next strange situation :
I have built my project in "Release" mode . Before I was building it in "Debug" mode always , next thing happens : When I move the mouse over some buttons the default(arrow) cursor dissapears and then when mouse leaves the buttons client area it appears again.
I am using Owner Drawn buttons and the thing that mourns me is that this does not happen in "Debug" mode.
Has anybody experienced similar problem ? What can be causing this ?
The problem is also that I can not find the common thing between the buttons to which this happens in order to find out what the problem is.
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
hi guys
Do you know any soft. that can search this board for previous messages. Searching this board right from desktop without IE will be a nice idea.;)
|
|
|
|
|
What's wrong with this? It works well for me.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|