|
Hello, the codegurus around the world.
I doubt a little about your approach.
Even though we put on the creation of SDI on CWinApp::InitInstance(),
CMyDialog object already gets the address of m_pMainWnd.
At run time, we can't change the main object (Dialog or SDI) to m_pMainWnd.
Or, you're talking about another approach?
I mean, there are several approaches to satisfy with the requirement.
So, I am simply curious about your idea.
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
I'm not sure what you think I meant, but I am talking about starting a new SDI application, and moving the dialog based code into it. On reflection, I'd start the dialog in CMainFrame, not in CMyApp, but the core of the idea is that the app is SDI, but the user does not see the SDI window until it is needed, instead they see the dialog boxes. I don't see any other way to get the Doc/View architecture working for one part of a dialog based app. An SDI app can easily lauch dialog boxes, but I don't know of a mechanism for a dialog app to lauch SDI windows, and dialog boxes most certainly cannot have a Windows toolbar.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
mmmm I'm gonna prove what u say, the problem it's the data that must be shared between SDI and Dialog. Well I've got to probe it and I'll tell u. Thanks, anyway I'll really apreciate if u have information on that
|
|
|
|
|
newbie question created a dialog program but as you get deeper into the prog you end up with a lot of old dialog boxes in the background. the question is can i/how do you get rid of them i am using msvisual c++ 6.0
thanks for the help
don lamica
fubarsmut@aol.com
|
|
|
|
|
mydialog.DestroyWindow
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Hello, the codegurus around the world.
In fact, I don't understand the question very well, but.
1) Model dialog - use EndDialog() or call CDialog::OnOK() or OnCancel().
2) Modeless dialog - use DestoryWindow().
Humm. If you want to destroy the dialog called by the other application,
you need CWnd of this dialog........?
Have a nice day!
-Masaaki Onishi-
|
|
|
|
|
It is very easy to enumerate all open windows in order to get the CWnd of an open window.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
I've posted this problem to the board yesterday, but I still don't know the solution.
Now I have a TouchScreen. When my finger touches the screen, a message will come out. I have to write a MFC program to access this message. For example, when the user touches the screen suddenly, the program will pop up a message box.
How can my MFC program checks this message and do the action suddenly and immediately?
|
|
|
|
|
> Now I have a TouchScreen. When my finger touches the screen, a message will come out.
Most Touch-Screens that I know of have drivers that make them simulate mouse movements with finger traces and clicks with finger taps.
> I have to write a MFC program to access this message. For example, when the user
> touches the screen suddenly, the program will pop up a message box. How can my
> MFC program checks this message and do the action suddenly and immediately?
If your Touch-Screen works as above, them your app can just lie in wait of a mouse message, and react to it. If not, what kind of drivers do you have for the Touch-Screen? A mouse-like driver? A driver that gives you grid/coord. information?
Peace!
-=- James.
|
|
|
|
|
Yeah.....I know I can make it as a "virtual" mouse message, but I don't want to do it in this way because there is indeed a "touchscreen" message. This message will give me coord. and touch or untouch or error touch message......
Thanks for your help.
|
|
|
|
|
If there IS a touchscreen message, you can catch it in PreTranslateMessage and deal with it accordingly.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
richard
i've gone over all the replies you've had for this issue and short of writing the code for you i don't see how you can get any more help from here ... please don't take this as a 'go away' type thing but read the answers you have been posted and you will see all the info you need to solve the problem i think
otherwise please state clearly what is wrong and what bits you don't understand so we can help to get this thing sorted
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
The reason you're having trouble getting an answer is because you aren't giving us enough information to actually help you.
Chances are, nobody here has used this product your using, or knows it's API. Since we don't know how the thing works, we don't know how to help you.
|
|
|
|
|
Hi all,
In a CListCtrl, is that the user can only select the ITEM ? Can the subitem in other column be selected individually too( only select the subitem )?? If can't, what should I use other than CListCtrl if I want to select cells horizontally ?
Please help! Thanks!
Vickie
|
|
|
|
|
u could either look around for an enhanced version of the clistctrl that allows individual cells to be selected / edited or you could (as i said before) use a grid control (there's a very cool one here on codeproject)
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
> Hi all, In a CListCtrl, is that the user can only select the ITEM
Yep.
> Can the subitem in other column be selected individually too( only select the subitem )??
Not normally, no. (At least, not that *I* know of.)
> If can't, what should I use other than CListCtrl if I want to select cells horizontally ?
There are various Grid and Grid-like controls out there that may give you this functionality. On a previous Brokerage-related project, I needed this same functionality. I ended up using the Custom Draw features of the ListView control to simulate it.
Using Custom Draw, you can highlight a specific column in the control. If you have some other way to keep track of the current "column selection", you can simulate column selection/highlighting.
Peace!
-=- James.
|
|
|
|
|
Does anyone know what these error messages mean? and how to fix this bug?
error LNK2001: unresolved external symbol "unsigned short __cdecl ABC_EventLk(unsigned long,unsigned long)" (?ABC_EventLk@@YAGKK@Z)
error LNK2001: unresolved external symbol "unsigned long hABC_Wnd" (?hABC_Wnd@@3KA)
fatal error LNK1120: 2 unresolved externals
************************************************************************************
I copy all related *.h and *.c files to my program's directory and add to my project list. However, still get the same messages
|
|
|
|
|
is ABC_EventLk your function? where does it come from?
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
My program is written by MFC programming. I want to use some old function from a file. This file was written by C language and it includes several *.h files....also.......
|
|
|
|
|
Are these functions also included in your project ? If you did the first half of what I suggested ( make sure all the files are included ) then most probably the function in question is in a lib, and you've #included the headers, or you wouldn't compile, but VC doesn't know where the .lib file you need is. I suspect this is what lauren is also trying to figure out from your post.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Your problem is that you're including C header files in a C++ program.
C++ "mangles" the names of functions in order to support overloading and better type checking, and as long as the code is compiled by the C++ compiler, the compiler knows this and deals with it.
Your code is C code though, and does not include this mangling, thus the linker doesn't know how to deal with it.
If you can change the .h files yourself, then include this code at the very top of it:
#ifdef __cplusplus
extern "C" {
#endif
and this code at the very end of it:
#ifdef __cplusplus
} // extern "C"
#endif
This tells the compiler to treat everything within the curly brackets as C code rather than C++.
If you can't modify the header files (or don't think you should) then anywhere you #include the .h file put:
extern "C" {
#include "file.h";
}
|
|
|
|
|
Bonjour again!
i've got another important question: how can i set a property in ADS to be empty? i tried it with an empty string, but it doesn't work.
benedikt
|
|
|
|
|
bonjour!
i've got the following problem: i'm connected to an ADsUser Interface and try to read the adresses. but the HRESULT of the property is always E_ADS_PROPERTY_NOT_FOUND. on the win2k server the adress properties are set, but except the PostalCodes i can't read them. what's wrong?
thnx
|
|
|
|
|
derHackler,
This is correct. Properties vary in availabilty based on the provider you are using.
For example:
The WinNT:// provider gets you the user in active directory and allows you to set properties on the user such as first name, last name and etc. But if you try to set the email address you will get E_ADS_PROPERTY_NOT_FOUND. This is because the email address is not available through the winnt provider. You will need to get the user from the LDAP:// provider to be able to set the email.
Also, Make sure you are also using the correct attribute name as the provider is expecting.
http://msdn.microsoft.com/library/psdk/adsi/ds2pldap_3703.htm
Both providers use the ADsUser interface but provide different attribute features. Examine the AD Schema to determine which attributes are available from WinNT provider and LDAP provider for a User object.
http://msdn.microsoft.com/library/psdk/adsi/ds2pnt4_59wz.htm
http://msdn.microsoft.com/library/psdk/adsi/ds2pnt4_49mb.htm
Regards,
-Erik Thompson
|
|
|
|
|
thanks for your answer. but the PostalAddresses property is supported on both providers (i use LDAP). you also get the E_ADS_PROPERTY_NOT_FOUND error when you try to get a value from a property which has no value yet. but i set the addresses value and so i don't know what's wrong.
|
|
|
|