|
How will I be able to call VB forms and get along with their forms and dialogs? is it possible? if not, is there a way to link VB and VC++ together?
|
|
|
|
|
as far as i know there is not
direct way to use a form created by VC
in a VC++ application.
If u get to know inform me also.
U can create an Active X and then use it .
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
I just found out that using COM/ATL will allow you to make dll files in VC++ to be used and called by VB.
|
|
|
|
|
Hi,
I am doing a project in win32. I need to delete a registry key and before that I want to set the permissions of that particular key to be able to delete it.
how do I set the permissions and what permissions do I set in order to delete the key.
Pls help.Thanks.
|
|
|
|
|
Something like this comes to mind:
RegOpenKeyEx()
GetSecurityInfo(hKey, ...)
BuildExplicitAccessWithName(..., DELETE, GRANT_ACCESS, CONTAINER_INHERIT_ACE)
SetEntriesInAcl(1, ...)
SetSecurityInfo(hKey, ...)
RegCloseKey(hKey)
RegDeleteKey()
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
That's an odd situation you're describing. You're saying that you don't have permission to delete the key, but you do have permission to change the permissions?
|
|
|
|
|
Hi
I copied source files and its interfaces from one project to another , and even I've copied the Dialog resource.When I compile it gives errors
error C2065: 'IDC_MASS_RANGE_PANEL' : undeclared identifier
'IDC_MASS_RANGE_MIN_BOXES' : undeclared identifier
The source code is
m_rangeLabelsPanel->Create("", WS_VISIBLE | WS_CHILD, rect, this, (IDC_MASS_RANGE_PANEL));
The only solution I do is to modify the resource.h file each time I get this error with some random numbers.Is it the correct way? Is there anything I must change ? any help is highly appreciated..
|
|
|
|
|
Did you copy or cut and paste the needed entries from resource.h?
Dave
|
|
|
|
|
I copy it but chnage the number as the number sometimes clashes with other..!
|
|
|
|
|
sunguy wrote:
I copy it but chnage the number as the number sometimes clashes with other..
Do u check our Identifier is defined in your header or cpp file or not?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Did you #include "resource.h" in the source or header file?
|
|
|
|
|
Hi there!
I have a derived class from CFormView, and sice this form needs to load lots of data, I would like to show a progress bar that is already in the form.
If I do the load and show the progress in the OnInitialUpdate(), I cannot see the progress going!
I've tried to do a PostMessage in the OnInitialUpdate, and manage the message afterwards... but no progress in sight!
I also tried to do a PostMessage in the OnShowWindow when the bShow is TRUE. Again not yet visible!
Does any one knows what message should I catch after the form is visible?
I'm using a variable to count if its the first time I have a Paint... but it seems that its not the way to do it...
Thanks for your time in advance.
|
|
|
|
|
why not use a splash screen?
|
|
|
|
|
Yes it could be. And I also could use a dialog with a progress, which I already have.
But, I don't want them! Besides, the problem remains, and I don't want a workarround (wich I already have, via the WM_PAINT).
The real problem is: why do I get a WM_SHOWWINDOW message and the form is not visible? What message sould I expect after the form is shown?
I don't want a workarround, just to understand the message sequence...
ALMC
|
|
|
|
|
Hello everybody,
I am writing a simple application in MFC , similar to Spy++ Utility , that displays different information about chosen window.
I want to draw that black rectangle(like in Spy++) over windows ,when mouse is over that window. I manage to draw it , but when i move mouse to another window the rectangle stays on the previous window and on the new also.
I used to store previous windows handle and when the mouse was over another window i used to call the Invalidate() function for the previous window.
For some strange reasons this worked on 90% of the windows , there were some windows where the rectangle stayed partialy.
Can anyone suggest me any another way of achieving this??
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
Look here:
http://www.codeproject.com/dialog/windowfinder.asp
Human beings were not meant to sit in little cubicles staring at computer screens all day, filling out useless forms and listening to eight different bosses drone on about about mission statements. -- Peter Gibbons
|
|
|
|
|
I've seen this article already , but this program is written in with Win32, and i could not implement the technique Lim is using there in MFC
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
Giorgi Moniava wrote:
...this program is written in with Win32, and i could not implement the technique Lim is using there in MFC
Why not?
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
|
thanks alok
"Success is the ability to go from one failure to another with no loss of enthusiasm." - W.Churchill
|
|
|
|
|
Giorgi Moniava wrote:
thanks alok
Mention Not Buddy
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Here is a server that receice UDP visit.
The parameters of socket include the destination IP address and port.
Moreover, how to get the source IP address and port?
Thanks!
|
|
|
|
|
If you're using accept , the second parameter is an optional pointer to a structure that contains source information.
|
|
|
|
|
Hi folks!
I'm working on a MFC project and i've got a question to make. The project i'm involved in, is a dialog based aplication. So, the Wizard took the first steps of the work. I'm basing the program on an example that has been created entirely programming, and it makes reference to a HWND handle variable that is necessary to pass to one of the methods.
The code is like this:
Code:
HRESULT CText::BlendText(HWND hwndApp, TCHAR *szNewText)
{
LONG cx, cy;
HRESULT hr;
CSubtitlesDlg dialog;
// Create a device context compatible with the current window
HDC hdc= GetDC(hwndApp);
HDC hdcBmp = CreateCompatibleDC(hdc);
// Write with a known font by selecting it into our HDC
HFONT hOldFont = (HFONT) SelectObject(hdcBmp, g_hFont);
// Determine the length of the string, then determine the
// dimensions (in pixels) of the character string using the
// currently selected font. These dimensions are used to create
// a bitmap below.
int nLength, nTextBmpWidth, nTextBmpHeight;
SIZE sz={0};
nLength = (int) _tcslen(szNewText);
GetTextExtentPoint32(hdcBmp, szNewText, nLength, &sz);
nTextBmpHeight = sz.cy;
nTextBmpWidth = sz.cx;
// Create a new bitmap that is compatible with the current
//window
HBITMAP hbm = CreateCompatibleBitmap(hdc, nTextBmpWidth,
nTextBmpHeight);
ReleaseDC(hwndApp, hdc);
// Select our bitmap into the device context and save the old one
BITMAP bm;
HBITMAP hbmOld;
GetObject(hbm, sizeof(bm), &bm);
hbmOld = (HBITMAP)SelectObject(hdcBmp, hbm);
...
I make a reference to this method in another class like this:
Code:
hr = Text.BlendText(___________, Text.g_szAppText);<- I need to know what to put in here
Does anybody know which method do i need to use in order to get this handle to the window i'm working with? I wonder if the question is clear, but i'll try!! Many thanks. Serj.
|
|
|
|
|
Did you try
AfxGetMainWnd()->m_hWnd
John
|
|
|
|