|
Hi All,
I am writing CD/DVD writing software in VC++ MFC. I want to know that can we create Video DVD like Video CD.If yes what will be the constraints regarding the hardware and software?
Thanks
Yudhisthira Attry
|
|
|
|
|
Is there an easy way to create a window with a specified client area size rather than window size?
I need my client area to be say 800x600, but specifying this to the CreateWindow api results in a client area of slightly less after subtracting the titlebar and borders. My current method is to use GetSystemMetrics() then calculate the size, is there an easier way?
|
|
|
|
|
AdjustWindowRect
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
That was exactly was I was looking for, thanks
|
|
|
|
|
Well I got this need to have a CListControl that should have a button in a given column ( Not all columns ). When this button is clicked I should catch the event and throw some actions, such as opening a dialog etc.
My question is how do I insert a CButton to a CListCtrl ?
I tried
CRect r; <br />
GetSubItemRect(r)<br />
and creating the button in this rect. But the problem is that the button doesnt get erased / painted nicely when the columns are resized. Please tell me how I could hav the Button resize / reposition when the List Control or its columns are resized. ... Or if there are any other easy ways to get the job done !
thanx a lot
-- modified at 3:26 Thursday 25th January, 2007
|
|
|
|
|
Have a look at this[^] article.
|
|
|
|
|
Here is I saw examples of listctrl of Chris Maunder and other programmers see Listctrl section on the MFC controls
|
|
|
|
|
how can i access a member function using a friend function?
|
|
|
|
|
Here's a complete example:
#include "stdafx.h"
#include <windows.h>
class CMyClass
{
private:
void Private() const;
friend void CallPrivate(const CMyClass &obj);
};
void CMyClass::Private() const
{
MessageBox(NULL, "CMyClass::Private", NULL, MB_OK);
}
void CallPrivate(const CMyClass &obj)
{
obj.Private();
}
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
CMyClass mc;
CallPrivate(mc);
return 0;
}
Steve
|
|
|
|
|
And also you can see www.cplusplus.com
|
|
|
|
|
Actually TRACE prints a string to the debug console. Most often, VS is our debug console, so we can see the messages right in the IDE. how can i get it in a file. i have to store the string in a file. can you help me
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Don't start a new thread every time you have a question about the same topic.
Since you are new, I will answer this time, but be warned, people will start ignoring you if you spam the boards.
TRACE is a debug macro, it only works when you have defined DEBUG and will not work in a release build. It is used so you can output strings to the debugger during the execution of your code without the need to set breakpoints.
deeps_cute wrote: how can i get it in a file
You cannot do this with TRACE. You instead need a logger, which similar to TRACE will write a string to a file. But these loggers are 3rd party tools. There are a few on Copeproject which you mightt like to try
http://www.codeproject.com/debug/amlog.asp[^]
http://www.codeproject.com/debug/MyTrace.asp[^]
http://www.codeproject.com/debug/logtrace.asp[^]
|
|
|
|
|
i used the TRACE method to display the error message in debug console.where can i see the error message in TRACE. michael said we can see the message in ide. how can i get that message. i cant see the message in window. can anyone explain this
-- modified at 1:01 Thursday 25th January, 2007
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Would you mind continuing previous thread, instead of starting new one ?
|
|
|
|
|
what is the usage of TRACE in vc++. i want to know in detail. please explain
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Its used for debugging pupose. You can use this macro to dump values to out put window while debugging.
|
|
|
|
|
It prints a string to the debug console. Most often, VS is your debug console, so you can see the messages right in the IDE.
|
|
|
|
|
in my appication i have two child window which are fix at their points
following is the map.
1)main parent window
1.1 child window one contain list view control alone.window at point x,y(126,83)
1.2 child window two contain the combo for selecting file/folder .window at point 126,256 exact
below of above window
problem in detail.
when i click on the 1.2 window's combobox the file dialog open and the selected file or folder goes/display in the listview of first child window control .
my code is ready for adding the file folder in list.But how can i get the handle of first child windows list view control so i can add files and folder in that control.
Thanks
Amit
|
|
|
|
|
Main parent window should iterate over child windows of window 1.1 and send the handle of window 1.2 list view to window 1.2 after window 1.1 and window 1.2 is created.
Or create both widnows, parent window tell window 1.2 about window 1.1 handle, and window 1.2 can fetch list view child window handle from window 1.1
|
|
|
|
|
Hello ,
Can you demonstrate things which you explained how can I send/access the list view dialog control's handle to the other child?
if possible please let me give the sample code ,
so i can understand.
Basically i have take the global window handles for listview,(i thinks its not solution but tried it)
for that i got the link error.
like.
Error 76 error LNK2005: "struct HWND__ * hWndListview" (?hWndListview@@3PAUHWND__@@A) already defined in DRMClient.obj Package.obj
Error 77 error LNK2005: "struct HWND__ * hWndListview" (?hWndListview@@3PAUHWND__@@A) already defined in DRMClient.obj stdafx.obj
Error 78 fatal error LNK1169: one or more multiply defined symbols found D:\Projects\Debug\DRMClient.exe 1
Amit
|
|
|
|
|
Parent window creates window with list view in it.
PArent window can obtain widnow handle of this first child widnow.
You know control identifier of ListView, so you can get its widnow handle with a GetDlgItem() function call.
Now create the second child window.
Assign through a member function the handle of the list view control, or else pass in the handle of the first child window, and within the second child window use the GetDlgItem() function call to get window handle of list view control.
|
|
|
|
|
You can use of
CMain *m_Main=(CMain*)GetParent();m_Main->YourControl;
|
|
|
|
|
I have the following code which is suppose to get the PredictFailure member from the MSStorageDriver_FailurePredictStatus class. This code SEEMS to work, but only ever returns one value when I have two drives.
I've tested the pEnumObject itterating by changing using other class types, (for example getting the Model attribute from Win32_DiskDrive - this loops and returns two drive names)
Can anyone offer why I don't get back two failure status codes?
Thanks,
Mark
HRESULT hRes;
BSTR strQuery = (L"Select * from MSStorageDriver_FailurePredictStatus");
BSTR strQL = (L"WQL");
hRes = pWbemServices->ExecQuery(strQL, strQuery,WBEM_FLAG_RETURN_IMMEDIATELY,NULL,&pEnumObject);
if(hRes != S_OK)
{
MessageBox("Could not execute Query");
return;
}
ULONG uCount = 1, uReturned;
IWbemClassObject * pClassObject = NULL;
hRes = pEnumObject->Reset();
if(hRes != S_OK)
{
MessageBox("Could not Enumerate");
return;
}
while (pEnumObject)
{
hRes = pEnumObject->Next(WBEM_INFINITE,uCount, &pClassObject, &uReturned);
if (0 == uReturned)
break;
if(hRes != S_OK)
{
MessageBox("Could not Enumerate");
return;
}
VARIANT v;
BSTR strClassProp = SysAllocString(L"PredictFailure");
hRes = pClassObject->Get(strClassProp, 0, &v, 0, 0);
if(hRes != S_OK)
{
MessageBox("Could not Get Value");
//return;
}
SysFreeString(strClassProp);
_bstr_t bstrPath = &v; //Just to convert BSTR to ANSI
char* strPath=(char*)bstrPath;
if (SUCCEEDED(hRes))
MessageBox(strPath);
else
MessageBox("Error in getting object");
VariantClear( &v );
}
pIWbemLocator->Release();
pWbemServices->Release();
pEnumObject->Release();
pClassObject->Release();
CoUninitialize();
|
|
|
|
|
a reall newbie question. i have a text file called "Lab1.txt". I want to open the file and display the text. when i compile code with ofstream i get some hex numbering in my cout.
[code]
#include <iostream>
#include <fstream>
using namespace std;
int main ()
{
ofstream myStringErrors( "Lab1.txt" ); // Default is ios::out
cout<
|
|
|
|
|
Hi,
Its a wrong way!
you can use 'cin'(getting strings) or 'get'(getting characters) or 'getline'(get a whole line) funcs to get some text, and then 'cout' them. there is more options for these funcs (see MSDN).
|
|
|
|