Refering to the Edit control im hacking out, I figure its time to start saving data to disk..
My initial plan is to pass a user defined message to the control "NEM_SAVE" with a file handle (hFILE == CreateFile() ). The control would then use this handle to save the data to disk.
My question is this: The edit control is considered a separate window from the parent (obviously); will the file handle (hFILE) be still valid if used in a separate window in this fashion???
I think i can do this, but perhaps there is some 'big ol' error' im overlooking ~~ So i thought i would ask first before i code up a bunch of stuff and realize the error then ;)
Thanx!
:NaN:
My initial plan is to pass a user defined message to the control "NEM_SAVE" with a file handle (hFILE == CreateFile() ). The control would then use this handle to save the data to disk.
My question is this: The edit control is considered a separate window from the parent (obviously); will the file handle (hFILE) be still valid if used in a separate window in this fashion???
I think i can do this, but perhaps there is some 'big ol' error' im overlooking ~~ So i thought i would ask first before i code up a bunch of stuff and realize the error then ;)
Thanx!
:NaN:
Platform SDK says....
Kernel Objects
Kernel object handles are process specific. That is, a process must either create the object or open an existing object to obtain a kernel object handle. The per-process limit on kernel handles is 2^30.
.....
The following table lists each of the kernel objects.........
Access token
Change notification
Communications device
Console input
Console screen buffer
Desktop
Event
Event log
File
File mapping
Find file
Heap
Job
Mailslot
Module
Mutex
Pipe
Process
Semaphore
Socket
Thread
Timer
Update resource
Window station
Thomas
Kernel Objects
Kernel object handles are process specific. That is, a process must either create the object or open an existing object to obtain a kernel object handle. The per-process limit on kernel handles is 2^30.
.....
The following table lists each of the kernel objects.........
Access token
Change notification
Communications device
Console input
Console screen buffer
Desktop
Event
Event log
File
File mapping
Find file
Heap
Job
Mailslot
Module
Mutex
Pipe
Process
Semaphore
Socket
Thread
Timer
Update resource
Window station
Thomas
And the process is best defined by hInstance right?
So any child windows are considered under this process, since they are create with hInstance in their params...
Thus, i can do this, right?
:NaN:
So any child windows are considered under this process, since they are create with hInstance in their params...
Thus, i can do this, right?
:NaN:
Yes you can, child windows are part of the process, even child *processes* can use the handles if you create them with the inherit flag to true.
Thomas
Thomas
Thanx for the quick advice Thomas :alright: