|
hi
is it possible to send a BSTR to a method expecting a _bstr_t?
|
|
|
|
|
void function(_bstr_t string);
BSTR BSTR_string;
function(_bstr_t(BSTR_string,true)); The bool argument to the _bstr_t constructor specifies whether you want to copy the string or simply attach it to the _bstr_t object you're creating.
Software Zen: delete this;
|
|
|
|
|
The task is to create non-title dialog which allows user to move it arround the desktop.
As we all knew, user can move the normal dialog by click left button and drag the mouse while it is in the Title area. My dialog have no title, how I can perform the task.
I have tried to handle events WM_LBUTTONDOWN and WM_MOUSEMOVE in the WindowProc procedure of the dialog.
I can move the dialog, but the problem is:
The dialog can't move smoothly. It is flicking
Does any one help me to handle the task better?
Thanks very much
TDH
|
|
|
|
|
Add a handler for WM_NCHITTEST and just return HT_CAPTION .
UINT CMyDlg::OnNcHitTest(CPoint point)
{
return (HTCAPTION);
} /ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I'll have to remember that one.
Software Zen: delete this;
|
|
|
|
|
I been working on this clock replacement program because I never find
any open source ones.
I been having problem with the code and cant find a way to auto
update/refresh my systray to fit my clock replacement.
I already looked all over google and news groups.
Take a look at those pics
before I run the program
http://69.50.187.114/~area51/before.gif
after I run the program = notice I lost my AIM icon.... it overlapped
the AIM icon.
http://69.50.187.114/~area51/after.gif
my program is MFC based.
I decided to include my code for people to take a look at.
http://69.50.187.114/~area51/Start_Button_Clock_Changer.zip
Click on the "Change Clock" button on the dailog. you will see what I
mean.
|
|
|
|
|
What would be the best method for printing to the screen without flickering? I tried using GDI but it still flickers.
I want to *draw* lines to the screen. The only prob is that I want it intended to be run with a DirectX game which flickers every second.
What would be the best way to do it?
|
|
|
|
|
|
Using IsClipboardFormatAvailable function to check CF_OWNERDISPLAY
if (IsClipboardFormatAvailable(CF_OWNER_DISPLAY))
{
//Process...
}
Thanks in adavnce
|
|
|
|
|
Is there a question in here some place?
|
|
|
|
|
Using IsClipboardFormatAvailable function to check CF_OWNERDISPLAY
if (IsClipboardFormatAvailable(CF_OWNER_DISPLAY))
{
//Process...
}
Thanks in adavnce
|
|
|
|
|
I have a dialogue box which works fine then I add a CRichEditCtrl then it fails to create.
Any suggestions ?
This is VC6.0 by the way.
Thanks.
Elaine
The tigress is here
|
|
|
|
|
Did you init the richedit control with AfxInitRichEdit2()?
|
|
|
|
|
|
Tom,
thanks, I put AfxInitRichEdit() in InitInstance() and it works.
Elaine
The tigress is here
|
|
|
|
|
You're very welcome, Tigress. - K loves the nick, by the way
|
|
|
|
|
Hi everyone,
I'm creating an edit box as child window of a list view ctrl to edit a subitem's text. When the edit box is created, it is invisible, although it has the WS_VISIBLE style set... I have to press some key to change the text of the edit box to make it visible.
What is wrong?
Regards,
Alex
Don't try it, just do it!
|
|
|
|
|
Add the WS_BORDER style, debug the CreateWindow function, if no error succed, and the problem persist, try using ShowWindow function.
|
|
|
|
|
I did, but that didn't change anything
CreateWindow does succeed, but the control is still hidden until I press a button to change it's text.
Don't try it, just do it!
|
|
|
|
|
Hi,
Try the SetWindowPos() function,and set its position on top of your listbox:
YourEditBox.SetWindowPos(&CWnd::wndBottom, 0, 0, 0, 0,
SWP_NOMOVE|SWP_NOSIZE);
Regards,
Eli
|
|
|
|
|
Hi everybody.How can i get the entire path of an aplication when its excecuted??. For example, when the user runs my aplication, i want in the WM_CREATE message, call the function GetAppName created by my and get C:\....\myApp.exe
|
|
|
|
|
CString GetExePath()
{
CString str;
TCHAR szEXEPath[MAX_PATH];
GetModuleFileName ( NULL, szEXEPath, MAX_PATH );
str = szEXEPath;
CString s1,s3;
int pos = str.ReverseFind( '\\' );
CString s2;
s2 = str.Left( pos+1 );
return s2;
}
This should get you started.
|
|
|
|
|
|
No problem good luck coding.
|
|
|
|
|
While smesser's technique works (using the reversefind), I prefer using the _splithpath so here's an alternative:
TCHAR buff[MAX_PATH];
GetModuleFileName(NULL, buff, MAX_PATH);
char drive[2];
char dir[MAX_PATH];
char fname[MAX_PATH];
char ext[MAX_PATH];
_splitpath(buff, drive, dir, fname, ext);
|
|
|
|