|
do you have any commandline parameters set in ide...
greatest thing is to do wot others think you cant suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
Nope, no parameters are set. I think the framework creates a new document within the call though so I guess somewhere in there, I'm doing something dodgy. I'll have another look tomorrow (if I get over this stupid tummy bug!).
Success is 99% failure
|
|
|
|
|
You can do a release build with debugging information. Single stepping can be 'odd' and the debugger can get confused about variable names (sometimes they have been optimised away, for example) but being able to see the call stack etc can be invaluable.
Paul
|
|
|
|
|
hi, i have an edit box and a button add on a tab...im trying to have it where if a user press enter in the edit box it will execute the button add (call on the add function which the button is mapped to)..how can i do this?
i've tried onchar event for that dialog and it's not detecting when i type in that edit box...
one other thing, im using microsoft commondialog activex...how can i detect if the user press CANCEL or OK
thanks alot for your help
|
|
|
|
|
Set the BS_DEFPUSHBUTTON style of the button.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
Make sure that the following propertty so not set for the edit box.
ES_WANTRETURN Specifies that a carriage return be inserted when the user presses the ENTER key while entering text into a multiple-line edit control in a dialog box. Without this style, pressing the ENTER key has the same effect as pressing the dialog box’s default pushbutton. This style has no effect on a single-line edit control
I hope it helps
Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs
|
|
|
|
|
the default button is already set on and want return for the edit box is not checked, still same problem, any other suggestions? thanks
|
|
|
|
|
HI r00k13, i cant say for sure what is wrong but just try this. If it works, its gud 4 u.
When u create a dialog box in the Dialog Editor, u r provided with two default buttons -OK & CNACEL. The proerty you are asking for is also present by default. (I have checked on my system, it is there even when u make a multiline edit box in the dialog). The OK button is clicked(OnIDOK() is called) when we press the "RETURN" key.
It may be the case that you have deleted the default OK button and you have currently set a new button(that u hav created) as default. If it is so, change the ID if ur default Button from whatever it is currently, to IDOK. It may solve ur problem.
Just giv it a try. Tell me if it works.
...Avenger
Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs
|
|
|
|
|
Hello there. I am developing a simple 4-track sequencer using MFC, DirectMusic and DirectSound, under Windows 98. All is going well, however there is one thing I need my app to do and I have no idea how to do it!
To prevent playback glitches there must have be a different audio file loaded on each track (it's a one-file per track sequencer), so to stop the user being able to load the same file on different tracks I need to filter out a loaded file's entry from the Open File Dialog (I am currently using a standard CFileDialog object). How is this done?
Any help is much appreciated!
|
|
|
|
|
I reckon you'll need to write your own dialog, unless you get nasty and mark files as hidden when they are opened, and remark them when they are closed. Note, I am NOT recommending this approach. what happens to the files if the power cuts out while the program is running ?
Christian
I have drunk the cool-aid and found it wan and bitter. - Chris Maunder
|
|
|
|
|
A dialog box that I'm using as a child control is receiving windows message 0x0127. I can't find anything in the MSDN documentation on it and the Microsoft Spy++ application shows it as "unknown".
Does anybody know what this message is defined as?
The dialog contains several controls including three COM controls. The message seems to be received anytime the standard tree control processes a WM_KEYDOWN message. Operating system is WinNT 4.0 SP6.
|
|
|
|
|
Hey, u needa improvr ur search skills(dont mind!;P)
This is what i found out:
BizTalk Server 2000 Error Messages
The BizTalk Messaging Configuration object model error messages defined by BizTalk Server can be used in your application by including the bts_config_errors.h file located in the BizTalk Server installation directory at \Program Files\Microsoft BizTalk Server\SDK\Include. These error messages, returned during design time by the methods and properties of the object model, contain a BTS_ prefix in the message name. All other errors occur during run time, while BizTalk Server is processing a document.
The following table contains both design time and run time errors.
Message name
CIS_E_RECEIVING_INTERCHANGE_FAILED
Value
0x0127
Description
The specified interchange was not received.
See for urself at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/biztalks/htm/lat_sdk_errmsg_axsh.asp[^]
Remember... testing & debugging are always part of programming ...so exterminate those stinking bugs
|
|
|
|
|
My search DID reveal the information you describe, however, we are not using BizTalk Server in house.
The message, 0x0127, is received on the message queue of my dialog. Are you familiar with BizTalk or did you just search on "0x0127" as I did? If you are familiar with BizTalk, can you explain why I would be getting a BizTalk error value in a dialog message queue when we don't have it implemented here?
I searched MSDN for "CIS_E_RECEIVING_INTERCHANGE_FAILED" and the only hits I got were the same error message lists. I searched Google for "CIS_E_RECEIVING_INTERCHANGE_FAILED" and it listed a single link to the same error message list in MSDN.
|
|
|
|
|
I am using enhanced metafiles in my MFC app to display simple, small, one colour images. The images themselves are pre-created in another drawing package. I was wondering whether it was possible to change the colour of the image prior to display on the screen....say from black to red. An example of the drawing function is given below:
code =============================================
void CSediStructure:: Draw(CDC* pDC)
{
// Get the metafile
HENHMETAFILE hemf = GetEnhMetaFile(m_sfStructureFile);
// Get a HANDLE to the device context
HDC hDC = pDC->m_hDC;
// Store the current WorldTransform structure
XFORM oldXForm;
GetWorldTransform(hDC, &oldXForm);
// Set the graphics Mode to "Advanced" so we can Transform the metafile if necessary
int nOldGraphicsMode = SetGraphicsMode(hDC, GM_ADVANCED);
// Perform any transforms (rotation)
if(m_dRotationAngle != 0)
Rotate(m_dRotationAngle, m_nAnchor, hDC);
// "Play" the metafile to the screen
PlayEnhMetaFile(hDC, hemf, m_BoundingRect);
// Free metafile resource and reset the graphics mode
DeleteEnhMetaFile(hemf);
SetWorldTransform(hDC, &oldXForm);
SetGraphicsMode(hDC, nOldGraphicsMode);
}
code =============================================
I've found the MSDN info on functions like GetEnhMetaFilePaletteEntries() but I'm not sure how it all works and whether I can actually do what I want to do.
Any help would be appreciated.
thanks
JezzerP
___________________________
Jeremy Preston
|
|
|
|
|
I am not sure what the rotate stuff is about, shouldn't that come after you play the meta file. Any way, you can use the GetPixel and set Pixel function to actualy change the colors for the pixels, since it should be in device compatible format. I know there are other ways (much faster ways) to accomplish what you want, but then things may get a bit more complicated. I recommend look at the Bitmap & Pallets section of codeproject (KeyWord: DIBSECTION).
INTP
|
|
|
|
|
Thanks John
The Rotate function goes off and calls SetWorldTransform which needs to be called before the metafile is played. I'd started to look at pallets and it looks like it's possible to get hold of pallet info for a metafile but I couldn't find any easy way to reset the data to give new colours. I'll have a look at the CodeProject stuff today
___________________________
Jeremy Preston
|
|
|
|
|
Hi @ all.
I have an biiig problem! I want to convert a PDF file to a simple txt file.
Does anybody know how it works? Maybe you can help me.
best regards
J.J.
|
|
|
|
|
An entertaining possibility is this and there are various tools about to do it at some cost. Or you could try the free tools available here. Google for 'pdf text' for many options.
Bear in mind that if the coding of the PDF is for an embedded font then you may be into some low level hacking to get any text out at all. In that case it may be fastest to print it, scan it and OCR it....
Paul
|
|
|
|
|
Hi,
I´m trying to add an new button to my outlook application.
I´m doing this:
_Explorer exp;
_OutlookBarGroups obgs;
exp = app.ActiveExplorer();
obgs = exp.GetCommandBars();
obgs.Add("MyButton",COleVariant((short)1));
But for the last command I´m getting an error.
Can someone help me ?
Maybe there´s another way to do this ?
Please send help !
JohnX
|
|
|
|
|
Anonymous wrote:
But for the last command I´m getting an error.
And that error would be what?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi i wonder if anybody can answer this (simple?) question, i have a buffer returned from a library call declared as:
const UCHAR* pkt_data
and i want to fill a CString object from a certain postion from that buffer, say 14 charachers in, I have looked at all the CString articles here and for the life of me cannot figure out how to do it. Can anybody be so kind as to post a code snippet?
Cheers
Andy
|
|
|
|
|
I'm assuming the data returned is standard text, you can do something like:
CString strMyString = reinterpret_cast<const char*="">(&pkt_data[14]);
|
|
|
|
|
CString str;
int iOffset=2;
str = _T(pkt_data+iOffset);
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
How about:
CString str;
strcpy(str.GetBuffer(###), ...);
str.ReleaseBuffer(); You might also be able to use CString 's assignment operator, but I've not tried it so I can't say for sure.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
The type UCHAR* and the name pkt_data sugest this is probubly a pointer to binary data, in which case you should be using a CByteArray.
If you know the data you wish to copy has no bytes equal to zero and you still want to copy it to a CString then the sipilest way is as follows:
CString str;
for( int i=0; i<14; ++i )
{
str += (char)pkt_data[i];
}
INTP
|
|
|
|