|
Yeah. But each frame in the splitter (2x2) is a CViewport which I derive from CView. Shoulw it really be derived from a CView when it's not hosting and "viewing code" in itself, but only exists as a host frame of a control bar for the viewport and the real view (CCameraView)?
I know I'm making this hard to understand What I want is the exact same feature as in 3dsmax. 4 viewports in a splitter. Each viewport should contain a combobox where you can select what view/camera that will be used. There will also be a button there to toggle maximization of the viewport. Below this "control bar" the actual view will placed.
I started with MFC just a couple of days ago so I really don't know how to construct this kind of layout.
|
|
|
|
|
I've only used a splitter window a few times and they were both 1Rx2C. Both panes had a CView -derived object in it (one was a CListView and the other was a CTreeView ). I've seen examples of more, however. In those, the main splitter window had two panes, both of which were CSplitterWnd objects. Now you have two splitter windows (inside the one main splitter window), with two panes each. In those four panes can be whatever CView -derived objects you need. Make sense?
"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
|
|
|
|
|
But can I create something else than a CView derived object in a splitter window pane?
What class is used for generic window/panels? Is it CWnd?
Can I add a CWnd to a splitetr pane and then add an additional CWnd inside that CWnd? I'm at work atm so I can't test for myself :P
-- modified at 12:10 Friday 4th August, 2006
|
|
|
|
|
Tengil99 wrote: But can I create something else than a CView derived object in a splitter window pane?
Maybe, but having never done otherwise, I can't say for sure.
Tengil99 wrote: What class is used for generic window/panels? Is it CWnd?
A CView -derived object, I presume.
Tengil99 wrote: Can I add a CWnd to a splitetr pane and then add an additional CWnd inside that CWnd?
That's what I eluded to in my last response. The main splitter window had two panes, each of which was a CSplitterWnd object. Both of those splitter windows had two panes, and the resulting four panes held other (CView ) objects.
"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
|
|
|
|
|
But i dont want to use a splitter pane.
|
|
|
|
|
Your "I then place four CViewport in a splitter window." comment led me to think otherwise. Sorry that I couldn't be of more help.
"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
|
|
|
|
|
Hi all,
I have created a win32Application. I have created a dialog box in resource. I need to call this dialogbox from inside the winmain()function , How it would be possible ,
Please help me
Thanks in Advance
George K Jolly
-- modified at 5:47 Friday 4th August, 2006
|
|
|
|
|
#include<windows.h>
#include "resource.h"
LRESULT CALLBACK DialogProc(HWND hWnd,UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch(uMsg)
{
case WM_CLOSE:
EndDialog(hWnd,0);
return(TRUE);
break;
}
return(FALSE);
}
int _stdcall WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd)
{
DialogBox(hInstance,MAKEINTRESOURCE(IDD_DIALOG1),NULL,(DLGPROC)DialogProc);
return(0);
}
MANISH RASTOGI
|
|
|
|
|
Thanks Manish
Its Working
|
|
|
|
|
I have problem in using of DDK:
In Visul C++ When i include File of DDk(.h)
give me Many Error Please guide me
For Example :
Include "ntddk.h"
Error:
'MAX_NATURAL_ALIGNMENT' : macro redefinition
'PROBE_ALIGNMENT' : macro redefinition
'FASTCALL' : macro redefinition
'_FLOAT128' : 'struct' type redefinition
'_LARGE_INTEGER' : 'union' type redefinition
C2011: '_ULARGE_INTEGER' : 'union' type redefinition
'_LUID' : 'struct' type redefinition
#include "ntdef.h"
Error:
'_SINGLE_LIST_ENTRY' : 'struct' type redefinition
'_LIST_ENTRY' : 'struct' type redefinition
'LIST_ENTRY32' : 'struct' type redefinition
'LIST_ENTRY64' : 'struct' type redefinition
|
|
|
|
|
Is there a way of using the ANSI C Library in VC8?
Basically can I use fopen and so on?
In a normal Win32 project it says the methods are deprecated (yes I know I can use fopen_s but for project reasons I have to use fopen (and would rather not write a whole bunch of macros).
-- modified at 5:15 Friday 4th August, 2006
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
deprecated doesn't mean unusable...
it is only an advice not to do so, but yes, you still can use them.
|
|
|
|
|
Hmm... I seem to remember (from yesterday) that when I tried to open a stream using fopen it returned a null, even though the file was valid (tried the same code on my home workstation using gcc and it worked fine).
I will investigate anyway, thanks a lot.
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
Like we copy the file to print to a tif file through the print dialog, I want to do it with out getting print dialog on to the screen. I want my code to do what the print dialog does in the background to copy the txt file image to the tif file.
can any body help me .Please.
Thank you.
KIRAN PINJARLA
|
|
|
|
|
whats the meaning of "copying a .txt file to a .tif file"?
|
|
|
|
|
Like we view the print view of a text file.Like an image file.
KIRAN PINJARLA
|
|
|
|
|
I want to help you but first i need to understand your problem
|
|
|
|
|
Thank you for ur reply.
Let me explain my problem.
I have a text file. I want to print that text file to a fax. I want that text to be converted into an imagefile of .tif. Then i want to send that tif image file to fax. Now the problem is how to get the text in the text file into a tif file as an image. Or can we put that text as image on any other file formats like jpg,bmp.
Awaitng your reply
Thank you
KIRAN PINJARLA
|
|
|
|
|
Hope I understood your question
you need to read this file(txt) line to line and darw to dc.See here its a simple example but i think its your purpose,right?
<code>
include AtlImage.h
HDC hdc=CreateCompatibleDC(GetDC()->m_hDC);
HBITMAP hbit=CreateCompatibleBitmap(GetDC()->m_hDC,100,100);
SelectObject(hdc,hbit);
FillRect(hdc,CRect(0,0,100,100), (HBRUSH)GetStockObject(WHITE_BRUSH) );
TextOut(hdc,0,0,"test",4);
CImage m_Image;
m_Image.Attach(hbit);
m_Image.Save("D:\\test.bmp");
DeleteObject(hbit);
DeleteDC(hdc);
|
|
|
|
|
Why a repost? Your original one is just below
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
Ed
|
|
|
|
|
kiran.pinjarla wrote: ...I want to do it with out getting print dialog on to the screen. I want my code to do what the print dialog does...
I think what you want requires:
OpenPrinter()
StartDocPrinter()
StartPagePrinter()
WritePrinter()
EndPagePrinter()
EndDocPrinter()
"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
|
|
|
|
|
We suppose your problem is "how to create a TIFF image file which contains just a white background and a simply formatted black text, loaded from a text file?"
As a hypothetical solution I would suggest you to try the CxImage library (http://www.codeproject.com/bitmap/cximage.asp[^], light source files).
I think a part of solution may look like this:
CxImage image(1024, 1024, 8, CXIMAGE_FORMAT_TIF);
HDC dc = ::GetWindowDC(NULL);
image.DrawString(hdc, 10, 10, "a line of text", RGB(0, 0, 0), "Arial");
::ReleaseDC(hdc, NULL);
image.Encode("file-name.tiff", CXIMAGE_FORMAT_TIF);
I hope it works.
|
|
|
|
|
Thank You Viorel.
If i am right, the text file window which is to be printed has to be opened.
If it is the case I want to tell you that the window will not be opened. I just give the path of the text file. Is it possible to do as such.
Please reply.
KIRAN PINJARLA
|
|
|
|
|
I don't think you have to open a window. You just need to open the existing text file using a method you know: fopen , CStdioFile , std::ifstream , CreateFile etc. Then read lines from file and draw them to the image.
Note that instead of CxImage third-party library you also may investigate some other tools. For instance the CImage class, available in ATL and described in MSDN, is also able to store images to disk, but not in TIFF format.
|
|
|
|
|
I have an application where 4 audio files are played simultaneously in two channels of two conventional stereo cards. I have to migrate this to playing using a 5.1 system. There are limitations to existing WAVEFORMAT which does not identify multi channel device.
Can anyone help me with the procedure how to pack the audio packets (for 4 files) and assign to the multi channel sound card?
Any help is highly appreciated.
Thanks in advance.
Manoj
|
|
|
|