|
AX control hosting is quite complex. Your dialog isn't appearing because when you use the VC resource editor, it puts a placeholder into the dialog template, not the actual control. Both MFC and ATL recognize the placeholders and insert their own control hosting code to manage the control.
You app would have to do something similar. The easiest route would be to use ATL for that dialog and let it handle the hosting duties.
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
oh... in that case:
1) how can i add ATL to my dialog, without really complicating a pretty small utility
2) can i play an MP3 using something other than Windows Media Player ActiveX (that is the control i need... to play an MP3)
Roman Nurik
|
|
|
|
|
In your stdafx.h (or whatever your main header file is) remove the include of windows.h, and instead put:
#include <atlbase.h>
extern CComModule _Module;
#include <atlwin.h> In the CPP file that has WinMain() , declare the global _Module . Change WinMain() thus:
int WinMain ( HINSTANCE hinst, ... )
{
_Module.Init ( NULL, hinst );
.....
_Module.Term(); return msg.wParam;
}
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
is there any one who know how i can add DIALOGBAR in one application,because i want to add it in my application in the long of the right of window and i will add in it some control as slider buton ......
|
|
|
|
|
Is it posible to put buttons or other controls in the view in a View-Document app? and how can I do it?
tks in advance..
Daniel Cespedes Daza
"Santa Cruz de la Sierra Paraiso Terrenal!"
daniel.cespedes@ieee.org
|
|
|
|
|
Definitely. One solution is to add the button as a member variable and call Create().
Kuphryn
|
|
|
|
|
When you use AppWizard to create your application, you could try setting the view base class to CFormView (on the last but one page of the wizard IIRC). This allows you to define your view using a dialog template.
If you have a CView derived view, then you'll have to create them dynamically.
|
|
|
|
|
Is there a native way (not through redefinition with UNION) to pass a pointer of an array by address to a function, so that the function can change the pointer and pass back the changed value?
|
|
|
|
|
Yeah. Like this:
void DoSomething( int ** p_ppiArray )
{
*p_ppiArray = new int[10];
}
void SomeOtherFunction()
{
int * a_piArray = NULL;
DoSomething( &a_piArray );
delete [] a_piArray;
}
Chris Richardson Terrain Software
|
|
|
|
|
Thanks Chris; it's working already.
I tried it with "double-ptr" in the form **array[], but that did not work.
|
|
|
|
|
Hi,
I use the commande : pDoc->OpenDocumentFile(NULL); (where pDoc is a pointeur of CMUltiDocumentTemplate) to open a new document of type CFrameView.
I'm using a tabctrl class for swicthing between multiple document in a mdi (CMDITabs from Christian Rodemeyer) and i'd like to have a top CFrameView on top even if a new document is open.
Is there a way to do this ?? Thank you very much
|
|
|
|
|
in VC 6.0, i use CHtmlView, but it can not load java swing (jdk 1.2 and above) controls.
how to solve the problem?
thx
includeh10
|
|
|
|
|
I am trying to track reams of data and am getting exhausted of opening
multiple files. Anyone have a quick method for opening somewhere on the order
of 100 files?
I suppose I could generate filenames, but how do I open them all without coding 100 separate instances of:
ofstream DataFile1;
DataFile1.open("Data1.txt", ios::out | ios::trunc);
if ( DataFile.fail() )
throw "This disk is full.\n";
|
|
|
|
|
Could you try
ofstream* df[100];
for (int i=0;i<100;i++)
{
string filename("data");
filename.append(itoa(i));
filename.append(".txt")
df[i]->open(filename,ios...
...
Chris Meech
"what makes CP different is the people and sense of community, things people will only discover if they join up and join in." Christian Graus Nov 14, 2002.
"Microsoft hasn't ever enforced its patents. Apparently they keep them for defensive reasons only. Or, they could be waiting 'til they have a critical mass of patents, enforce them all at once and win the game of Risk that they're playing with the world." Chris Sells Feb 18, 2003.
|
|
|
|
|
Is there a way to use MFC support in Win32 application? (especially Property Sheet class).
|
|
|
|
|
You are asking without adding MFC support to the application? Any win32 or ATL application you can add MFC by selecting the compiler option, adding afx.h to stdafx.h and then properly initializing MFC. Create a console application with MFC support to see what is needed.
John
|
|
|
|
|
How I can color my MessageBox in red, and Button in blue.
Thus I want to create my own MessageBox with my parameters.
Thanks.
Kostya
|
|
|
|
|
|
Is there any alternative to using GetDIBits for filling the lpvBits parameter of the function. It works fine for me on Windows XP and 2000 but the function always returns 0 on Windows 98. Are there a group of function I can use in a for loop (or something like that) to get everything pixel by pixel and store it into into a buffer?
|
|
|
|
|
CDC::GetPixel will get a pixel out of a DC (create a memory DC, select the HBITMAP, get the pixels, etc)
-c
To vote with no response is to follow the way of the coward.
|
|
|
|
|
I figured I would get this answer, unfortunately this would be too slow for me. Do you have any experience with GetDIBits and possible reasons the same code works fine on Windows XP/2000 and not on 98?
|
|
|
|
|
how big is the bitmap? 95/95 have GDI size limitations that NT/2000/XP don't have.
To vote with no response is to follow the way of the coward.
|
|
|
|
|
The bitmap is 544 Kb. I noticed somewhere on MDSN something about 64 KB but it mentioned that this applied to Windows 3.0...you think this is the problem?
|
|
|
|
|
georgiek50 wrote:
you think this is the problem?
it could be.
check out the GetDeviceCaps function. it can tell you if a device (the DC, in this case) supports GetDIBits, if it supports big bitmaps, etc..
-c
To vote with no response is to follow the way of the coward.
|
|
|
|
|
Apparently it supports bitmaps greater than 64K and the GetDIBits function. Any other ideas?
|
|
|
|