|
how to use the signs and symbols. that is my main problem and that leads me to not knowing what to do at times.. i would really like to find out or get to know more abou programming.
peter burnett. "the maestro"
|
|
|
|
|
That tells me you need help with the basics. You need to read your textbook from the beginning and seek a tutor. Also, typing and compiling sample programs helps. Modifying sample programs is a great help. There's a lot of information on the web that explains basic concepts. This forum is not the best place to get the information you seek.
-- modified at 20:10 Thursday 9th February, 2006
|
|
|
|
|
ok.. good advice. thanks for your support. and do you have yahoo or msn messenger? you would be a great advisor to me right now during this course.. my yahoo is peterburn1@yahoo.com
peter burnett. "the maestro"
|
|
|
|
|
My e-mail address is jorgito11@aol.com,
|
|
|
|
|
Hi!
I've migrated a project from VS2003 to VS2005 and since then the application doesn't have XP themes anymore. What do I need to do to fix this?
Thanks!
Luc
|
|
|
|
|
I don't know, if the following, will be helpful! If you go to the project's property page under "ConfigurationProperties", you will find "Manifest Tools".
|
|
|
|
|
Hello everyone!
Remember my previous post? I think I almost got it now!
New problem: I'm reading a file with this:
char * curLine = new char[WIDTH/32];<br />
f[x]->getline(curLine, WIDTH/32);
This is my file:
<br />
ABCDEFGHIJKLMNO<br />
PQRSTUVWXYZABCD<br />
EFGHIJKLMNOPQRS<br />
TUVWXYZABCDEFGH<br />
IJKLMNOPQRSTUVW<br />
XYZABCDEFGHIJKL<br />
MNOPQRSTUVWXYZA<br />
BCDEFGHIJKLMNOP<br />
QRSTUVWXYZABCDE<br />
FGHIJKLMNOPQRST<br />
UVWXYZABCDEFGHI<br />
JKLMNOPQRSTUVWX
I'm outputting what my program reads to another file, but that file comes out a bit different when I open it with SciTE... It shows me some "NUL" character at the beginning of each line starting at line 2, and 1 character at the end is moved to the beginning of the next line, and that number increases by 2 each line... Am I reading my file wrong? Maybe it's a different number from WIDTH/32 ? (WIDTH/32 is 16, the number of characters per line). Sorry for bothering you guys so much about this... But thanks!
Lord Kixdemp
www.SulfurMidis.com
www.SulfurSoft.tk
[ftp://][http://][hotline://]tsfc.ath.cx
|
|
|
|
|
Strings in C are NULL-terminated. You must keep this in mind so as to allow room for this terminating character when reading in and writing out string data.
For instance: you're missing the last character of each line, because your buffer is one character short.
Then you're writing out NULLs, because you write out the terminating character with the rest of the string.
Grab your textbook or Google, and look up C strings - get a handle on how they work before you end up tromping all over memory.
|
|
|
|
|
|
|
Seems theres no dummies steps out there for me..
Heres what I do:
1) On dialog view I click on the main form, in messages I goto WM_KEYDOWN, type in method name OnKeyDown and push enter.
2) In the OnKeyDown method I type in
AfxMessage("key pressed");<br />
SetWindowText("New Text");<br />
None of these changes occur when I press a key.
What basic thing am I missing?
And when overriding methods such as OnOk, do I just use the add function wizard and do it as a protected method in my code?
Thanks,
Brian
|
|
|
|
|
Hi
Actually the problem is when the dialog box is displayed it must have focus on any of the control. And when you press any key the WM_KEYDOWN goes to that control. If there are no control in your dialog box then your code will work.
Now what you can do to get that message is make the controls notify to the parent. But if there are lots of control you have to do it for each, and so its not a good idea.
Better you handle at PreTranslateMessage or WM_COMMAND to do your needs.
Regards
Anil
|
|
|
|
|
thanks, I used the PreTranslateMessage method you mentioned, and looked at the following site for how to basic steps to override http://support.microsoft.com/default.aspx?scid=kb%3BEN-US%3B817372[^]
then use
<br />
if (pMsg->message == WM_KEYDOWN){<br />
if(pMsg->wParam == VK_RETURN){<br />
return true;<br />
}<br />
}<br />
inside the new method.
thanks,
Brian
|
|
|
|
|
Hallo to all,
is there anyone who works with Dialogs and modless windows in DLL over MFC? How can I handle the right resources? What kind of DLL is to use? If it is possible, I want to use a Win32-Project with MFC as Console-App. Is it possible?
Thank you
Meinhard
|
|
|
|
|
Hi
What I got from your question is that you want to develop a DLL which supports Dialog box and it can be used in console and other application.
If it is so then it is possible. Use class wizard (MFC AppWizard (dll) ) to create your DLL. you can create dialog bos and all you want like MFC applicatin, and also you can use this DLL in console application.
Regards
Anil
|
|
|
|
|
Hi Anil,
I tried to do so, but if I want to acces it from the app like
CDialogXX m_dialogXX;
m_diologXX.create(ID_SOURCE, NULL); // ID_Source is a resource of the DLL
// but #defined in both identical.
the AFX_FindResource()-Function will abort.
TRhats my problem.
Thank you for helping
Regards
Meinhard
|
|
|
|
|
I am hosting the WebBrowser control in an application I wrote for a Windows CE .Net device. The control works properly and I am capturing events from the DWebBrowserEvents2 interface. So far, so good. I receive the DocumentComplete and NavigateComplete2 events whenever a navigation is performed. However if an error occurs (for example: Page not found, Incorrect Syntax, etc) the NavigateError event never seems to fire. Has anyone else had this issue when implementing the webbrowser control on CE?
Any help would REALLY be appreciated, as this is somewhat of a show stopper for now. If I need to elaborate or give some example code please let me know.
Thanks,
Dan
|
|
|
|
|
Hi
i display in an edit control Lat/long information. Unfortunately the degrees sign is not displayed in certain language locales. The problem is, as i can know , that the font used by those systems does not contain the degrees sign. A solution is to remove it, is there anything else i can do?
Thanks in advance for any help
George
George
|
|
|
|
|
Show it as an image?
Distribute and use a unicode font that does have it?
Ryan "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"
|
|
|
|
|
Hi,
I wrote a DLL which works fine if I just include the header file and the lib file in the code that uses this DLL.
However, when I try to call functions from the DLL the program crash and complain about calling conventions that do not match.
Here is the bare minimum:
******* DLL Code ****
Header:
<br />
typedef void (__stdcall *PF_SPCMCOMM_CALLBACK)(char *,pack_data *);<br />
SPCMCOMM_API int InitilizeConnection(char *appname,PF_SPCMCOMM_CALLBACK pfn);<br />
CPP file:
<br />
SPCMCOMM_API int InitilizeConnection(char *appname,PF_SPCMCOMM_CALLBACK p_cbfn)<br />
{<br />
.....<br />
}<br />
*** Client Code ***
Header file:
static void __cdecl SpcmCallBack (char *payload,pack_data *pd);
CPP file:
<br />
HISNT spcm_hInst =LoadLibrary (__TEXT("SpcmComm.dll"));
<br />
if (spcm_hInst)<br />
{<br />
PF_SPCMCOMMINIT initspcm;
initspcm = (PF_SPCMCOMMINIT) GetProcAddress spcm_hInst, "InitilizeConnection");<br />
if (initspcm)<br />
{<br />
int result=initspcm ("TestAlertUUT",(PF_SPCMCOMM_CALLBACK)SpcmCallBack);<br />
}<br />
|
|
|
|
|
does the library implementation have something like this in it ?
extern "C"
{
}
This needs to be around the prototype of InitilizeConnection in the header file and around its implementation in the .CPP file.
|
|
|
|
|
Thanks, I will try that and let you know.
In any case, what is the logic behind it and why does it work when I use the dll implicitly.
|
|
|
|
|
//int result=initspcm ("TestAlertUUT",(PF_SPCMCOMM_CALLBACK)SpcmCallBack);
aha! this is a callback function so the calling convention of both function has to be same
but ",(PF_SPCMCOMM_CALLBACK)SpcmCallBack is _cedel
where as initspcm is _stdcall.
never say die
|
|
|
|
|
Shay Harel wrote: typedef void (__stdcall *PF_SPCMCOMM_CALLBACK)(char *,pack_data *);
Shay Harel wrote: static void __cdecl SpcmCallBack (char *payload,pack_data *pd);
These two must have the same calling convention - __stdcall and __cdecl are not compatible.
Ryan "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"
|
|
|
|
|
VC6, MFC
I'm trying to print the contents of a CScrollView. The text displays correctly (font and size) in the view, but when I try to print, it's REEEEAL small.
I'm not using the view's built-in procedures (OnBeginPrinting, etc). Instead, I'm displaying the CPrintDlg, retrieving the DC of the selected printer, and managing the printing myself.
Can anyone tell me why the printed text is super-small?
------- sig starts
"I've heard some drivers saying, 'We're going too fast here...'. If you're not here to race, go the hell home - don't come here and grumble about going too fast. Why don't you tie a kerosene rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
-- modified at 15:11 Thursday 9th February, 2006
|
|
|
|