|
kcynic wrote: It use MPEG-4 standard video files.
If you know the format of such, just read them like you would any other file.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
But,I do not know the format.
There is no information about that in my hands.
Thank you very much.
|
|
|
|
|
kcynic wrote: But,I do not know the format.
There is no information about that in my hands.
Try here and here.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I have created a custom control which, upon a mouse click, should display a dialog showing some info about what was clicked.
I need this dialog to have a semi-modal style. IE I want the user to be able to click the custom control and have the dialog update it's display, but not allow the user to click outside of the control unless the dialog is first closed.
How could I achieve this?
Waldermort
|
|
|
|
|
If you are creating the window modeless using Create and disabling all the controls except the special controls, I think it is possible... Or could you please explain a little more?
- NS -
|
|
|
|
|
Disabling controls of the parent window from within a child window is a little too complicated. I had an idea though, since my control displays a dialog on a mouse click, this means it must have the keyboard focus. I could display a modeless dialog and destroy it whenever a WM_KILLFOCUS is processed.
Waldermort
|
|
|
|
|
That's nice. But what if the user clicks in another application and again come to yours?
- NS -
|
|
|
|
|
Then they would have to click in my custom control again.
I could do a comparison of the new window against the main application and it's children, but the first method is easiest to implement at this stage. We will see how it pans out.
Waldermort
|
|
|
|
|
Well today I finaly get around to adding the code for the dialog and was hit with something quite unexpected.
Setting the parent member of CreateDialogParam() to my custom control, gives me exactly what I wanted. The main window is effectivly unclickable, while the control, dialog and all other applications remain unaffected.
Finally, MS got something right.
Waldermort
|
|
|
|
|
i am doing a programm such that, i have created a text file through CFile and i am writing some text in it through "Write" function of CFile, i want to add a new line character after every line but getting some different result when i check the text file after writting the data. My code and result i am getting is as follows,
CFile oFile;
if(!oFile.Open("test.txt",CFile::modeCreate | CFile::modeNoTruncate | CFile::modeWrite))
{
AfxMessageBox("Sorry! text file can't be created");
}
else
{
for(int i=0;i<3;i++)
{
oFile.Write("code project",sizeof("code project"));
oFile.Write("\n",1);
}
}
Results=
code project || code project || code project ||
can anybody help me plz, how to do it?
Thanks & Regards,
Anay Kulkarni
|
|
|
|
|
|
Well, that will print exactly this in the file: "\n".
|
|
|
|
|
Use oFile.Write("\r\n",2); (or "\n\r", I don't remember exactly).
|
|
|
|
|
|
Check this line
oFile.Write(_T("code project\n"),sizeof(_T("code project\n")));
|
|
|
|
|
Does it have any difference from the actual code?
- NS -
|
|
|
|
|
I checked this line it works.
|
|
|
|
|
But what is the magic between
oFile.Write(_T("code project\n"),sizeof(_T("code project\n")));
and
oFile.Write("code project",sizeof("code project"));
oFile.Write("\n",1);
- NS -
|
|
|
|
|
Well can you check it and then tell me what did you see?;)
|
|
|
|
|
Use:
oFile.Write("code project", strlen("code project")); or
CStdioFile oFile;
...
oFile.WriteString("code project\n");
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
am using Hot key in one of my appliation.But there is a problem.
The Hot key combination works only when the focus is on that window . while my application is runing in the background( Its a Win32 dialog based application and i make dialog hidden at startup)and so the Hot key is not working. Is there any way I can solve this.
I am using something like this now,
LRESULT CALLBACK MyDialogProc(HWND hWndDlg,....)
{
ShowWindow(hWndDlg,SW_HIDE);
switch(message)
{
case WM_INITDIALOG:
{
InitCommonControls();
HWND hHotKey = GetDlgItem(hWndDlg,IDC_HOTKEY1);
if(!RegisterHotKey(hWndDlg , IDC_HOTKEY1, MOD_ALT | MOD_CONTROL,0x67))
{
dError = GetLastError();
MessageBox(NULL,L"Hot Key Not Working ",L"Error",0);
}
}
break;
case WM_HOTKEY:
ChangeString(hWndDlg);
break;
}
}
Thnx in advance.....
|
|
|
|
|
GauranG33 wrote: HWND hHotKey = GetDlgItem(hWndDlg,IDC_HOTKEY1);
if(!RegisterHotKey(hWndDlg , IDC_HOTKEY1, MOD_ALT | MOD_CONTROL,0x67))
From MSDN:
BOOL RegisterHotKey( HWND hWnd, int id, UINT fsModifiers, UINT vk);
id
[in] Specifies the identifier of the hot key.
but from your code, it seems the ID of a control window.
And where are you using hHotKey ?
|
|
|
|
|
Yes, IDC_HOTKEY1 is the cotrol ID of the Hotkey control which I have dragged from the ToolBox on my dialog box.
I am using Win32 Dialog Based Application. In that I have put the Hotkey Control and then I am using the previous code. The problem is that hotkey is working only when the focus is on dialog box. If the Focus is on other window.Hot Key combinations are not working.
I want to call some function when the combination of some key are pressed.And so I am using HotKey for that.
|
|
|
|
|
how to retreive the height an dwidth of an HBITMAP ?
void GetBitmapResolution( HBITMAP hBmpIn , int *BmpCx , int *BmpCy )
{
// plz tell me hwo to solve this function
}
thanks & regards
|
|
|
|
|
I almost looked this up for you, but I could not bring myself to do it. Any Windows help system will provide the answer, and several articles at CP.
Shortcut: look up my name and examine the code, I am sure the solution is in there some where.
Sorry, in a bad mood tonight.
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|