|
You could try to get a window handle for the toolbar (use Spyxx to help you) and then send TB_DELETEBUTTON messages to delete specific buttons from the toobar. I can't guarantee that it will work, but it's most likely to.
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
one problem when i'm doing find&replace in vs6.0 with regexp.. i can't get the quantifiers to get "nongreedy" (this term is from uwe keim's "introduction to regexp").
normally the letter "?" should work.. but not for me..
any ideas?
<br />
fun (char sz1[], char sz2[], char sz3[]);<br />
change to
<br />
fun (const char* sz1, const char* sz2, const char* sz3);<br />
<br />
Find: char \(.*\)\[\]<br />
Replace: const char *\1 <br />
is greedy..
<br />
find: char \(.*\)?\[\] <br />
or
<br />
Find: char \(.*\)\?\[\]<br />
don't work for me..
"I'm from the South Bronx, and I don't care what you say: those cows look dangerous." U.S. Secretary of State Colin Powell at George Bush's ranch in Texas
|
|
|
|
|
The following regex worked for me (using VS7.0; VS6.0 may be different):
<br />
char {.@}\[\]
- Mike
|
|
|
|
|
Instead of \(.*\)\[\] use \([^[]*\)\[\] . This is the same except instead of matching any character, it matches non-'[' characters, thereby terminating when it reaches the '[' character.
Hope this helps,
Ryan
Being little and getting pushed around by big guys all my life I guess I compensate by pushing electrons and holes around. What a bully I am, but I do enjoy making subatomic particles hop at my bidding - Roger Wright (2nd April 2003, The Lounge)
Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late - John Nichol "Point Of Impact"
|
|
|
|
|
I need to transfer data via TCP/IP. Data is a classes(30 classes derived from 1). If i send class, how client knows, what type of class is?
What technology need i use?
Platform Win2000,VisualStudio6.0
Sorry for my English.
|
|
|
|
|
Check out ready to use packages like
TIB/Rendezvous
.Net remoting
|
|
|
|
|
If you were to Serialize it over the wire, the client could deserialize it, assuming that the classes exist on the client. See CSocketFile for more info.
onwards and upwards...
|
|
|
|
|
Hi,guys
three days ago I post my question about transmit files by Serial Ports here.
"I have a question when I was writing the program about serial communication.
It seems that most articles about serial communication are wrote to the characters transmission.But now I want to transmit files by serial ports,how could I do that.I mean "transmit files" is that copy files on a PC to another.
Is there anyone could give me a method to do that? Thanks very much. "
Now I have map the file to the memory ,and could write it to the cache of serial ports,and can read the content of the file.but my purpose is copy files form a PC to another.So......anyone could help me again?
YES, I am here.
|
|
|
|
|
Attach to the transmitted data header of a file and transfer all this, and let the receiver will create a file by header and will write in him data.
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Thanks your reply.but I can not understand what is "Attach to the transmitted data header of a file ".what is header?
YES, I am here.
|
|
|
|
|
You're must from file's header create your own header (name, extension, date, attributes etc.) as data and add it to begin data from file.
After this you can transmit this packet through serial port.
Receiver must extract header from packet and create file on disk. And after this you must put the file's data from the packet to him.
Best regards,
Eugene Pustovoyt
|
|
|
|
|
Greetings
I have a Rich Edit control for my app which I am using to Syntax Colorize SQL language whenever one SQL is opened in the editor.
On every EN_CHANGE, i am lexing the SQL and colorizing it accordingly.
The code I am using are -
code:
----------------------------------------------------------------------------- if ( HIWORD ( pWPARAM ) == EN_VSCROLL ) {
if ( pCQueryWnd->pCQueryEdit->uHiliting )
return 0;
PostMessage ( pCQueryWnd->pCQueryEdit-uHWND, UM_CONTENT_CHANGE, 0, 0 );
}
-----------------------------------------------------------------------------
This is written in its Parent Window WndProc.
In the WM_VSCROLL message of the window I am having the following code snippet -
code:
------------------------------------------------------------------------
case WM_VSCROLL:
if ( !pCQueryEdit->uHiliting )
PostMessage ( pCQueryEdit->uHWND, UM_CONTENT_CHANGE, 0, 0 );
break;
-----------------------------------------------------------------------------
I need to process VScrolling as I am doing only screenfull of highlighting for optimizations. Therefore whenever a user is pressing the Scroll button I am again Lexing screenful of text and colorizing it.
Before highlighting I am using the following functions
code:
----------------------------------------------------------------------------- pDoc->Undo( tomSuspend, NULL ); // dont record this into the undo stack
pDoc->Freeze(&f);
-----------------------------------------------------------------------------
After highlighting I am using
code:
----------------------------------------------------------------------------- pDoc->Unfreeze(&f);
pDoc->Undo( tomResume, NULL );
-----------------------------------------------------------------------------
In between I am highlighting part of text using the following method
code:------------------------------------------------------------------------ ITextRange * textrange;
ITextFont * font;
pDoc->Range ( pStart, pEnd, &textrange );
textrange->GetFont ( &font );
font->SetForeColor( pColor );
font->Release();
textrange->Release();
-----------------------------------------------------------------------------
The problem is that VScroll does not work properly. IF I stop colorizing everything starts working.
If I use the Mousewheel everything is working perfectly
Note : This problem only happens when the screen is in the first line. I cant seem to scroll the first line up the edit client window. After I have moved the first line up using some other method ( keys or mousewheel ), everything seems to work fine and scrolling is done as expected.
Any ideas....
|
|
|
|
|
I do not know how you handle the positions of the text you highlight, but I remember having had trouble while using int instead of long int to retrieve some text position.
Maybe the cursor is also not at the proper place (just like if you click on the last line, and then move the scrollbar to the top using the mouse, the cursor position is still on the last line, making it acting weird if you hit an arrow key).
~RaGE();
|
|
|
|
|
I have a MDI application whenever I am opening a modal dialog box which is a child of a MDI window, my application seems to be lost from the Alt+Tab program list of Windows? I am using WinAPI and DialogBoxParam() function to create the dialog.
Why is it happening? Any ideas how to resolve it.
|
|
|
|
|
Shouldn't the modal dialog be a child of the main app window? The parent window should be AfxGetApp()->m_pMainWnd.
onwards and upwards...
|
|
|
|
|
I am using Win32 API's.
You mean to say that instead of sending the MDI Child Window as Parent for the dialog I send the Main App Window handle as the parent.
|
|
|
|
|
Well...I tried changing the parent window but its not working.
It seems that whenever I am doing Alt+Tab, both the dialog window and the main app window loses focus and perhaps that is causing the problem.....
|
|
|
|
|
Well....the app is there if I switch between apps 1-2 times...then its GONE!!!!
|
|
|
|
|
I want to generate reports in VC++.
Can I use crystal reports in VC++. or if there is way other than this to make the reports?
|
|
|
|
|
Does anyone here know how to use the Shockwave Flash OCX in a dialog. I'm not sure which wrapper functions to use to get the thing working.
I'm using VC++ 7 with MFC. I have Macromedia Flash 5.0.44.0 installed and I can play Flash in IE6.
I want to create a dialog box that plays a Flash (.swf) file. I inserted the Shockwave Flash ActiveX (OCX) control into my dialog. VC++ added an IDispatch wrapper class, CShockwaveflash, to my project and to the dialog class. My dialog is defined like this:
class CMyDlg : public CDialog<br />
{<br />
DECLARE_DYNAMIC(CMyDlg)<br />
<br />
public:<br />
CMyDlg(CWnd* pParent = NULL);
virtual ~CMyDlg();<br />
<br />
enum { IDD = IDD_MYDIALOG };<br />
<br />
protected:<br />
virtual void DoDataExchange(CDataExchange* pDX);
virtual BOOL OnInitDialog();<br />
<br />
DECLARE_MESSAGE_MAP()<br />
public:<br />
CShockwaveflash m_FlashCtrl;<br />
};
In my implementation....
BOOL CMyDlg::OnInitDialog()<br />
{<br />
if (CDialog::OnInitDialog())<br />
{<br />
m_FlashCtrl.put_Movie(_T("sample.swf"));<br />
m_FlashCtrl.Play();<br />
return TRUE;<br />
}<br />
return FALSE;<br />
}
When I run the dialog, the OCX shows the default background but no flash video. I can't find any documentation on using this OCX, even at Macromedia.
Any sample code that works?
thanks in advance,
Andrew
|
|
|
|
|
Hi
Give the full path of swf file ( m_FlashCtrl.put_Movie(_T("c:\sample.swf")); ) and try.
Best wishes..mil10
|
|
|
|
|
Thanks, that fixed it (with backslashes appropriately escaped, "c:\\flash\\sample.swf").
I had previously tried ".\\sample.swf" to force it to read from the current directory, but that didn't work. So perhaps the full path is always required by Flash.ocx !?
cheers!
Andrew
|
|
|
|
|
This is my first post here, so I am going to see if there is anyone out there who can help me...
I am reading (converted excel) data into a List Control in Report format. The data consists of Numbers and characters. It looks like this coming in:
--- Data in ----
15.568 Mark/ Tompson/ SALES/ NYC/ 1553.61 1382.15 14.07
15.024 Sean/ Erickson/ SALES/ BOS/ 1378.05 1266.65 13.25
14.553 Adrian/ Washington/ MGT/ KAN/ 1304.61 1162.28 10.52
13.451 Jason/ Johnston/ DIST/ SEA/ 1200.14 1034.99 09.75
I added the "/" at the end of the Chars so that I could use the command below in the code to read them in. My problem is - in my List Control window I have a "|" symbol infront of the strings i.e.
-- List Control out ---
15.568 |Mark |Tompson |SALES |NYC 1553.61 1382.15 14.07
15.024 |Sean |Erickson |SALES |BOS 1378.05 1266.65 13.25
14.553 |Adrian |Washington |MGT |KAN 1304.61 1162.28 10.52
13.451 |Jason |Johnston |DIST |SEA 1200.14 1034.99 09.75
How can I get rid of the "|"? <---This is my problem.
--- Code ---
<br />
double f1, f6, f7, f8,;
char f2[20], f3[20], f4[20], f5[20];
ifstream inf;<br />
inf.open("Testdata.txt");
<br />
int total=0;<br />
<br />
for (int i=1; i < 200; i++){
<br />
inf >> f1;
<br />
inf.getline(f2,20,'/');
inf.getline(f3,20,'/');
inf.getline(f4,20,'/');
inf.getline(f5,20,'/');
<br />
inf >> f6 >> f7 >> f8;
<br />
total = total + i;<br />
<br />
int nItem;<br />
<br />
Quality = f1;<br />
_gcvt( Quality, precision2, str_Quality );
nItem = m_List.InsertItem(0,str_Quality);
m_List.SetItemText(nItem,1,f2);
m_List.SetItemText(nItem,2,f3);
m_List.SetItemText(nItem,3,f4);
m_List.SetItemText(nItem,4,f5);
Sales = f6;<br />
_gcvt( Sales, precision2, str_Sales );<br />
m_List.SetItemText(nItem,5,str_Sales);<br />
Evaluation = f7;<br />
_gcvt( Evaluation, precision1, str_Evaluation );<br />
m_List.SetItemText(nItem,6,str_Evaluation);<br />
Performance = f8;<br />
_gcvt( Performance, precision1, str_Performance );<br />
m_List.SetItemText(nItem,7,str_Performance);<br />
m_List.SetItemData(nItem,(DWORD)new CListViewInfo(Quality,f2,f3,f4,f5,Sales,Evaluation,Performance));
<br />
}<br />
<br />
inf.close();<br />
return 0;<br />
<br />
<br />
return FALSE; <br />
}<br />
---- End Code ---
Anyone who can help me ... thank you for your time.
|
|
|
|
|
Can you give more remarks about your codes.
For example,
inf.getline(f2,20,'/');//To store characors less than 20, ending when meeting '/'
inf >> f6 >> f7 >> f8;//??????
_gcvt( Quality, precision2, str_Quality );//Converts a floating-point value to a string, which it stores in a buffer.
.....
But I can give you a suggestion, you can Step-Debug to find the errors.
|
|
|
|
|
Ok, I added some comments. If those comments are not enough, let me know and I will add more. Thank you.
I wish I could type better ...
|
|
|
|
|