|
ok, now what?
can I pretranslate the IE client WND's messages from inside an embedded component?
What can I do?
|
|
|
|
|
|
|
from MSDN
Some objects might want to support the inside-out activation model by marking themselves with the OLEMISC_INSIDEOUT flag. In this model, a single click on the object causes it to be activated in place.
mk:@MSITStore:C:\Program%20Files\Microsoft%20Visual%20Studio\MSDN98\98VS\1033\inole.chm::/D1/S12f9.htm
Therefore, to select the object as a whole, the user selects the border, or some other handle, provided by the object or its container. For example, the container
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnwue/html/ch12f.asp
I found out that If i click the top level window(the one with the elipse drawn from my example), the backspace will work.
Now I know why it wouldn't work in the first place, the ocx has the OLEMISC_ACTIVATEWHENVISIBLE flag, but it WON'T activate when visible, as the quote above from suggests, unless the user clicks the control border.
Now, who in their right mind is going to click the border instead of the CEdit in the control?
jdunlap's link doesn't work, because my example is an active X control and not a ATL Com control, so the activateinplace method is not exposed.
Also, MDunn's suggestion won't work either because it's not a keystroke problem
|
|
|
|
|
how to load and write data into SQL server? please show me ex.
thanks
Nho'c Ti`
|
|
|
|
|
SQL's INSERT command would probably be a good start
I'm drinking triples, seeing double and acting single
|
|
|
|
|
hello ppl,
i am making a very simple program that is a window application. pretty much a basic hello world program to just get myself started and i have the program set up. its written in c++ and compiled with visual basic 6.0
my question is how do you pick text colors and font size? i also have a couple console programs (they open with a dos command prompt) and i would like to know how to do it in those as well. its been making me insane cause its taking so long to find something as simple as the code to change text color.
mabie i would even like to add a next page to it so u can toggle pages, but i want to take it one thing at a time and try and figure this color thing out first.
i would appreciate any help or advise, thank you.
|
|
|
|
|
How did you write it in C++ and compile it in visual basic?
Visual Basic allows you to change the color by setting the window/form object property...if I remember correctly...it's something like forecolor and backcolor if you want to do it dynamically at run time. Or you can play with the properties though the properties dialog box.
In C++ assuming your using MFC or SDK it's a little different...there is no way to cheat and use a properties dialog box, you have to code it like the first example I gave you in visual basic.
pDC->SetTextColor(RGB(64,128,255)); if your using MFC or
SetTextColor(hdc, RGB(64,128,255)); if your using SDK
As far as setting text colors at the DOS console...thats totally different.
I believe in c, you had to use a library like borlands BGI library..in QBasic...I believe it was the COLOR statement.
This should atleast give you a starting point to work from so long as I understand you correctly anyways...
Cheers
I'm drinking triples, seeing double and acting single
|
|
|
|
|
Hockey wrote:
How did you write it in C++ and compile it in visual basic?
That's what I was wondering too, but actually, I think he means in Visual Studio.
"To know what is right and not do it is the worst cowardice." -- Confucius
FLUID UI Toolkit
|
|
|
|
|
hi,
thank you for your seggustions i will try the out when i get the chance. i think i did mean visual studio... its the program called microsoft visual c++ 6.0. sorry about the mixups im a coding newbie. (n00b alert)
i have edited lots of good code but never really come up with my own program from scratch. I customized quake2.exe to have all kinds of new features, graphics and commands. i made my own mod for quake2 also (thats gamex86.dll). i pretty much did it all with no help or prior experience but now i want to attempt something simple as making my own little program and its a lot harder then i would have imagined.
thanks again
|
|
|
|
|
hockey,
i tried the code you gave me and it worked! thanks a lot man i really appreciate that. the line i entered was..
SetTextColor(hdc, RGB(64,128,255));
theres one thing i was wondering about... theres a white highlight to just the text, i changed the backround and text color but there is still a white backround to the text. im going to try and see if i can switch that color too thanks again.
|
|
|
|
|
SetBkMode(TRANSPARENT)
I'm drinking triples, seeing double and acting single
|
|
|
|
|
eheh got it, i think my line was setbkcolor. i just searched the include files for the settextcolor line, and saw it right above.
the program is set to draw one string. i tried to add another and i cant get it to draw the second one. i was thinking about having it show one little page of info. Then going through the menu or other button and having it display another string of info, kind of like a bunch of pages. any idea on how to do something like that? another thing that would be a cool addition would be a image added to the backround. i saw a ton of functions for the images in the include files and it would be a prayer if i actually found the right function for this.
im gonna keep messing with it though and learn as i go.
-later
|
|
|
|
|
I found this sample program here and
have some problem when the formview
is small enough to display scrollbar.
It prints out the content as well as
the scrollbar. How can i avoid printing
out the scrollbar?
Any help is appreciated.
Thanks
Shin
|
|
|
|
|
Ok i don't know the right terminology for this so this is also included in my question. If i have an IP i want to convert it to a name like e.g. 62.56.23.1 is the same as proxy.parabla.gr (just an example its not real but u know what i mean). How can i do this? Is there a Winsock2 function i can use for this because i think it is all very unclear in the MSDN and i need something that works on Win9x as well as 2000/XP.
Thanks
Kuniva
--------------------------------------------
|
|
|
|
|
|
I have upgraded a VC++ 6 ATL project to VC++ .NET, which went without problem. The problems started however when I tried to get rid of the .idl and .rgs files and use the new attributes directly in the class headers instead. Tons of error messages!!
An example for one of my classes called CSAS:
SAS.h(20) : error C2011: 'ISAS' : 'struct' type redefinition
MyUtil.h(445) : see declaration of 'ISAS'
The project is called "MyUtil" and there seems to be something in the MyUtil.h it doesn't like.
Can some of you talented people out here give me some advice of what might be wrong?
Is there some global project setting that's missing?
|
|
|
|
|
I'new at c++. I trying to write a program that calculates monthly payments. Formula is Payment= rate*(1+rate)n/((1+rate)n-1)*L
rate= monthly interest rate
n=number of payments
L=amount of loan
I get a c2660 error function does not take 1 parameters.
I just can't seem to figure it out.
|
|
|
|
|
iasaber wrote:
Payment= rate*(1+rate)n/((1+rate)n-1)*L
Is this your code? If so, you're missing a couple asterisks:
Payment = rate*(1+rate)*n/((1+rate)*n-1)*L
- Mike
|
|
|
|
|
Does anybody know how to use the $$BEGINLOOP and $$ENDLOOP macros correctly when designing a wizard for Visual Studio 6. I want to use those macros to loop through a list of file names that are defined by macros. I have the following code in my newproj.inf file
$$BEGINLOOP (COUNT) //where COUNT is defined as being a number
empty $$NAME$$.idl //where NAME is a key in the dictionary. There are a number of NAME keys e.g. NAME0, NAME1
$$ENDLOOP
I am the handsome one in the crowd.
|
|
|
|
|
In migrating from VC 6.0 to VC 7.1 I'm running into a problem figuring out how to include stdafx.h into a Win 32 application. After creating an empty project, I changed settings to "Using MFC in a shared DLL". I was able to run the first program in Prosise's MFC Programming book, but received a warning. The program is so small that I'll repoduce it here and then specify the exact problem after it:
// Hello.h
class CMyApp : public CWinApp
{
public:
virtual BOOL InitInstance();
};
class CMainWindow : public CFrameWnd
{
public:
CMainWindow();
protected:
afx_msg void OnPaint();
DECLARE_MESSAGE_MAP ()
};// end Hello.h
////// Here comes Hello.cpp
#include "afxwin.h" // actually used less than & greater than symbol here but needed quotes for this post
#include "Hello.h"
CMyApp myApp;
//////////////////////////////////////////////////////////
//////// CMyApp member functions
BOOL CMyApp::InitInstance()
{
m_pMainWnd = new CMainWindow;
m_pMainWnd->ShowWindow(m_nCmdShow);
m_pMainWnd->UpdateWindow();
return TRUE;
}
///////////////////////////////////////////////////////////
//////// CMainWindow message map and member functions
BEGIN_MESSAGE_MAP (CMainWindow, CFrameWnd)
ON_WM_PAINT()
END_MESSAGE_MAP()
CMainWindow::CMainWindow()
{
Create(NULL, _T("The Hello Application"));
}
void CMainWindow::OnPaint()
{
CPaintDC dc(this);
CRect rect;
GetClientRect(&rect);
dc.DrawText(_T("Hello, MFC"), -1, &rect,
DT_SINGLELINE | DT_CENTER | DT_VCENTER);
}
///////////That's it
This program runs fine as is but I get the following warning during the build:
Compiling...
Hello.cpp
WINVER not defined. Defaulting to 0x0501 (Windows XP and Windows .NET Server)
Linking...
Build log was saved at "file://c:\TEST_MFCProsise\Hello\Debug\BuildLog.htm"
Hello - 0 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 1 succeeded, 0 failed, 0 skipped
///////////////
So then I commented out the afxwin.h include and included "stdafx.h" which, I thought, would take care of the warning. Instead the program would not compile and I received this error:
Compiling...
Hello.cpp
c:\TEST_MFCProsise\Hello\Hello.cpp(1) : fatal error C1083: Cannot open include file: 'stdafx.h': No such file or directory
Build log was saved at "file://c:\TEST_MFCProsise\Hello\Debug\BuildLog.htm"
Hello - 1 error(s), 0 warning(s)
---------------------- Done ----------------------
Build: 0 succeeded, 1 failed, 0 skipped
The stdafx.h file is right where it's supposed to be inside of the atlmfc subdirectory, and MFC applications don't have any problem finding it. What do I have to do to run Win 32 applications using MFC in a shared DLL and including stdafx.h?
Ed
|
|
|
|
|
Silly question - do you have an StdAfx.h file in the same folder as your .cpp and .h files?
If your nose runs and your feet smell, then you're built upside down.
|
|
|
|
|
|
It's always something like that, isn't it?
If your nose runs and your feet smell, then you're built upside down.
|
|
|
|
|
Containers is a collection in the DAO Object Model. Using it we can enumerate containers in an access database (we can find objects which are not part of DAO such forms and reports). The documentation says :
1. We can add "custom containers" to an access database
2. We can't use DAO for this purpose
The Containers collection does'nt include an Append Method like other collections. It can be used only for enumerating the containers.
Access can add custom collections and use them (forms, reports, scripts, ...).
My Question is : what can this be done ?
Please help !!! It's critical to my current project.
Best regards !!!
|
|
|
|