|
hey,
does anyone know a way to disable the combination
of 'Alt + F4' on a different window given that i
have it's handle without using it's windowProc.
I have tried to use 'RemoveMenu' api function
to remove the close sysmenu but the 'Alt + F4'
still works.
thanks
|
|
|
|
|
hey,
I just wanted to add something to my question:
I also tried to set it's window style to the
exact window style of a form which i've created
in VB with no controlBox, and in that form the
combination 'Alt + F4' did not work. however,
setting the other window to the same window style
did not work.
How can that be?!?!
|
|
|
|
|
try adding an accelerator Alt + VK_F4 and set it to command id 0 or something
- Roman -
|
|
|
|
|
Alt+F4 will send a WM_CLOSE message to your application. You may consider handling that message.
Best regards,
Alexandru Savescu
|
|
|
|
|
Hey guys,
I got a question abotu variable passing again.
In my OnNewDocument function call, I store the filename into a CString called FileName. Then I call an UpdateAllViews.
In my OnUpdate I use this:
CDisplayDIBDoc* pDoc = (CDisplayDIBDoc*)GetDocument();
if (pDoc)
{
m_Dib.Load((LPCTSTR)pDoc->m_Filename);
InvalidateRect( NULL, TRUE );
UpdateWindow();
}
This takes the FileName and passes it in the load function so I can load my DIB.
All this said, I want to pass the same string to my new Child Window so that it's OnPaint will also load and then draw the same Image.
What I need to do is pass FileName from the Doc class to the ChildWindow class. I tried using the above code in the new ChildWindow class, but I get an error.
It says that GetDocument()is an undeclared identifier.
My question is:
How do I pass this string to the appropriate class?
Do I need a getDocument function for the ChildWIndow class? It is a CMDIChildWnd class. I look in Class Wizard and there is no GetDocument for me to "add Function". There is also no OnUpdate. SO should I create my own GetDocment or OnUpdate functions?
Thanks a lot,
Sorry for the ong winded question
NickOne
|
|
|
|
|
Doesn't GetActiveDocument work?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I don't suppose I could trouble you to show me an example of how I could use that?
Thanks,
NickOne
|
|
|
|
|
Never mind! I was being lazy, but I found good documentation. You were right, like always.
Now I'm rolling again!
Thanks so much!
NickOne
|
|
|
|
|
Boy I feel dumb today. I know I have seen an article on here that tells me how to keep a dialog as the top window, but I can't seem to find it through the search engin or my manual search. If someone could be so kind and point me to a good arctile I would be very grateful.
Here's to bad days.
***********************
Tony Fontenot
Recreational Solutions
tony@recsolutions.com
***********************
|
|
|
|
|
Check this...
::SetWindowPos(hwndDlg, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
... or, if you're MFC type, this:
dlg.SetWindowPos(&CWnd::wndTopMost, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
you da man!!
Thank you much, that did it, now I have to do some positioning and I should be good.
Thanks again.
***********************
Tony Fontenot
Recreational Solutions
tony@recsolutions.com
***********************
|
|
|
|
|
::SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
Jeremy Falcon
Imputek
<nobr>"..." - Paul Watson 07-17
|
|
|
|
|
Its looking like the strlen of a char* variable populating a richeditctrl via SetWindowText is 2047 (yes I fine tuned it to exact). Any larger and it wont compile - string too big. I need to have the user enter his stuff directly without having to manipulate it by code (in case strcpy and strcat work - wil try next), so any views on this limit?
Thanks,
ns
|
|
|
|
|
|
Actually thats where I started. I have a callback and StreamIn function but theres never any output in the RTBox. I have some sample code that I can post if you would be interested in looking at it.
Thanks,
ns
|
|
|
|
|
Hey all,
This is probably the wrong place to ask, but...
Anyone know of a (really simple) application/library that can take a series of 3D coordinates (1 set of coords for each second, for example) and render it as an animated point in 3D space?
I need this to test the output of my app, which uses fancy photogrammetry to derive an object's 3D position based on it's position in 2+ camera's image-plane.
I need something that is as simple/quick to set up as possible, cos I can't really afford to spend loads of time learning OpenGL/Direct3D, etc.
Any pointers?
TIA,
Pete
|
|
|
|
|
|
You could write out a VRML file and use a free VRML viewer.
Todd Smith
|
|
|
|
|
There is one called Scenelib that is pretty easy to use and is based on OpenGL. I can't remember where it is right now but it should be easy to find with your search engine of choice.
The Ten Commandments For C Programmers
|
|
|
|
|
I'm cofused,and need help.I'm programming in MFC.What I want to know is how to use 'm_pSet->Insert()' to add a new row.I just had a try.But it doesn't work.Nothing is added but a row has been modified.Would you like help me with problem?Thank you.
|
|
|
|
|
Hi all !!
I am developing an instant messaging server which will also connect to databases. I am a newbie as far a data access in VC++ is concerned.
Now i want to connect it to database server (client/server model). Please suggest me the best data access technique considering the requirement of my application as follows:
My application is DOS based, 90% complete and written without the usage of MFC.
I want to access data from sql-server based machine running on my network. My target is to access data quickly and efficiently though accuracy can be compromised.
Programming ease is also a requirement.
|
|
|
|
|
bakhtawar wrote:
My target is to access data quickly and efficiently though accuracy can be compromised.
ummmmm u tend to get out exactly what u put in with these damn database things ... wish they could give us human storage devices huh?
"well i think the data you want is 3 but i could be wrong"
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away" sonork: 100.18128 8028finder.com
|
|
|
|
|
bakhtawar wrote:
My application is DOS based
DOS as in MSDOS app or DOS as in Console Application?
If it is a console application, look at some of the ADO articles available on this site.
Michael
Time flies like an arrow. Fruit flies like a banana
|
|
|
|
|
Hello!
I'm working on an application where a binary file must be loaded and should be kept in
memory during all execution. I guess that keeping data in physical memory and avoid memory swap on virtual memory is not possible.
Is it a way to keep the whole address space that concerns my application in physical
memory?
Thank you for any information !
Frédéric.
C++/MFC/SQL developer.
|
|
|
|
|
For NT-based systems, seems like <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/kmarch/hh/kmarch/k106_8ble.asp">MmProbeAndLockPages<a> is the API you're after. For 95 and relatives, have a look at LinPageLock in the DDK documentation.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|