|
Hi all
I want to know if there is a way to refresh the window for the busy dialog. My dialog disappear and cover by the other windows that I open while it is working. The dialog is there working but doesn't see anything at all. How can I refresh the window so I can see the updating variables as well as other resource items.
Thanks
|
|
|
|
|
|
Is it possible to run two seperate applications (two EXEs) in the same Window?
The idea is that I have two applications, that use some type of Inter-process Communication (IPC) to query/modify common data. The two applications need to be integrated in such a manner that they appear to the user as a single application.
This doesn't appear to be something that OLE is meant to handle.
Any comments or references would be appreciated.
thanks.
|
|
|
|
|
Bill Chan wrote:
Is it possible to run two seperate applications (two EXEs) in the same Window?
Its other the way round. A window is owned by an exe. You cannot have two exes to own a same window. To be more specific a window is owned by the thread which created it. And the thread is inturn owned by the exe.
Bill Chan wrote:
The idea is that I have two applications, that use some type of Inter-process Communication (IPC) to query/modify common data.
One method is to have a window in any one of those exe. Which displays the common data. And when ever the data is modified from this exe just post a message to the UI window also, so that it can update the displayed values.
There can be other solutions also, btw where does your data reside. DB, file or registry ?
suhredayan There is no spoon.
|
|
|
|
|
Ideally the data would be loaded in memory of one of the applications.
We are investigating the feasibility of integrating our 2D drafting application (like AutoCAD) with someone elses solid modelling program. The drafting program needs to communicate with the solid modelling program.
|
|
|
|
|
Hi,
I use a __int64 value and calculate :
__int64 x = (0x00000000000005fa - 0x0000000000000660) / 2i64;
what I get : 0x7fffffffffffffcd instead of 0xffffff.....
That relates into a very big positive value. not a small negative I like to have.
Could anyone tell, what could go wrong here ?
I use VC++ 2003 (EnterpriveDev)
kind regards
|
|
|
|
|
How are you checking the value of x?
I'm not a complete idiot -- Some parts are missing.
|
|
|
|
|
__int64 x = (0x00000000000005fa - 0x0000000000000660) / 2i64;
You divided the result by 2, which gives you 0x7fffffffffffffcd.
|
|
|
|
|
evilhehe wrote:
You divided the result by 2, which gives you 0x7fffffffffffffcd.
Try that again.
1530 - 1632 = -102
-102 / 2 = -51 (0xffff ffff ffff ffcd)
[edit]
Sorry, you are correct if OP is using unsigned __int64 .
Maybe that is the problem
[/edit]
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
I tried this within two lines, and get the correct result. (like your example). Semm like anything switched the calculaten to unsigned (any variable). I ll check this.
thanks for help.
|
|
|
|
|
Hi all,
I try to access to VB com collection Item method but I got a bad type error.
I import VB COM library into vc++ application. From the smart pointer of the collection, the function requests a VARIANT* data type. I create a variant variable as assigned 1 to it to get first item in the collection.
Here is my code:
_clsMacManPtr Mac ;
if ( Mac->ReadDailyMachiningReport (bstrFilePath) != 0 )
{
Reports = Mac->GetDailyMachiningReport () ;
if ( Reports->Count > 0 )
{
vValue.iVal = 1 ;
Report = Reports->GetItem(&vValue ) ; // failed here
bstrValue = Report->NoWork ;
}
}
I appreciate for any comments
|
|
|
|
|
|
I got a bad data type error.
|
|
|
|
|
I got a bad data type error.
|
|
|
|
|
Anonymous wrote:
I got a bad data type error.
Yep, you said that before. But, what was/is the exact error message? The error message should say something like "cannot convert from xxxxx to yyyyy."
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Yes, that is the error message I got it by catching com error.
I have to create a function that passes an integer to get the an item from vb collection to get around this. However, I wonder why it would not work with variant variable.
But if you do know please let me know.
Thanks for you comments
|
|
|
|
|
I want to have a scrollbar in a dialog box, so I drag it in at design time. Then I want to attach this to a control m_myScroll.
My problem is that I don't know what to do with the Create function.
The create function wants me to specify a CRect with the size of the scrollbar, but I've already fixed its size at design time (as well as its position).
The Create function asks me for a nID, which I give it from the dialog box value of the scrollbar I dragged onto the form.
Also the Create function talks about a ShowScrollBar, which is also not clear to me. After all, I've already defined it on my form.
I'm confused and what I've written doesn't work, so I'm doing something wrong. Can anyone help me?
Thanks,
Ilan
|
|
|
|
|
Hi Ilan,
You don't need to call Create (and you cannot, in your case). Create is used only if you create your ScrollBar (and this is true for any other control) at runtime. In your case, you use the resource editor so this is done automatically. Just drop it on your dialog and attach a control to it. And that's it !
|
|
|
|
|
Thanks again for the help. Apparently I didn't tell you the whole truth. In fact, I'm using a CDialogBar not a CDialog object. In the CDialogBar, it doesn't have the Add Variable object, so I did it manually with the DDX control.
Apparently, it is not for nothing that the Add Variable doesn't exist. The problem is that the CSrollBar has no window so it keeps crashing on the ASSERT check on the window. I tried my best to set the window, but with no success. I may have no choice but to actually create the scroll bar with the Create command and not drop it in at design time.
Thanks,
Ilan
|
|
|
|
|
IlanTal wrote:
I want to have a scrollbar in a dialog box, so I drag it in at design time. Then I want to attach this to a control m_myScroll.
My problem is that I don't know what to do with the Create function.
You don't need to call Create directly. Just add a DDX_Control for it in your dialog's DoDataExchange implementation:
void YourDialog::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
DDX_Control(pDX, IDC_MYSCROLL, m_myScroll);
}
This gets called during dialog initialization (CDialog::OnInitDialog ) and does all the work for you.
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
Hi All.
I have a window which has child windows of two types.
The child windows can be of non-rectangle shape.
I need to exclude from painting the areas occupied by
windows of the first type but not the second ones.
If I create the window with the WS_CLIPCHILDREN option,
I'll get the both types of child windows excluded.
What might be the best way to implement this using
VC++ and MFC?
I've looked towards regions but at the moment it looks a
little bit difficult comparing with just specifying one
option.
Thanks.
|
|
|
|
|
1) WS_CLIPCHILDREN appies mainly to OnEraseBkgnd(), so override it to return success.
2) Do all your drawing in OnPaint() or OnDraw().
3) Draw what you need and then exclude there regions or rects.
4) Draw background.
Beyond that, your question does not make much since.
INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
|
|
|
|
|
How can I change the theme of my program? I want to change this classic gray theme and put something else...
|
|
|
|
|
Simple theme or visual style?
Don't try it, just do it!
|
|
|
|
|
I don't know, what's the difference? Tell me both if you know
|
|
|
|