|
m1m2 wrote: Serizlize() don't want to save my file
What do you mean ? What goes wrong ? Have you gone through debugging ?
m1m2 wrote: OnSaveDocument("OneClock.one");
OT: I am not used to writing MDI/SDI Apps, so this is maybe wrong, but calling an event handler function seems weird to me.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
Find it
when i browse for a file
it change curren directory and save file in another plase
|
|
|
|
|
m1m2 wrote: i have one button(browse) when click on it, it call CFileDialog.DoModal().
When user chose a file, the dialog thake the name and call to save it to another file
Why? When the document saves its data, you will be presented with a Save As dialog where you can select the file to save to. It sounds as though you are reinventing the wheel.
m1m2 wrote: OnSaveDocument("OneClock.one");
This function is called by the framework as part of the File Save or File Save As command. It is not called directly.
m1m2 wrote: MyFileSaveFunction(), Serizlize() don't want to save my file
The Serialize() method is used simply to get the data to/from the document from a CArchive object. It has no knowledge of files or where the data comes from. That's the document's job.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
If you have a pair 2D matrices like:
a b w x
[ ] * [ ]
c d y z Then you can multiple them by:
aw+by ax+bz
[ ] cw+dy cx+dz
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
The Matrix and Quaternion FAQ[^]
_________________________
Asu no koto o ieba, tenjo de nezumi ga warau.
Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)
|
|
|
|
|
I am running my MFC application on which if i open a message box and keep the focus on it (means the caption bar of the messagebox is clicked) till a dialog alert comes, the whole operating system is getting hanged till that dialog alert times out. Can anyone suggest me the solution or can point out the reason behind this?
|
|
|
|
|
You have an endless loop somewhere in your app
|
|
|
|
|
show a relevant piece of code...
|
|
|
|
|
As i have clicked on the caption bar of the messagebox at the time the dialog alert is appearing, the focus is set on the messagebox itself and i am not able to take any action on the dialog alert box. This dialog alert is called using DoModal() and messagebox is also modal.please suggest something
|
|
|
|
|
As i have clicked on the caption bar of the messagebox at the time the dialog alert is appearing, the focus is set on the messagebox itself and i am not able to take any action on the dialog alert box. This dialog alert is called using DoModal() and messagebox is also modal.please suggest something
|
|
|
|
|
chakor123 wrote: messagebox is also modal
That is the point. If you do not want your messagebox to capture the focus, you'll have to fire up a non modal custom messagebox. Search for it on CP, there are plenty of them.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
or maybe change the system modality to application modality...
|
|
|
|
|
Seems like I misread the "whole system hangs" with the "whole app hangs". System-wide Message Box, shotgun, where are you ?
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
you can make your control
|
|
|
|
|
Hi all,
I'm trying to use the function NetValidateName() ....
I have include lm.h and Netapi32.lib, but I keep getiing the error:
error C2065: 'NetValidateName' : undeclared identifier
Any advice??
Thanx
Regards
Programm3r
|
|
|
|
|
Just include: #include Lmjoin.h
-- modified at 5:42 Tuesday 29th August, 2006
Regards
Programm3r
|
|
|
|
|
Programm3r wrote: Just include: #include Lmjoin.h
Not necessary if lm.h has already been included.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
I wrote a code on directx9 to draw and fill a square using ID3DXLine which looked like that:
(I should add that this code is inject/hooked into a game).
<br />
ID3DXLine *pLine;<br />
<br />
void fillrgba(int x, int y, int w, int h, int r, int g, int b, int a)<br />
{<br />
D3DXVECTOR2 vLine[2];<br />
<br />
pLine->SetWidth( w );<br />
pLine->SetAntialias( false );<br />
pLine->SetGLLines( true );<br />
<br />
vLine[0].x = x + w/2;<br />
vLine[0].y = y;<br />
vLine[1].x = x + w/2;<br />
vLine[1].y = y + h;<br />
<br />
pLine->Begin( );<br />
pLine->Draw( vLine, 2, D3DCOLOR_RGBA( r, g, b, a ) );<br />
pLine->End( );<br />
}<br />
But now I have to make it work under DirectX8! And there exist no ID3DXLine, so I tried something like this
<br />
float PanelWidth = 150.0f;<br />
float PanelHeight = 200.0f;<br />
<br />
pDevice->CreateVertexBuffer(4 * sizeof(PANELVERTEX), D3DUSAGE_WRITEONLY,<br />
D3DFVF_PANELVERTEX, D3DPOOL_MANAGED, &g_pVertices);<br />
<br />
PANELVERTEX* pVertices = NULL;<br />
g_pVertices->Lock(0, 4 * sizeof(PANELVERTEX), (BYTE**)&pVertices, 0);<br />
<br />
pVertices[0].color = pVertices[1].color = pVertices[2].color = pVertices[3].color = 0xffffffff;<br />
<br />
pVertices[0].x = pVertices[3].x = -PanelWidth / 2.0f;<br />
pVertices[1].x = pVertices[2].x = PanelWidth / 2.0f;<br />
<br />
pVertices[0].y = pVertices[1].y = PanelHeight / 2.0f;<br />
pVertices[2].y = pVertices[3].y = -PanelHeight / 2.0f;<br />
<br />
pVertices[0].z = pVertices[1].z = pVertices[2].z = pVertices[3].z = 1.0f;<br />
<br />
pVertices[1].u = pVertices[2].u = 1.0f;<br />
pVertices[0].u = pVertices[3].u = 0.0f;<br />
<br />
pVertices[0].v = pVertices[1].v = 0.0f;<br />
pVertices[2].v = pVertices[3].v = 1.0f;<br />
<br />
g_pVertices->Unlock();<br />
<br />
pDevice->SetVertexShader(D3DFVF_PANELVERTEX);<br />
pDevice->SetStreamSource(0, g_pVertices, sizeof(PANELVERTEX));<br />
pDevice->DrawPrimitive(D3DPT_TRIANGLESTRIP, 0, 2);<br />
<br />
When I use the above code it messess the game up, is there any similar thing like ID3DXLine in DX8 ? I would rather avoid using vertexes, just make it as easy as possible without the BeginScene()/Endscene() and so on, just like ID3DXLine did.
Regards,
Pawel
-- modified at 4:42 Tuesday 29th August, 2006
|
|
|
|
|
Hello all,
I don't know how to implement "edit contour", is there anyone can give me some instructions? I've upload a short "avi video" in my yahoo briefcase, the file is 1.35M. What I want is just descripted in the video. Thx. The following is the video link:
http://us.f13.yahoofs.com/bc/44f3f092_f15a/bc/My+Documents/Movie_0001.wmv?bfWw_8EBgYCBDtLs
|
|
|
|
|
Can you actually describe the problem yourself? Expecting people to watch some random video which could contain anything, isn't the best way to get help (the URL wouldn't load for me)
I have no idea what "edit contour" means - some more context would be helpful. What exactly is a contour, how do you want to edit it?
|
|
|
|
|
Hello @
I heard this query from one of my friend. I wonder how we can do this. Any ideas welcome. Here is the question:
'Lets say I have 2 apps. One is a third party app and another is my app. Lets assume both the third party and my app has a button. Now if I click the button in my app, the third party app's button must be clicked. The constraint is that I cannot modify the third party app and it does not provide any interface to me. The implementation details of the TP app is hidden. My app is implemented in VC++/MFC. How can we achieve this?'
cheers
Jam
|
|
|
|
|
|
...and then what...?
exporting some code in a DLL instead of doing it in the exe don't tell how to do trick...
|
|
|
|
|
It was just a suggestion...
Regards
Programm3r
|
|
|
|