|
ForNow wrote: 2) this is the first thing in CWinApp::InitInstance The first thing? Maybe you are not giving the framework enough time to get everything ready. Perhaps putting the code someplace else (e.g., in response to a button click) would work better.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
ForNow wrote: mydialog.DoModal(TRUE); This compiles?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
I created an empty dialog-based app with the following change:
BOOL CDCDlg::OnInitDialog()
{
CDialog::OnInitDialog();
SetIcon(m_hIcon, TRUE);
SetIcon(m_hIcon, FALSE);
CFileDialog dlg(TRUE);
dlg.DoModal();
return TRUE;
}
It worked fine. Can you try something similar?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Tried the coce
the CfileDialog modeless displays it for an instance
and then i get a messagebox HERC_CMD encountered breakpoint
|
|
|
|
|
ForNow wrote: Tried the coce Where did you put it?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
There's a known problem with CFileDialog crashing although I can't remember the exact situations. Something to do with WINVER, I think. Anyway, you can test if this is what your problem is by creating the dialog on the stack and seeing if that stops the crash.
e.g.
CFileDialog* pFD = new CFileDialog(...);
pFD->DoModal();
.
.
delete pFD;
|
|
|
|
|
AbbeytekMD wrote: There's a known problem with CFileDialog crashing It was actually related to trying to use a CFileDialog object, which references m_pMainWnd , in a dialog-based app after the main dialog had been dismissed.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
OK I did embark into world of DirectShow and ditched VFW.
All the code samples here is way over my head for now.
I got as far as “using SDK to build basic DirectShow”. It is in one of many SDK 's “help doc” MS puts out here and there about DirectShow. I am suppose to build basic DirectShow application and use it as accessible debug library. I must be dense, but I cannot figure how to do it.
I do not need full blown sample code, there are plenty of them here, but gentle nudge into right direction in building from SDK sample would be appreciated.
Thanks for your time.
Cheers Vaclav
|
|
|
|
|
Vaclav_Sal wrote: but gentle nudge into right direction in building from SDK sample would be appreciated. Create the sample project in Visual Studio and press the "Build solution" button. Without more information on what problems you are having it's difficult to suggest anything more.
Use the best guess
|
|
|
|
|
|
Two reasons for this update.
Soren, I did not delete my last post, I guess gremlins at work.
Second, I am making progress using DirectShow, however, I just got past enumerating video devices and still struggling with DirectShow overall concept.
I just love MS inventing all these therms with very terse explanations – graph, filter , bag, moniker etc.
Old fashioned flow chart would IMHO work much better than MS one pages samples which are not tied together.
The most confusing are the VMR options – windowless or with window?
And when you do search all you get is reference to Window7, back paddling to XP as I do is inevitable.
But eventually I'll get
Thanks for your help.
Cheers Vaclav
|
|
|
|
|
Hi,
I have Dialog in a Property Sheet. I have a picture control on that dialog box. I have a Bitmap which I want to use on that Picture control. I am using the below code for this part:
if(::IsWindow(m_CapScreen.m_hWnd ))
{
tempbmp.LoadBitmapW(IDB_BMP_VIDEO_SCREEN_BOX);
tempbmp.GetBitmap (&bm);
m_CapScreen.MoveWindow( rt.left + 51, rt.top + 25, m.bmWidth, bm.bmHeight, 1 );
tempbmp.DeleteObject();
}
where m_CapScreen in a variable declared for picture control.
When I change the position of the picture control, the Bitmap Image doesn't move with the picture control. It will remain at a fixed position.
The "Type" property of Picture control is set to "Frame".
Any help will be appreciated.
Regards,
Mbatra
|
|
|
|
|
I don't see the connection between the bitmap and the picture control in the above code. Does this paint the bitmap in the correct place to start with?
Use the best guess
|
|
|
|
|
Hi,
"m_CapScreen" is defined as,
DDX_Control(pDX, IDC_CAPSCREEN, m_CapScreen);
which is a picture control, it type property has beent set to "Frame". So it will act as a frame to the bitmap positioned on the dialog.
Or else plz give me any suggestion if we can stretch a bitmap.
Whenever I change the resolution of the PC, I want to change the size of the bitmap accordingly. I can change the position and size of the controls, but prob is with the Bitmaps, BMP size I can't change. So I was looking out any way for this.
Regards,
Mbatra
|
|
|
|
|
What MFC class is it and how are you adding the bitmap to it?
Use the best guess
|
|
|
|
|
I have 3 objects on the screen, I want to rotate onll 2 objects the axis and X,Y,Z. Another line is there which I want not to rotate. But with this code below all are moving. Check below my DrawScene function.
[code]
void CopenGLCoordView::DrawScene(CDC *pDC)
{
wglMakeCurrent(pDC->m_hDC, m_hrc);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glEnable(GL_DEPTH_TEST);
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
if (wd <= ht)
glOrtho(left, right, top*ht/wd, bottom*ht/wd, znear, zfar);
else
glOrtho(left*wd/ht, right*wd/ht, top, bottom, znear, zfar);
glPushMatrix();
glRotatef(rot[0], 1.0f, 0.0f, 0.0f);
glRotatef(rot[1], 0.0f, 1.0f, 0.0f);
glRotatef(rot[2], 0.0f, 0.0f, 1.0f);
glCallList(axes);
glPrintX("X");
glPrintY("Y");
glPrintZ("Z");
glPopMatrix();
drawLine(); //This is also moving...i want this to not to move...
glFlush();
SwapBuffers(pDC->m_hDC);
wglMakeCurrent(NULL, NULL);
}
[/code]
|
|
|
|
|
Hi,I want draw a combobox,the combobox has delete button in each item of listbox and edit control, I don't know how add it in edit control.
|
|
|
|
|
You need to implement the various drawing messages as described here[^].
Use the best guess
|
|
|
|
|
|
There is a link to some examples at the bottom of that page. One of those examples, http://msdn.microsoft.com/en-us/library/windows/desktop/aa390421(v=vs.85).aspx, shows how to call a provider method.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Thanks for your suggestion, I tried this and its successful.
I did EnableDHCP and few others but on enable static it's not working.
on enable static IP address is to be there in an array(SafeArray).
Do you have any Idea?
Thanks!
|
|
|
|
|
|
|
Thanks for your reply. and however, LinearGradientBrush only draw gradient area on straight way. PathGradientBrush might be helpness, but Im not sure how to do with it.
|
|
|
|
|
At a guess you could use either brush type to flood fill a circle, then overpaint an inner circle in the background colour. That would give you the basic ring shape. You need to do some experimentation to figure out the optimum methods.
Use the best guess
|
|
|
|