|
Now that I think of it, my values were zero, but I expected them to be zero. I'll have to set my values to be some non-zero value and see what happens. If they remain zero, then it's likely pointing to a new and separate instance of CDoc that was just created.... hmmm...
JennyP
|
|
|
|
|
I found that I have the exact same problem. I'm going to cludge around it by passing the other class's pointer to CDoc and doing it in reversed. It's worked for me before.
If you find a solution, I'd be VERY interested! Thanks!
JennyP
|
|
|
|
|
Actually, I found that my pDoc (attained as shown in previous messages above) DOES WORK.
I had another problem with my pDoc->Function that returned 0s.
Anyway,..... works for me.... maybe you should double check your document values? I saw the values were good in the debugger and simply was being returned incorrectly from a function.
Good luck.
JennyP
|
|
|
|
|
it's alright i found my mistake : a problem of where i declared the pDocument !
so now this part of code works fine, and i get access to the real values, all good.
PgGPS::PgGPS() : CPropertyPage(PgGPS::IDD)<br />
{<br />
pDocument = NULL;<br />
pDocument = (CMtsBaseDoc*)((CMainFrame*)AfxGetApp()->m_pMainWnd)->GetActiveFrame()->GetActiveDocument();<br />
<br />
}
by doing so in the constructor pDocument, accessible anywhere within the class, allows you to access to all the variables and methods in C..Doc.
Fred
|
|
|
|
|
I think your applcation is a base on MDI,so you must invoke GetActiveFrame.and mine is base on SDI,so....
|
|
|
|
|
How would I go about capturing the Maximize and Minimize buttons. Basically I have two modeless dialogs, when one is minimized I want to hide the other, and when it gets restored I want to show the other dialog.
Any Suggestions?
Thanks in advance.
***********************
Tony Fontenot
Recreational Solutions
tony@recsolutions.com
***********************
|
|
|
|
|
Handle WM_SYSCOMMAND .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
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
|
|
|
|