|
Any tip how to get that handle?
.....and justice for all
APe
|
|
|
|
|
Found!!
GetSystemMenu(...)
.....and justice for all
APe
|
|
|
|
|
GetSystemMenu() is an API through which u can get the handle.
ComputerNewton
|
|
|
|
|
Hi
Can someone please help me with this.
Given the following->
Write a function called Copy, witch takes two parameters
of type string. The first par is your Source(string to be copied) second is your Dest string(target) this function need not return anything(NOT ALLOWED TO USE strcpy)
I need to show how i would use this function(call) by writing code that copy one string into another.
A deep copy should take place not Shallow.
How can i implement the following in my function
clear, erase, resize, append and index operator.
How does the following piece of code look?
#include <iostream><br />
#include <string><br />
<br />
<br />
using namespace std;<br />
<br />
void Copy(string * Source, string * Destination);
<br />
int main()<br />
{<br />
string Source = "Robile";<br />
string Destination = "Lance";<br />
Source.append(Destination);<br />
<br />
Copy(&Source , &Destination);<br />
<br />
}<br />
void Copy(string * Source, string * Destination)<br />
{<br />
cout << "Destination String Now is " << *Destination << "\n";<br />
}
Not asking for complete code just tips on what to do and
howto(Correction of code above)
Thanks in advance
|
|
|
|
|
what do you want to know ?
how to write member functions ?
other thing, don't you prefer operator=() instead of Copy() ??
TOXCCT >>> GEII power
|
|
|
|
|
firstly how to write a function prototype that does
a deep copy (not a copy of the values only).
Secondly how would i write a member function from your
perspective.
What is the deference between operator=() and Copy()?
The code above compiles but is it the write way to do it
taking what i have stated in my thread in to mind?
|
|
|
|
|
bhangie wrote:
...a function prototype that does
a deep copy
I've never seen the adjective "deep" used with "copy." What does it mean?
bhangie wrote:
What is the deference between operator=() and Copy()?
Fundamentally, nothing. It's all a matter of how you want to use it. Which of these looks more natural:
Object a, b;
a.Copy(b);
a = b;
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi Everybody,
Im a novice in vc++. i want to create a MFC application that can open a powerpoint presentation and saves the slides as images, can anybody help me.
Thank You,
kedar
|
|
|
|
|
I am also in search of the same...
|
|
|
|
|
My service application(multithreaded) implemented with dundas's CU_Service stops when checked for dependensies from SCM.
and also sometimes when trying to start through command "net start my_service"
this time it gives msg
>The service did not report an error.
>More help is available by typing NET HELPMSG 3534.
im trying to find out this error two days and no luck yet.
please help me...
thanks in advance
|
|
|
|
|
can you paste the CU_Service's control handler function here..
greatest thing is to do wot others think you cant suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
hi suhredayan here is it
<br />
{<br />
DWORD currentState = 0;<br />
<br />
switch(controlCode){<br />
<br />
case SERVICE_CONTROL_STOP:<br />
<br />
currentState = SERVICE_STOP_PENDING;<br />
<br />
CUServ->SCMStatus(currentState,NO_ERROR, 0, 1, CUServ->m_StopTimeOut);<br />
<br />
CUServ->OnStopService();<br />
return;<br />
<br />
case SERVICE_CONTROL_PAUSE:<br />
<br />
if (CUServ->m_RunningService && ! CUServ->m_PauseService){<br />
<br />
currentState = SERVICE_PAUSED;<br />
<br />
CUServ->SCMStatus(SERVICE_PAUSE_PENDING,NO_ERROR, 0, 1, CUServ->m_PauseTimeOut);<br />
CUServ->OnPauseService();<br />
}<br />
break;<br />
<br />
case SERVICE_CONTROL_CONTINUE:<br />
<br />
if (CUServ->m_RunningService && CUServ->m_PauseService){<br />
<br />
currentState = SERVICE_RUNNING;<br />
<br />
CUServ->SCMStatus(SERVICE_CONTINUE_PENDING,NO_ERROR, 0, 1, CUServ->m_ResumeTimeOut);<br />
CUServ->OnResumeService();<br />
}<br />
break;<br />
}<br />
<br />
CUServ->SCMStatus(currentState, NO_ERROR,0, 0, 0);<br />
}<br />
|
|
|
|
|
change the first line as
DWORD currentState = SERVICE_RUNNING;
greatest thing is to do wot others think you cant suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
That worked like a magic !!!
Thanks .
I cannot believe Dundas had such a basic error !!!
|
|
|
|
|
I have MDI application...which is tabed based MDI.
I have attached a dialog and created a toolbar on that dialog. But when I am using this code...it disables my toolbar on both windows...ie dialog and on MDI TABS
RECT rect;
rect.left =0;
rect.top = 150;
rect.bottom=255;
rect.right=30;
CWnd *currWnd=NULL;
COXTabWorkspace ptr;
currWnd=FromHandle(ptr.myWND);
THIS IS FOR DIAPLAYING ON DIALOG
if(currWnd!=NULL)
{
m_toolbar.SetOwner(this);
m_toolbar.SetParent(this);
if(m_toolbar.SetWindowPos(this , 0, m_nWndHeight / 2,30, 700, SWP_SHOWWINDOW )==0)
{
AfxMessageBox("SetWinpos failed...return dsome value");
}
RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST,NULL,reposDefault,&rect,&rect,TRUE);
m_toolbar.EnableWindow(TRUE) ;
THIS IS FOR DISPALYING ON TABS
if(currWnd!=NULL)
{
//::SetWindowPos(ptr.m_hWnd,HWND_TOPMOST,10,10,30,500,SWP_SHOWWINDOW|| SWP_NOSIZE | SWP_NOMOVE);
//m_toolbar.SetOwner(currWnd);
m_toolbar.SetParent(currWnd);
if(m_toolbar.SetWindowPos(currWnd , 0, 100,28, 50, SWP_SHOWWINDOW|SWP_NOMOVE )==0)
{
AfxMessageBox("Window Failed, so return something");
}
RepositionBars(AFX_IDW_CONTROLBAR_FIRST, AFX_IDW_CONTROLBAR_LAST,NULL,reposDefault,&rect,&rect,FALSE);
m_toolbar.EnableWindow(TRUE) ;
}
why does this code disables the TOOLBAr???
|
|
|
|
|
probably you could try to override the OnUpdateCommandUI for the toolbar?
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
That is also done... m_CUID->Enable(TRUE)
|
|
|
|
|
Are your toolbar creation syntaxes right?
Eg.
if (!m_YourToolbar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
| CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
!m_YourToolbar.LoadToolBar(IDR_TEMPLATEJOB))
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
Or
did you call
CFrameWnd::ShowControlBar(CControlBar* pBar, BOOL bShow, BOOL bDelay );?
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
Thanks a lot...But the problem is solved by some other way..here is the solution
Question was)
I had created Toolbar on Dialog...and I was changin its m_toolbar.SetParent(this) or (OtherWnd) and was getting disabled
Solution) We need to add
afx_msg void OnXXX()
afx_msg void OnYYY()
and its implementation on both the side, i.e on Dialog and on CXXXFrameChild or the other Window handle...
regards
Balkrishna Talele
|
|
|
|
|
:-DHow to retrieve Item Text of a List Control in an application from another application?
thx
|
|
|
|
|
FindWindows() to get the HWD and use GetDlgItem() to retrieve the HWND for the list control?
Sonork 100.41263:Anthony_Yio
Life is about experiencing ...
|
|
|
|
|
I can get the handle of an lsit control in an application from another, but it is difficult to get Item text. U know, GetItemText called from another process is always return nothing.
|
|
|
|
|
I am devloping MMC application using win32 coding and I can't find any clear examples of how to handle the pressing of enter in a (single-line) edit control.
I'm trying it at present in the general WM_COMMAND case of message and am comparing LOWORD (wParam) to the ID of the edit control but I'm clearly missing something.I tried subclassing also.
Does anyone know what I'm doing incorrectly...
Thanks in advance!
|
|
|
|
|
hi all,
May be I had posted the question in wrong place.
I am trying to write a simple HTTP Client in MFC am i am using MFc classes
CInternetSession ,CHttpConnection and CHttpFile.
The server generated cookies.
My question is how do i reterive the cookies from server. using the function of class CInternetSession.or any other method.
Thanks in advance,
Abhishake
|
|
|
|