|
What is "CY"?
Color yellow?
Coordinate Y?
Maxwell Chen
|
|
|
|
|
CY is Currency, see this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/automat/htm/chap6_03sp.asp
|
|
|
|
|
Have a look at:
HRESULT VarCyFromI4(
long lIn,
CY * pcyOut
);
HRESULT VarI4FromCy(
currency cyIn,
long * plOut
);
Under Win32/Win64, int and long always are the same (4 bytes).
Maxwell Chen
|
|
|
|
|
Cool. I got it. Thx a lot.
|
|
|
|
|
HI all;
I am building an SDI application which has a dockable CDialogBar containing tabs and listControls etc... However,this CDialogBar is modeless. I need to access the list control and dynamically remove or add items to them. The problem is that i just don't know how to access the variable of listcontrol in a modeless dialog. I have tried many methods but it keeps giving me assertion errors since the pointer to the modeless dialog is lost.
Could anybody please help me, i badly need this and i need to present this application for my final year project next week.
Thank you;
Krugger
|
|
|
|
|
im not much into MFC, but i think this can solve the problem:
i assume you are loosing the pointer to the dialog cause you are creating the object inside some function, therefore when the function exits, the pointer is no longer valid (a code sample would have helped).
make the pointer a member variable of the class where you want to manipulate the dialog (like CMainFrame), and then you can safely call its members. EG:
class CMainFrame
{
CMyDialogBar* m_pBar;
int OnCreate()
{
m_pBar=new CMyDialogBar;
m_pBar->Create();
}
void Whatever()
{
if(m_pBar!=NULL)
{
// you can access its public member here
}
}
};
this is of course only "sample" code, but should give you an idea of how to do it.
HTH
|
|
|
|
|
Hi all;
I am building an SDI application in Visual C++ for my final year University project. I have created a compiled html file for the help of my application. However, i am having some problem including it in my menu. I need it to start when i use the help command found in the help menu.Can somebody please help me to make it work.
I badly need this;
Thank you
|
|
|
|
|
Use ShellExecute with the following parameters:
"hh.exe" for file to run,
path to CHM helpfile as a parameter.
Good luck.
|
|
|
|
|
HtmlHelp(m_hWnd,m_pszHelpFilePath,HH_DISPLAY_TOC /*HH_HELP_CONTEXT*/,0);
or
BOOL WinHelp(HWND hWndMain,LPCTSTR lpszHelp,UINT uCommand,ULONG_PTR dwData);
|
|
|
|
|
Hi guys,
is there any method for retrieve the previose opend file (in the last excution of the program)when the program just being start again?
sorry for my english....
what i want is...
my program has opened a text file, let's say data10.txt...
then close the program
..
open it, then the program while automatically the data10.txt which it has read last time
the file is a text file, so cannot use serializing.
thank u in advance!!!!!!!!!!
|
|
|
|
|
I dont think that program can do it by itself. You should write the filename into some file (for example 'lastfile.dat') on program exit, and when program starts read the filename from 'lastfile.dat' and open it.
|
|
|
|
|
You will need to save the last filename used somewhere, like the registry, in HKCU\Software\jfk_lili\appname\LastFile, for example.
Then on startup, you need a mechanism to detect that the program had no arguments, and then force it to load that file.
If you were using MFC, for instance, you could override your InitInstance to examine the program's command line, where it uses CCommandLineInfo, and if the verb was FileNew, change it to FileOpen and fill in the m_strFileName member. You then call ProcessShellCommand, and it happens automatically.
Steve S
Developer for hire
|
|
|
|
|
Hey,
I have this menu, and I have the options to subtract a certain number from a value selected from a combo box which is displayed in an edit box, and when you select the subtract function, depending on which one you use, it is to subtract that amount from the edit box variable.
Here is the code for them.
<br />
void CDEPDlg::OnOptionsAltertimeTotalcyclingSubtract10minutes() <br />
{<br />
if(totalcycling<=0)<br />
{<br />
totalcycling-=10;<br />
}<br />
}<br />
that is jsut one of the options, I figure that if I can get one working I can get the others working too.
The question is, It is not subtractiong the amount, how can I get it to subtract the amount?
Any help would be great.
Thanks
|
|
|
|
|
Is the "totalcycling" is EditBox member variable.
Then try with UpdateData()
|
|
|
|
|
What is the compiler option for generating the debug info?
I have tried /DEBUG /PDB"something.pdb" but doesn't seem to work.
I need to debug a static library which was built from nmake.
The debug operation need to be done in VC 6 or VC 7.
thank you.
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
Linker options:
/debug
/incremental:yes
Compiler options:
/ZI
/Od
Bikram Singh
|
|
|
|
|
I HAVE AN MDI APP WITH TWO CFORMVIEWS THAT I CAN SELECT FROM A PULL DOWN MENU OPTION. I CAN SWITCH TO EITHER FORM VIEW BY SIMPLY CLICKINT IT. THIS WORKS FINE, UNTIL....
PROBLEM: WHEN I CHOOSE NEW WINDOW FROM THE MENU, I DO GET A NEW SET OF CFORMVIEWS, I CAN SWITHC BETWEEN THE TWO NEW FORM VIEWS, BUT WHEN I CLICK ON ONE OF THE PRE-EXISTING FORM VIEWS, I GET AN ERROR, IT'S DESCRIPTION IS SOMETHING LIKE ASSERT(isChild(CRuntimeClass *p).
PLEASE EMAIL ME RESPONSES js_94@hotmail.com
...js..
|
|
|
|
|
I want sth like: after I click 'ok' on a messagebox, a IE window (Doc/View)pop up. However, I don't want to use shell comment to call a compiled execuatable file from a Dialog based application, I want Doc/View and Dialog be within the same project because there will be some parameter passing staff. by the way, I don't want the Doc/View to be nested inside the Dialog as Mr. Guenego's http://www.codeproject.com/docview/dfv.asp
anybody has idea?
|
|
|
|
|
You can do this by creating a normal doc/view app and display the message box in InitInstance of the app class.
|
|
|
|
|
Hello everyone:
Can a message be posted to a dll from other dll? If it can be realized, how to receive and handle it? Pls help me.
Thank you.
-Freehawk
|
|
|
|
|
what do you mean by "post a message" ?
do you mean you want to do a postmessage to a CWnd`or somesuch?
Bryce
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
Hi.
I want to use the function "PostMessage" to post a message to a dll from other dll. But I dont know whether it can be realized.
-Freehawk
|
|
|
|
|
to a dll or to a class or window which is contained in a dll
and your dll is loaded when your app loads presumably?
---
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
|
|
|
|
|
hi,
I want to post a message to dll. in the dll there is not window or dialog.
-Freehawk
|
|
|
|
|
Unless there is a window with a message loop in your dll, then PostMessage would be useless.
Perhaps you should describe what you are wanting to do.
"Live long and prosper." - Spock
|
|
|
|