|
I have a VC++ Dialog App and
1. want the Dialog not be be moved . ie i want to disable moving the window !
2. If i make the main window movable how should I position the PropertySheet contained within .
Assuming I have code like this
void CCamProgrammerDlg::OnMove(int x, int y)
{
CDialog::OnMove(x, y);
if(propertySheetCreated){
CRect r ;
this->GetWindowRect(&r);
mainSheet.SetWindowPos(0,r.left,r.top+30,r.Width(),r.Height()-75,0);
}
What I am asking is
I hate to hardcode the offsets .
I want the PropertySheet right below the Title bar of the mainWindow even after the main window moves
____________________________________________________
|__Main Window Title Bar __________________________|
|__PropertySheet Title bar___________________________|
|_Tab1_|Tab2__| |
| |
| |
| PROPERTYSHEET + MAIN WND AREA |
| |
| |
| |
|____________________________________________________| | |
| |
| |
| |
| |
| MAIN WINDOW AREA |
| |
| |
| |
|____________________________________________________|
3. IS it possible to create a PropertySheet without a Title Bar but not as a Child !
Engineering is the effort !
|
|
|
|
|
I will answer 1.
Handle OnNcHitTest and tell the system the mouse click was on the client area when it is actual
hit on the caption. Here is the code
<br />
UINT CMyDlg::OnNcHitTest(CPoint point) <br />
{<br />
UINT ret = CDialog::OnNcHitTest(point);<br />
if(ret == HTCAPTION ) return HTCLIENT;<br />
else return ret;<br />
<br />
}<br />
|
|
|
|
|
I would like to export mfc derived classes such as CDialogs in a regular DLL statically linked to MFC) to a plain Win32 application. Or to rephrase this question, if I have an app that uses MFC, instead of dynamically linking to a MFC lib, can I dynamically link to a DLL, that is already statically linked to MFC?
Because of redist issues, I need to statically link to MFC. I presently have several apps, whose overlapping functionality I'd like to consolidate into a single DLL. I understand that there are Extension DLLs, but this doesn't help me because it seems to require dynamic linking to MFC for both DLL and app.
TIA
Francis
|
|
|
|
|
francona wrote:
instead of dynamically linking to a MFC lib, can I dynamically link to a DLL, that is already statically linked to MFC?
Its been a long time since I have touched MFC, but if I recall correctly, the answer is no.
|
|
|
|
|
Hello,
Is there a way to generate an ASP page from an ISAPI dll ?
I want to protect my ASP pages without having to develop in C++ all the stuff again.
Thanks.
|
|
|
|
|
I posted a question earlier asking how I can read all files in an user specified directory. Thanks for all the answers.
However, I'm wondering if it's possible to read or check the file type (eg. .txt, .doc, or a folder) as well?? Thanks for any help.
|
|
|
|
|
Well, a file's type and its extension are not necessarily indictive of the other. In other words, I can create a .DOC file with Word, and change the extension to .XYZ. Now what do I have?
You can determine if a given entity is a folder or not by looking at the attrib member of the _finddata_t structure mentioned earlier. You can also look at the dwFileAttributes member of the WIN32_FIND_DATA structure.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Yeah, that's true. The extension can be changed. So, I guess I will have to write a function to check that, assuming the file extensions are correct.
I am using the attrib member of the _finddata_t structure. It turns out that a folder is 16 whereas a .txt is 32 or 33.
Can you please tell me what those numbers represent?!
Thanks.
|
|
|
|
|
hkl wrote:
Can you please tell me what those numbers represent?!
Take a look at lines 92-97 of dos.h , and lines 140-145 of io.h .
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Thanks so much! I will take a look at that!
|
|
|
|
|
You could get string description of file's type using SHGetFileInfo() API function with SHGFI_TYPENAME flag.
|
|
|
|
|
hi
i'm using the ListView text callback and image callback (virtual style)
and i have a strange problem when processing the LVN_GETDISPINFO i give the control the data from lparam assosiated with the current item
but when i DC on an item the lParam is not there is there any solution for it
LEGENDARY
|
|
|
|
|
Modar wrote:
but when i DC on an item the lParam is not there
What does "DC on an item" mean?
Modar wrote:
is there any solution for it
Not without some code showing what you are trying to do.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Hi, i want to stop Internet acces in the PCs of a local
network (CyberCafe), i dont have any adea.
Can anyone give me a methode or tip to do this task.
My work is an MFC app.
Thank for advence
|
|
|
|
|
What kind of access do your pc's have?
1. If they are all directly connected then take off their connections.
2. if they are going through a proxy then you can disable the ip's that ypu don't want accessing the net on the proxy server
3. You can try using a firewall if you want to selectively disable access to particular sites.
Hope this helps.
"It was when I found out I could make mistakes that I knew I was on to something."
-Ornette Coleman
|
|
|
|
|
I'm doing some work in some old Win32 code, and I'm working with a dialog that has a tree control and a list control. When I receive a WM_NOTIFY telling me that the selection of the tree has changed, I repopulate the list control with the data that pertains to the selected item.
A problem I'm noticing is that when I repopulate my tree control (when an item is added/removed), I delete all the items and re-populate from scratch, when I call TabCtrl_DeleteAllItems, I'm getting X number of WM_NOTIFY messages telling me the selection has changed. It just makes for a mess on the UI, the list is going nuts... I've encapsulated my population code with LockWindowUpdate(), makes a bit of a difference.
What do you guys recommend? ... A kludgy way would be to have a flag to ignore the WM_NOITFY/SEL_CHANGE msgs when I'm adding/deleting items..
Thoughts?
Mike.
|
|
|
|
|
|
what is unicode subset?
I want to it's defination,thank u.
|
|
|
|
|
|
I have this little problem:
I have created a Installation disk to install a suite of applications along with installing MSDE (Single workstation so using MSDE for databsae). My problem is that I don't know how to import a stored procedure into my SQL database??
I have the stored proc in a txt file. Does anyone know how to import a stored procedure from a txt file through visual c++??
I am really struggling on this one.
Please could someone help me with this matter.
Will be eternally grateful.
|
|
|
|
|
I am creating a program with CFormView. I have added buttons to it. I would like to know how to implement an action when any of the button is clicked. Can I do it all in the LButtonDown function? or is there some other way.
|
|
|
|
|
Have you tried the Message Maps tab of the ClassWizard dialog?
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
Can anyone tell me if the latest SDK includes the header file rtflib.h?
It's just that I'm trying to use the Exchange SDK and it needs rtflib.h which isn't provided (despite the fact MSDN states that it contains a core function of the Exchange SDK). I also had difficulty finding ctl3d.h, perhaps because I'm using Visual Studio .NET.
"The folly of man is that he dreams of what he can never achieve rather than dream of what he can."
"If you think education is expensive, try ignorance."
|
|
|
|
|
Strange, as I have the rtflib.h file in my old SDK folder but not in the new one. I am using VS6.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|