|
Anyone have any idea where the DLGTEMPLATEEX struct is defined??
It's explained and defined in MSDN, but I can't seem to use it in my source, as it isn't defined in any headers that I've included.
It seems to be defined in some of the ATL includes, but as a "local struct used for implementation" (ATLCTL.H).
Now I know that it is used, because if I load a DialogEx into memory and examine it, it's structure conforms to DLGTEMPLATEEX.
Any ideas, short of defining the struct myself where I need it?
TIA,
Pete
|
|
|
|
|
DLGTEMPLATEEX
typedef struct {
WORD dlgVer;
WORD signature;
DWORD helpID;
DWORD exStyle;
DWORD style;
WORD cDlgItems;
short x;
short y;
short cx;
short cy;
sz_Or_Ord menu;
sz_Or_Ord windowClass;
WCHAR title[titleLen];
// The following members exist only if the style member is
// set to DS_SETFONT or DS_SHELLFONT.
WORD pointsize;
WORD weight;
BYTE italic;
BYTE charset;
WCHAR typeface[stringLen];
} DLGTEMPLATEEX;
Happy programming!!
|
|
|
|
|
Thanks Wolfram, but I actually already had the structure, I just need to know where it's defined, so I don't have to typedef it myself.
|
|
|
|
|
I found it in the ATL include, atlhost.h, for class _DialogSplitHelper. Again, it appears to be local. HTHs.
|
|
|
|
|
I'd like to use LockFile() to lock a full file, is this possible?
MSDN doesn't mention how to do this.
Please help
|
|
|
|
|
Can you not specify 0 as the starting offset, and the file length as the length to lock?
CPUA 0x5041
Sonork 100.11743 Chicken Little
"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies
Within you lies the power for good - Use it!
|
|
|
|
|
What happens if the file size is increasing because I append data to the file? Sometimes I want to lock a file and make sure nobody else can modiy or append data to it.
|
|
|
|
|
According to MSDN, it is not an error to set the locking range past the end of the file, but I am not sure if that would lock anything you append. To be safe, I think you should re-call LockFile() after you append data, specifying the new file length.
This is just a guess, I have never done this myself
CPUA 0x5041
Sonork 100.11743 Chicken Little
"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies
Within you lies the power for good - Use it!
|
|
|
|
|
PJ Arends wrote:
According to MSDN, it is not an error to set the locking range past the end of the file
thx, I need to do some testing.
|
|
|
|
|
Anonymous wrote:
Sometimes I want to lock a file and make sure nobody else can modiy or append data to it.
Can't you just open file using CreateFile and FILE_SHARE_READ flag?
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
Tomasz Sowinski wrote:
Can't you just open file using CreateFile and FILE_SHARE_READ flag?
that's not portable. on the other hand, file locking mechanism do exist on various platforms (open file, lock file, do something, close file).
|
|
|
|
|
Anonymous wrote:
that's not portable.
So on these 'various platforms', when you open file, other processes can also open the same file and write at the same time?
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
Tomasz Sowinski wrote:
So on these 'various platforms', when you open file, other processes can also open the same file and write at the same time?
that's why you lock files. e.g. you gain the exclusive right to modiy data in a file ata specific time.
|
|
|
|
|
I want to write an app that will answer incoming calls and listen for the tones of the caller pressing buttons and do different tasks. Playing a "Press 1 for..." message would be nice also.
My question is where to start. Are there classes/libraries out there that would give me a good base? If anyone has done this or knows where I can start please let me know.
Thanks,
Jack
To an optimist the glass is half full.
To a pessimist the glass is half empty.
To a programmer the glass is twice as big as it needs to be.
|
|
|
|
|
Look at TAPI functions, for example lineGatherDigits .
As my daughter would say, "... Whatever!"
|
|
|
|
|
Hey all,
I have an ActiveX control, that was developed using ATL.
Now, I would like to add Active Document containment capabilities to that control, to allow it to host MSHTML.
I've been looking for information in MSDN, but found only little of it - and nothing about ATL - only about MFC.
So -
1. Does ATL have some support for that technology?
2. How difficult would it be to write the required interfaces WITHOUT a tool such as ATL/MFC?
3. Can you refer me to some good examples?
Thanks in advance!
|
|
|
|
|
Hi all,
Anyone know how I would go about embedding a dialog (DVCR) into another dialog (DNewDialog)?
What I want to do is treat it like a CWnd, and use CWnd::Create() in DNewDialog::InitDialog() to add it to the dialog.
I figure I should start by creating an inherited class (DEmbeddedVCR) that inherits from DVCR.
But calling DEmbeddedVCR::Create() always creates a standard dialog, e.g. one you can move around and that has a title bar.
I've tried DEmbeddedVCR::ModifyStyle() with various arguments, but have been unable to make it behave.
Am I going about this totally the wrong way?
TIA,
Pete
|
|
|
|
|
Change the style of the embedded in the resource editor to "Child". Then, create it as a modeless dialog.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
you could also add a custom control "item" to the dialog and set its window class to the dialog window class #32768 or one of those # thingies
- Roman -
|
|
|
|
|
Did you mean setting the Class property of the custom control to IDD_VCR (where IDD_VCR is the id of the dialog I want to embed)?
I tried that and whenever I call DoModal on the dialog (the dialog I added the custom control to) it returns instantly, before it reaches InitDialog().
|
|
|
|
|
no, the class should be the constant for all dialog boxes... "#32770" that is the exact value... the only problem is that i dont know how to associate a CDialog with the custom control
- Roman -
|
|
|
|
|
I can't do that, coz I also want to use the dialog as a standard dialog.
I need two types of dialog derived from the same resource, one a regular dialog, one a child
|
|
|
|
|
see http://www.codeproject.com/property/saprefs.asp for a working example of embedding one dialog in another.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
I think that SAPrefs works by using 'sub dialogs' which are declared as type Child. The problem is that I can't set the resource as a child, because I also need a dialog that works as a regular dialog, based on the same resource.
I need a way to programmatically set the dialog as a child or popup and CWnd::ModifyStyle() doesn't seem to work
|
|
|
|
|
are you sure you are removing the proper styles from the dialog when you are using modifystyle to add the child style. You have to remove the options that make it a popup window that contain the title bar and such.
Joseph Dempsey
jdempsey@cox.rr.com
Joseph.Dempsey@thermobio.com
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."
--anonymous
|
|
|
|