|
Then placea breakpoint on that line of code, look in your debug 'auto' window and check which one of those pointers is equal to 0xCDCDCDCD, then think to yourself, why isn't initialized?
Waldermort
|
|
|
|
|
|
hi i developed an program to load a 3d model. now i have to run tihs exe in web browser. how to load the application in web.
|
|
|
|
|
What I understand from your question is that you want to run your exe in Internet Explorer or any other browser.
This is not possible. You can't run an exe in web browser. Only activex controls or scripts are allowed.
|
|
|
|
|
how to convert .exe to activex. i had seen some examples but i cant understand it. can u please explain the procedure.
|
|
|
|
|
This is same as How to convert Apple to Orange.
Both are two different things and are created in different way. You can't convert one to another.
|
|
|
|
|
NishantB++ wrote: This is same as How to convert Apple to Orange.
So, how do you convert an apple to an orange?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Do you have source code of this application?
|
|
|
|
|
yes i am having. i have developed it in document/view. now i have to open it in browser.
|
|
|
|
|
Hello guyz.
I'm using VC++ 2003 and I want to make an executable file that will register an ActiveX file[s].
Please help me on how to do this of you knew of a post or thread please give me a link.
I'm hoping for your reply.
Thank you
|
|
|
|
|
TooShy2Talk wrote: register an ActiveX
Why do you want to do that? A program that does that already exists. It's called regsvr32.exe.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
The people in the lounge said I should google for the answer to a programming question but I do not know what search engine to use
|
|
|
|
|
Hi All!
i would like to get some help regarding creating objects inside a thread.
i have a thread and within the thread i am creating an object.
main thread
{
obj o
for(;;)
{
o.createnamedpipe;
o.connectnamedpipe;
if(connected)
{
o.createthread;
o.startthread;
}
}
}
the above scenario always encounters an exception. is it because the obj is no longer valid when the o.startthread is started? i tried to use another thread thread and from there call the startthread... so ill have
for(;;)
{
o.createnamedpipe;
o.connectnamedpipe;
if(connected)
createthread(minorthread, o,...);
}
minorthread(lpParam)
{
obj o = static_cast<obj>lpParam;
o.createthread;
o.startthread;
}
this however still fails.
hope someone can help me. thanks in advance!
newbie
|
|
|
|
|
Notice anything peculiar about your code snippet? Yeah, we can't decipher it either.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi, i am sorry i wrote just words to explain the way i have coded it. basically what i have is a class (CIPCClass) which encapsulates namedpipe functions and in the mainthread i create an instance of that class CIPCClass and when a client has connected i call the startthread of the CIPCClass to continue the receiving of message while the main thread can again continue to listen for connecting clients.
mainthread
{
CIPCClass obj;
for(; ; )
{
obj.CreatePipe();
int nRet = obj.ConnectNamedPipe();
if(nRet)
obj.StartThread();
else
break;
}
}
the above approach did not work so i created a minorthread which receives the CIPCClass. and from the minorthread then i will call the startthread. still it did not work.
hope i have explained it clear enough. sorry again.
thanks for any help.
newbie
|
|
|
|
|
Using the <pre&gr tags keep the indentation and any < or > symbols.
It will also make it easier on people's eyes to read - so someone might actually answer.
Iain.
|
|
|
|
|
ginjikun wrote: hope i have explained it clear enough.
What does "did not work" actually mean?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
If code isn't indented I don't bother to look at it.
Steve
|
|
|
|
|
my listbox is showing what is going on with my program as it happens...
i need it to add the text in order from when it was called instead of alphabeticly or however it's doing it right now how can i fix this? thanks
|
|
|
|
|
Use LB_INSERTSTRING to add items to the control or make sure the
control doesn't have the LBS_SORT style and use LB_ADDSTRING.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I am writing codes in SDI (MFC 7.0) with 1 document and multiple views (only 1 view active at one time). The parent window's size is fixed (cx = 1024 and cy = 768 from CMainFrame::PreCreateWindow). There are no max/min/close buttons on the upper right of the title bar. No resize either. And now, I have different views derived from CFormView. These views have different sizes (350 x 200, 550 x 400, 900 x 600). I just want all the views to be 1010 x 700 in size dynamically when they are called (i.e. 350 x 200 -> 1010 x 700, 550 x 400 -> 1010 x 700, 900 x 600 -> 1010 x 700). How do I accomplish this? The parent window contains four parts: title bar, menu, client window (will be filled up by one of the formviews), and status bar. By the way, I do know how to switch views. Please help. Thank you for your time.
|
|
|
|
|
MFC usually takes care of this for you. By default, views are sized to take up
the client area not occupied by decorations (toolbar, status bar, etc.). If you
want this behavior, and you're not getting it, maybe try calling RecalcLayout()
on the parent frame after setting the active view.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Mark,
Thanks for the reply.
If I insert the RecalcLayout() inside the OnInitialUpdate of
the View then the outer frame window will shrink into the
size of the view. What I want is the size of the view needs
to grow as the outer frame window grows (actually the outer frame
has been set to fixed values cx and cy). The reason for this effect
is I want to populate each view dynamically with controls such as
buttons, datagrid, textboxes, list boxes, and combo boxes. Please
help. Thank you for your time. Have a nice day.
|
|
|
|
|
Call ResizeParentToFit (true) after calling RecalcLayout
Judy
|
|
|
|
|
Just a comment.
Am I missing something here?
The view frame is resized to fit the variable size of parent.
The parent size is subsequently changed.
So why RecalcLayout does not do the job by itself?
BTW Judy - your suggestion is now in my project notes.
Good one.
Thanks
Vaclav
|
|
|
|
|
Vaclav_Sal wrote: Am I missing something here?
The view frame is resized to fit the variable size of parent.
The parent size is subsequently changed.
So why RecalcLayout does not do the job by itself?
At a guess, because RecalcLayout only affects the frame window i.e. CMainFrame. Calling it implies that the frame size has changed and the scroll bars need to be adjusted to the new size, but there is no relation, with respect to this call itself, between the view and the frame. The call to ResizeParentToFit calculates what an appropriate client size should be and then tells the frame what it's new size should be.
From MSDN description of CScrolView::ResizeParentToFit
ResizeParentToFit assumes that the size of the view window has been set. If the view window size has not been set when ResizeParentToFit is called, you will get an assertion. To ensure that this does not happen, make the following call before calling ResizeParentToFit:
GetParentFrame()->RecalcLayout();
Judy
|
|
|
|