|
so it means that, you are not able to properly pass your object handle to the place where required.
now, define it globally and try to access.
|
|
|
|
|
in continuation with Chandu(good reply) better look for singleton design!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
ThatsAlok wrote: better look for singleton design!
can you explain?
thank you.
------------------------------------------
Suggestion to the members:
prefix your main thread subject with [SOLVED] if it is solved.
chandu.
|
|
|
|
|
chandu004 wrote: can you explain?
please refer this :-
Singleton Pattern[^]
instead of making global variable.. it is better to use singleton class.!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Is GetParent() returning a valid (i.e., the actual parent) pointer? Note that just because the value is non-NULL does not mean it is valid. Is m_WebSitePagesAry non-empty? Even if it wasn't, nTotalWebPageCount would be 0 (assuming that the answer to my first question is "yes").
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I want to download an image from a URL and show it on a UI. Can any body please give me some example how to do it.
Thanks.
Kishore
|
|
|
|
|
|
|
hello everyone,
I've been using C# mostly and now I've to use C++ and I'm a bit stumped by that
try{}
catch(...)
{}
structure. I wanna get the line number and other details of the exception being caught. how can I get that info??
Thanks in advance
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Plain C++ doesn't have the reflection capabilities of C# so what you want to do, to be generic, requires the use of symbolic debug information. In other words you can do this but it's not straight forward and will only work in Debug builds with the PDB available. The full process of turning addresses into line numbers and a great deal more is explained in this book by John Robbins[^] and the associated source code will give you what you need. If you can find John's web site it should all be available for free download.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
ok thanks!
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Do the __FILE__ and __LINE__ macros help any?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
__LINE__ macro gives the line in the catch block not the one from where the exception occurs... __FILE__ does give u the file name though
Rocky
You can't climb up a ladder with your hands in your pockets.
|
|
|
|
|
Rocky# wrote: __LINE__ macro gives the line in the catch block not the one from where the exception occurs
Right. That's about all you get. You can always throw an exception that contains
useful source information, including using those macros.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi,
Can any one tell me how to differentiate messagebox dialog from other dialogs.
Thanks in advance.
|
|
|
|
|
why do you have any of your dialogs which look like messagebox?
|
|
|
|
|
As the MessageBox comes from CWnd and CDialog is a CWnd derived class but "independant" you can try
CDialog* pDlg = (CDialog*) GetActiveWindow ();
if (pDlg->IsKindOf(RUNTIME_CLASS(CDialog)))
else
Another way to do the difference is the first member of both possibilites. By MessageBox the first member is a handler o a window hWnd , and in a DialogBox this handler is of the application instance hInstance
Hope it helps
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
Hi,
Thanks for ur reply.
I am trying to write a message box hook.
In that i need to differentiate the message box from other windows and dialogs.
I tried your suggestion but i could not achieve that .
I appreciate your help.
|
|
|
|
|
kuttiam wrote: Can any one tell me how to differentiate messagebox dialog from other dialogs.
MessageBox is type of dialog. but you don't need template to create it as it required by Dialog. plus a single api call i.e. MessageBox will create the message box for you!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi all,
I made this function of getting a unicode MAPI property:
LPMESSAGE msg = NULL;
wstring subj;
HRESULT hrProperty;
LPSPropValue lpPropValue = NULL;
hrProperty = HrGetOneProp(m_Message->Interface(), PR_SUBJECT_W, &lpPropValue);
if (hrProperty == S_OK)
{
subj = static_cast<wstring>(lpPropValue[0].Value.lpszW);
}
return _bstr_t(subj.c_str());
now I need the subj value for SetSubject(Subj.c_str(),codePage) from altmime however when I pass the value of subj to a string it loses it's contents(I am retrieving asian characters) it turns into ??? from the original value.
Help please,
Jj
|
|
|
|
|
monsieur_jj wrote: when I pass the value of subj to a string it loses it's contents(I am retrieving asian characters) it turns into ??? from the original value.
offcourse it will lose every thing as string can have 256 value per character and wide string have 2 power <superscript>16 values per character. so if you are using asian character set ..then work with wide string only
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi,
In this MFC dialog base project, I used command line arguments. I want to make my application like, when user give /silent argument from command line, only console window should be display else
normal dialog box. I used AllocConsole function in OnInitDialog function. Using that it displays both the windows viz cosole and dialog.
I used the following lines :
if (!AllocConsole())
AfxMessageBox("Failed to create the console!", MB_ICONEXCLAMATION);
please help me ...?
Regards,
Mayuresh
|
|
|
|
|
Does ShowWindow (FALSE) help when used in your dialog?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|
|
No, ShowWindow(SW_HIDE) does not work
|
|
|
|
|
It should... but ok.
Then... what about getting the DesktopRect and moving the dialog with MoveWindow (...) or with SetWindowPos(...) outside the visible area?
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
|
|
|
|