|
i made picture viewer album program how i can stop or disable or prevent any other program from make image capture to my program
|
|
|
|
|
i made picture viewer album program how i can stop or disable or prevent any other program from make image capture to my program
|
|
|
|
|
I'll try to be as simple as possible.
in CMyView i have:
void CMyView::onSample(UCHAR* in_buffer)
{
valueArray = (USHORT*)in_buffer;
valuesInited = true;
this->InvalidateRect(okvirAP);
valuesInited = false;
}
I do not want 'valuesInited = false;' to happen until the end of OnDraw function execution (fired by InvalidateRect).
I was trying with CCriticalSection but obviously i don't know to use it.
|
|
|
|
|
come on ... You need to have a global variable acting as a flag . Declare
bool valuesInited in view.h ( in the class) and have a flag variable ( say int flag) to note that OnDraw is called due to OnSample() . So In OnDraw() do as below
OnDraw()
{
if ( flag==1)//means OmDraw() is called due to onSample()
{
valuesInited=false;
}
}
Dharani Babu S
|
|
|
|
|
Hello,
I am doing a project at the moment which basically should allow creation of frame windows - and their associated views with specific purposes - automatically.
My problem is I don't really know what the best strategy to employ is. I mean, I can't use an MDI architecture as the frame windows have to be created independently - separately from each other - and if I use the SDInterface I am limited to one frame window only.
How do I do about this with MFC?
Thank you very much,
David
|
|
|
|
|
|
Hi friends....
I am working on a SDI application with database support. I require two tables for my application. While configuring the application wizard i specified both the tables in the Data Source when asked. Everything went fine. The application is running well. But if i want to add a new record in a table then it does not allow and states that "Database is Read Only".
I went again making the same appliaction with a single table, and when i tried to add a new record it did successfully.
Why is it happening that when using two tables the database is openeing as Read Only. I am not using Open function at all, since the application wizard itself opens it up. It happens fine when i use one table. It should do with two tables too.
Please solve this problem of mine.
Thanks.
Pankaj
|
|
|
|
|
Pankaj_Agarwal wrote:
Why is it happening that when using two tables the database is openeing as Read Only.
The query that was created no doubt has a JOIN in it. A JOIN ed query cannot be updated. You'll need to update each table separately.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi,
Can you please let me know how to perform this task. Or please let me know that how to use two or more tables in a SDI application so that at any place or time any table can be updated.
Please do help meout !!!!
Pankaj
|
|
|
|
|
Like I said, you'll need to update each table separately. For example, if table A had customer information in it and table B had order information in it, you would first add a new row to table A, then you would add a new row to table B. They would be "tied" together via the primary/foreign key.
--------------- ---------------
| Table A | | Table B |
--------------- ---------------
| Primary Key |------| Foreign Key |
| Name | | Part # |
| Address | | Quantity |
| Phone | | |
--------------- ---------------
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi,
Dear, this is the problem...my two tables are not related to each other. Actually one table has the header of the company which i am displaying on the top and the other table has all the details which has to be displayed, edited and add on the window.
Both the tables have no relation at all with one another. In such a case what to do.
And also if the tables have realtion as Primary Key- forign Key then as you said to update each table separately, in that case alsoboth the table firlds are being displayed on the window, and after a execute the AddNew (), it shows the error that the "Database is read only"...
Please look into it.
Thanks,
Pankaj
|
|
|
|
|
Pankaj_Agarwal wrote:
Both the tables have no relation at all with one another. In such a case what to do.
Start over. When AppWizard asks you for the table, only specify one of them, then create the other using ClassWizard. Or, create the application with no database support, then use ClassWizard to create two classes derived from CRecordset .
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
hi
i have a task to implement VoIP but i dont have any idea about it ... i have read some tutorials about VoIP and got some basic idea... but i dont have any clue how to implement it in vc++.... is there anybody who can help me in this problem ...
ill be gratreful
regards
ali hammad
|
|
|
|
|
hi
i have a task to implement VoIP but i dont have any idea about it ... i have read some tutorials about VoIP and got some basic idea... but i dont have any clue how to implement it in vc++.... is there anybody who can help me in this problem ...
ill be gratreful
regards
ali hammad
|
|
|
|
|
What exactly is your requirement ..?
Dharani Babu S
|
|
|
|
|
how to use flash in vc++.
|
|
|
|
|
const UINT msgID = RegisterWindowMessage("SomeString");
.
.
.
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case msgID:
// do something
}
}
after compile, the error is :
error C2051: case expression not constant
why?
thanks
|
|
|
|
|
Hello ting668,
C/C++ compilers require the switch/case statements to use constant literals or macros (that work out to actual literal values).
A statement like the following :
case msgID:
is no good to the compiler because the compiler does not know what "msgID" is during compilation.
Regards,
Bio.
|
|
|
|
|
Because the value of msgID is not known at compile time, it is generated at run time, and the compiler must know the value of any constant used in case statements. You have to use an if else construct for registered messages.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
i think ,you go for if statement for resolving Registered message id before Switch statement
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
ting668 wrote:
why?
Case expressions must be integral constants.
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi, can anybody tell me abt how to find vendor of a scsi hard disk using c++ ?
As SCSI command: READ_CAPACITY does not give u this information
Thanks & Regards
|
|
|
|
|
Anonymous wrote:
Hi, can anybody tell me abt how to find vendor of a scsi hard disk using c++ ?
The vendor's name is typically not part of a piece of hardware. Are you perhaps referring to the manufacturer's name (e.g., Seagate, WD, Hitachi)?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hello all.
I am creating a CRichEditCtrl derived class, and I want it to be always a read-only edit box.
I guess I should use somewhere the SetReadOnly() function but, which method should I overwrite?.
I have created a Dialog with a CEdit, I've used the class wizard to add a control variable for the CEdit, and I've writen my clase name instead the CEdit one (the usual procedure, I think).
I've tried to overwrite several functions, like OnCreate, but they are never called (I'm sorry about my ignorance
Thanks in advance.
|
|
|
|
|
cbusgut wrote:
I guess I should use somewhere the SetReadOnly() function but, which method should I overwrite?.
Have you tried PreSubclassWindow() ?
"Opinions are neither right nor wrong. I cannot change your opinion of me. I can, however, change what influences your opinion." - David Crow
|
|
|
|