|
Hi,
When using icons into resource editor, look for the "transparent color" into the palette.
Everything's beautiful if you look at it long enough...
|
|
|
|
|
Hi
I cannot seem to find the option of "transparent color" in the palette. Can you please give more details.
Thanks
|
|
|
|
|
Hi,
I use Visual Studio.NET so I don't really know how to open it in other developpement environment. Here for VS.NET...
I assume that you already have opened a icon resource into the resource editor. If you select the icon, you are supposed to see your icon with a palette toolbox. If you don't see the toolbox, you can make it display by clicking "image" in the main menu and selecting "show color menu".The transparent color is represented by computer-shaped color box.
hope that help.
Everything's beautiful if you look at it long enough...
|
|
|
|
|
Dear All,
I am developing an application in which I require a "tree control with checkboxes".
The structure of tree control is as:
Main_Root
Child_1
Child_2
Child_3
Child_4
Child_5
Child_6
ie. simple tree having one main root and having many child items.
I have two problems related to it.
1)
All child items should be checked to TRUE whenever we click checkbox of 'root 'item and vice-versa. How to proceed for it ???????
I mean to say that which event should I capture for this.( ie. TVN_SELCHANGING )
2)
Is there any way to disable a particular check-box in tree control.
Please send some code for this if possible.
Thanks in advance.
Rohit
|
|
|
|
|
Hi Rohit
I have no practical experience with checkboxes in tree, but have worked a lot with trees otherwise, but I think I might be able to help you. For your first question, you can do the following steps
1. Once you click the root item you can traverse the children and then the subsequent siblings with a HTREEITEM. First use treename.GetChildItem(/*HTREEITEM*/ hItem) and check it, then you can use a while loop to check all other siblings by using treename.GetNextSiblingItem(/*HTREEITEM*/ hItem)
Try out the above suggestion, if you need help then please do let me know
Ankush
|
|
|
|
|
Hi friends
I want to pass a SAFEARRAY of BSTR from a unmanaged code to a managed assembly. My constraint is I can accept just an IntPtr in the managed code. I tried passing SAFEARRAY*, but could not convert it to Array or string[] in the managed code. Can anybody suggest how to achieve it?
vikram
|
|
|
|
|
hi there..
i am enabling mfc in an activex control and what happens is that when i debug it ..it throws an access violation in OLE32.lib..
dont know why..ne ideas?
regards
safee
|
|
|
|
|
hello
i work on MFC project SDI,and i have add to my window a new DIALOGBAR ,and i want to add in it some control like slider and button but i have a problem how i can get message from a slider because the new DIALOGBAR is child and not main and one of this problem is:
when i add slider and one EditBox and i want to watch the progression number of the slider in the Edit no thing happned.
can you help me please?????
|
|
|
|
|
Hi,
Because the dialogbar is a child, you have to catch the message from the slider control into the parent window.
You have to catch the slider message with onHScroll() or onVScroll().
So into your parent window (probably the mainframe) you can put into your mainframe.h:
CSliderCtrl myslider;
and
void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
into your
mainframe.cpp
DDX_Control(pDX, IDC_MYSLIDER, myslider);
ON_WM_HSCROLL()
and
void mainframe::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar)
{
CSliderCtrl* slider = (CSliderCtrl*) pScrollBar;
int position = slider->GetPos();
OnHScroll(nSBCode, nPos, pScrollBar);
}
so after having the position, you can put the value into the edit box.
It's up to you from now
bye
Everything's beautiful if you look at it long enough...
|
|
|
|
|
i was made all what you tell me but it have an error in DDX_Control(pDX, IDC_MYSLIDER, myslider);
it's ask that pDX undeclared identifier,why?and when i must put it in the constructor or where exactely.
|
|
|
|
|
Hi,
DDX_Control(pDX, IDC_MYSLIDER, myslider);
into DoDataExchange(CDataExchange* pDX)
ON_WM_HSCROLL()
into the MessageMap
bye
Everything's beautiful if you look at it long enough...
|
|
|
|
|
Hi,
I am using Microsoft DataControl Grid 6.0. While clicking on a cell, I have to display a combo Box in that cell.
The width and height of the combo box should be the same as the cell.In the grid ,the column and row size are resizable.But the combo Box placement and size both are not coming properly. I have used the following code.Help me.
CRect objRect;
float nRowHeight = m_DBgrid.GetRowHeight();
float nDataColLeft = objDataGridColumn.GetLeft();
float nRowTop = m_DBgrid.RowTop(nRowNo);
float nColWidth = objDataGridColumn.GetWidth();
CRect objRect1;
m_DBgrid.GetWindowRect(objRect1);
ScreenToClient(objRect1);
objRect.left = (int) (objRect1.left + 22);
objRect.top = (int) (objRect1.top + (-nRowTop) + (nRowNo + 2) * 2 ) ;
objRect.right = (int) (nColWidth + 22);
objRect.bottom = (int) (nRowHeight + objRect.top);
m_cCombo.ShowWindow(SW_SHOW);
m_cCombo.SetWindowPos(NULL, objRect.left, objRect.top, objRect.right, objRect.bottom, SWP_SHOWWINDOW);
m_cCombo.SetItemHeight(-1,(int)(nRowHeight - 1));
|
|
|
|
|
Hello!
I have a little problem: I want to access an acount on the web(using IE), from my Visual C++(6) application, knowing the url, user-name & password.
For example:
url: http://mail.yahoo.com
user: dorutzu
pass: the_password
All I want to happen is a new browser window to appear with my account opened in it.
Any ideea how this can be made possible(for any web-site)?
Thank you in advance...I'm waiting for your answers here or eventualy at dorutzu@yahoo.com
|
|
|
|
|
Search MSDN for IE Automation.
|
|
|
|
|
Unfortunately, that did'n help too much...if you could be a little more specific... 10x
|
|
|
|
|
|
void CHtmlView::Navigate2( LPCTSTR lpszURL, DWORD dwFlags = 0, LPCTSTR lpszTargetFrameName = NULL, LPCTSTR lpszHeaders = NULL, LPVOID lpvPostData = NULL, DWORD dwPostDataLen = 0 );
I assume that the login page uses a , so you need to construct the post data parameter block and pass it as the lpvPostData param. As for opening in new window, see the lpszTargetFrameName param.
|
|
|
|
|
hello friends,
i have to incorporate communication in my vc++ application, for this i have to execute SCP script through VC++ code.Pls give me idea how to do it.
thanks
|
|
|
|
|
Service Control Point?
If this is just a file, will ShellExecute() or CreateProcess() work for you?
|
|
|
|
|
i tried to use following code to execute a .scp file :-
#include <afxwin.h>
#include <iostream.h>
void main()
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory(&si,sizeof(si));
si.cb = sizeof(si);
ZeroMemory(&pi,sizeof(pi));
//TCHAR szCommandLine[] = TEXT("Notepad");
//start the child process
if(!CreateProcess(NULL,"c:\\WINNT\\system32c\\ras\\testscp.scp",
NULL,
NULL,
FALSE,
0,
NULL,
NULL,
&si,
&pi)
)
{
cout << "creating process failed\n";
return;
}
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
but it is not invoking the ,c:\\WINNT\\system32c\\ras\\testscp.scp ,file.Howere if i simply invoke "Notepad" or "windeff"instead of above file ,it worked.
Pls suggest me how to execute a .scp saved in a given folder.
regards
akshay
|
|
|
|
|
Can you run c:\WINNT\system32c\ras\testscp.scp from a command prompt or the Start/Run box? If not, you won't be able to run it from code either.
|
|
|
|
|
hi,
i am able to invoke c:\winnt\system32\ras\testscp.scp through start|run but it is not working in CreateProcess(NULL,"c:\\winnt\\system32\\ras\\testscp.scp",............)
|
|
|
|
|
Then you will also need to supply the name of the application that is associated with .SCP files. This can be done in either the first or second parameter.
|
|
|
|
|
|
hello
i use the class CWinApp and the run methode to start my apllication ,and i want to add a button for suspend and re-run the apllication.
how i can make that?
|
|
|
|