|
Hi,
I want to play audio from a Sony Digital Videocassette Recorder
DVR-28(D2).
In VC++ dialog window, i only need to set the play, pause, stop
and continue button. In addtion, i need get the timecode
of the audio(hh, mm, ss, ff) and display it in the dialog window. I really want to how how to apply the Api functions to do this,
and how to get the time code?
Any points are appropriate.
Thanks in advance!
chen
|
|
|
|
|
Hi all,
I am trying to update my custom controls to get the XP look and feel. The rendering of the controls using the XP themes API is not a problem but trying to determine when to use XP themes and when not is. I have created two test apps, one with a manifest and one without. When I use the IsAppThemed() API I get FALSE on the app with the manifest (visual styles enabled) and TRUE with the app without the manifest (no visual styles enabled) which strikes me as odd.
My question is how do I determine when I should render using visual styles and when not. Perhaps the anwser is simple but somehow I can't seem to find out what it is
Thanks in advance,
Jan
|
|
|
|
|
i strictly need to use the below code to include my toolbar in my mainframe
if (!m_wndToolBar.Create(this) ||
!m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
{
TRACE0("Failed to create toolbar\n");
return -1; // fail to create
}
m_wndToolBar.ModifyStyle(0, TBSTYLE_FLAT);
i found tat the tooltips will not be displayed. how do i go about to enable my tooltips to be displayed
|
|
|
|
|
I am making an SDI app that has different views and splitters.
The views are created and replaced dynamically so do i actually need to have a DocTemplate?
I want to be able to cycle through my documents available views by using GetFirstView() etc but manually attaching the views to the doc using AddView should work just as well i think.
hmm.. i think i was just thinking out loud then..
I think my main question is, are doc templates only useful for vanilla doc/view apps (ie word) where the doc is pretty much a virtual document and the views are interfaces to it as opposed to apps that may use the doc/view architecture for slight data/presentation seperation.
wow that was a long sentence, yeah i think i'm rambling a bit
apologies for all the questions, im just trying to see how other people do things so i can find the best ways
ash
|
|
|
|
|
I use document templates as I think they make the document/view architecture quite nice and simple to use. They also tidy up a lot of the pointer creation stuff so that you don`t have to worry about that, which is nice. I personally would use one, but then again my applications tend to be MDI, not SDI, so you may prefer not to (I would, even still). Hope this helps make your mind up.
Alan.
"When I left you I was but the learner, now I am the Master" - Darth Vader
|
|
|
|
|
I am trying to debug an SDI app i am currently deveoping but DevStudio keeps locking up in a certain section of code so its nearly impossible.
When i step thru the code it locks inside one of my funcs that reads data from a socket. This has a large loop in it so i cant really step thru it fully but if i try to run to cursor at the end of the loop it just hangs the app and devstudio with it
The main thing that is frustrating me is that if i just run the prog in debug mode it runs ok. I am actually trying to debug another prob altogether but am finding it very difficult.
Has anyone else come across a prob like this before? Its making me crazy!
|
|
|
|
|
My first guess is memory overrun. Check that first. Make sure there are no memory overruns, including writing into stack objects and so on. If it still messes up, post code.
|
|
|
|
|
Yeah that sounds like it could be a possibility.
I'm also getting a
DeferWindowPos failed : low memory resources.
which points to possibly the same thing. I'll check it out
|
|
|
|
|
Hello, the codegurus around the world.;)
When you try to debug the code related to Socket with Timer or Thread,
debugging this code is almost diffcult.
In this case, I often insert TRACE macro with the key string.
As a result, I can trace the complicated process with Timer or Thread.
TRACE shows the strings in Output window.
Please, don't send me your email about your questions directly.
Have a nice day!
Sonork - 100.10571:vcdeveloper
-Masaaki Onishi-
|
|
|
|
|
hehe, i tried that but unfortunately i am using nulls to seperate the various sections of the message im trying to receive which is terminated with double nulls.
because of this trace will only read up to the first null and output that.. aiiiee!!
And i would like to read blocks of bytes in at a time but because i have to watch for double nulls i can only read a byte at a time.. Anyone else know of a better technique?
thanks for the replies
ash
PS i am using nulls because thats the way the server was designed by someone else and i guess it seemed like a good idea at the time
|
|
|
|
|
I am currently using this algorithm to convert a small image on a button from colour to grayscale:
COLORREF background = ::GetSysColor(COLOR_3DFACE);
for(int x = 0; x < width; x++)
for(int y = 0; y < height; y++)
{
COLORREF clr = DC.GetPixel(x, y);
if (clr != background)
{
int grayscale = (((GetBValue(clr) * 11) + (GetGValue(clr) * 59) + (GetRValue(clr) * 30)) / 100);
DC.SetPixelV(x, y, RGB(grayscale, grayscale, grayscale));
}
}
Does anyone know of a better algorithm
---
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
The scales of red/green/blue look right, but you'd do better to use a DIBSectio, and avoid the speed issue of Get/SetPixel, as well as not needing to select it into a DC.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
Does anyone know of a better algorithm
You might want to have a look at the Color space FAQ.
A Google search for "color space RGB" (and other suitable restriction words) should display more than enough. It's a large area...
|
|
|
|
|
Hi everyone. Does anyone know if it is possible to open a read-only Jet (Access) database in code. I know MS Access will allow you to open a read only database, and just warn you when you open it that it is read only and you can't change the database. I recently tried to open a read-only DB in code, and all I did was attempt to open it, open a table and read out some records. It seems to fail when it tried to open the table (and the program then crashes). I tried debugging it, but my code seems ok, and I don't attempt to write anything. Does anyone know for sure?
|
|
|
|
|
I think you should post the relevent code snippets here for anyone to be able to help you.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
I recently tried to open a read-only DB in code
Using what? ODBC? DAO? ADO? OLE-DB? RDO? [insert any new "technology" buzzword that has emerged since that I don't know about].
Without knowing this, we could as well answer "Yes, you can put a man on the moon".
|
|
|
|
|
If you're using DAO, open the database both Exclusive and Read-only. This method does not create an .ldb file.
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|
|
Hi !
Does someone know how to create a DialogBar (Dialog window with Toolbar behavior, like MFCs CDialogBar) with WTL or Win API (without using MFC)?
I tried to put a dialog window into a ReBar control, but up to now i wasn`t able to insert a second (vertical) rebar control in my MDI MainFrame correctly without interfearing with the first ReBar ...
Any help is welcome ...
|
|
|
|
|
Is there side-effects to using two (different) #pragma pack () statements in a single header file?
I have the following:
#pragma pack (push, firstPragma)
#pragma pack (2)
...
typedef struct
{
blah,...
} STRUCT_A;
...
#pragma pack (pop, firstPragma)
#pragma pack (push, secondPragma)
#pragma pack (4)
...
typedef struct
{
blah,...
} STRUCT_B;
#pragma pack (pop, secondPragma)
Im very curious on this issue.
Thanks.
|
|
|
|
|
You can simply that with
#pragma pack(push, firstPragma, 2)
struct
#pragma pack(pop, firstPragma)
#pragma pack(push, secondPragma, 4)
struct
#pragma pack(pop, secondPragma)
Todd Smith
|
|
|
|
|
hi,
i made a modal dialog, and i called him
in
void CBankView::OnFileConnect()
{
// TODO: Add your command handler code here
ConectDialog dlg;
dlg.m_strHost="127.0.0.1";
dlg.m_uintPort=6699;
dlg.m_strServerName="MYSQLSERVER";
dlg.m_strUser="username";
int ret=dlg.DoModal(this);
...
then when the user click on OK, i predefined
the onOK function and then i want to call my CBankView->Connect()
function, but i don't know how to get pointer to my
CBankView ot my CBankDoc objects
pls help me.
|
|
|
|
|
Stanislav wrote:
int ret=dlg.DoModal(this);
How did you compile that?
CDialog's DoModal is defined as :-
virtual int DoModal();
But you can do this :-
GetParent()->GetActiveView()->YourFunction() from your modal dialog.
Casting might be required.
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
If you don't find me on CP, I'll be at Bob's HungOut
|
|
|
|
|
Hello, the codegurus around the world;)
There are many ways to get CWnd of view and doc.
1) Pass CWnd of CBanView of the constructor of your dialog.
2) GetParent() may work.
3) Get the frame's CWnd by AfxGetMainWnd() and use GetActiveView() of
CFrameWnd.
4) Create the static function like GetView().
(You can find this static function in somewhere of MSDN.)
CFrameWnd has GetAcitveDocument() or use inline GetDocuemt() in View class.
Please, don't send me your email about your questions directly.
Have a nice day!
Sonork - 100.10571:vcdeveloper
-Masaaki Onishi-
|
|
|
|
|
10x, both, i
managed to do it with
the static CMyDoc *MyDoc(); which
was described in a article in MSDN-a
|
|
|
|
|
I've got this ActiveX Object (made w/ VC++6.0), it creates a thread (so i can have multiple running at the same time), but it also fires events to my Visual Basic App. With me creating threads cause problems for those events trying to get back to the application?
It seems that way. VB seems to crash when i Fire an event. When i use an activex control, does it have its own thread? Can i redirect the thread ID or something like that? It's just being flat out weird. Has anyone had the same trouble before? I set up connection points at the beginning when i made the obj., is there any other settings that i need to have? Even a little bit of help will go a long way for me...Thanks Y'all.
~TIM!
SHABBA!!
|
|
|
|