|
Yes I want to do it for a singel image!
|
|
|
|
|
Open the image in Microsoft Paint and then use the saveAs option. I think it is under File.
Keep it simple
|
|
|
|
|
Well Mr.Fun
Well I need to do that in my program.
NOT in a diffrent program!
|
|
|
|
|
Have you try to use CImage class ? (.NET)
Good luck...
|
|
|
|
|
I send data to device.I send 1.
I use this code.
int i=13; //enter key
CString mm=i;
CString mmm=m_text+mm;//m_text=1
if(!(port.WriteString(mmm)))
{
MessageBox("Cannot Write to Port","Error",MB_OK); port. ClosePort();
}
else
{
MessageBox("Send by "+mmm,"Success",MB_ICONINFORMATION); }
Function is work. But PLC is not translate.
I want to know how to get send data.
|
|
|
|
|
Using a Spin Control with real numbers, but have a problem when the Up or Down spin is held down for a while.
The data increments/decrements but after a period (around 30 ~ 100) the sign of the data changes.
I am using my own routine to handle the increments/decrements via OnDeltaposSpinNewdata. The Autobuddy is set to false and the Set Buddy Integer is set to true (tried false but still the same).
void CEditDlg::OnDeltaposSpinNewdata(NMHDR *pNMHDR, LRESULT *pResult)<br />
{<br />
LPNMUPDOWN pNMUpDown = reinterpret_cast<LPNMUPDOWN>(pNMHDR);<br />
<br />
int incrementValue;<br />
<br />
m_fSpinIncrement = m_fScalingFactor;<br />
if(pNMUpDown->iDelta == -1)
{<br />
IncrementData(m_fSpinIncrement);<br />
}<br />
else
{<br />
DecrementData(m_fSpinIncrement);<br />
}<br />
*pResult = 0;<br />
}
|
|
|
|
|
I am not sure about this: When I have a DLL and an EXE compiled with VC, and the EXE loads the DLL, does each have it's own instance of the C runtime (i.e. the global variables like stdin, stdout, the heap, etc.)? Does this depend on compile settings?
TIA
Peter
we are here to help each other get through this thing, whatever it is Vonnegut jr.
sighist Fold With Us! || Agile Programming | doxygen
|
|
|
|
|
peterchen wrote:
does each have it's own instance of the C runtime
Yes, that is why you should avoid using free() and the delete operator on pointers received from a dll.
"After all it's just text at the end of the day. - Colin Davies
"For example, when a VB programmer comes to my house, they may say 'does your pool need cleaning, sir ?' " - Christian Graus
|
|
|
|
|
Depends on compile settings[^]. If you choose to dynamically link CRT in all your modules (exe and dlls), it will be shared between them and it is safe to pass objects between modules.
My programming blahblahblah blog. If you ever find anything useful here, please let me know to remove it.
|
|
|
|
|
|
Give me some code sample.
Thanks
ALL THINGS ARE POSSIBLE UNTIL THEY ARE PROVED IMPOSSIBLE-AND EVEN THE IMPOSSIBLE MAY ONLY BE SO,AS OF NOW
|
|
|
|
|
Hi,
Create the accelerators for the toolbar buttons using the resource editor...
Vikram Kashyap
"You will never fail until you stop trying"
|
|
|
|
|
Hey thnaks for ur reply.i tried this. but it is not working. after adding accelerator key.should i write some code to catch that message.
ALL THINGS ARE POSSIBLE UNTIL THEY ARE PROVED IMPOSSIBLE-AND EVEN THE IMPOSSIBLE MAY ONLY BE SO,AS OF NOW
|
|
|
|
|
Hi,
Yes, you need to load that Accelerator table.
HACCEL gAccel; //Declare in header file
//Add this code to the OnInItDialog of your dialog class
gAccel = LoadAccelerators(AfxGetApp()->m_hInstance,MAKEINTRESOURCE(IDR_MYACCEL));
//Add this code to PreTranslateMessage
if(TranslateAccelerator(AfxGetMainWnd()->m_hWnd,gAccel,pMsg))
return FALSE;
This should work....
Thanx and Bye
Vikram Kashyap
"You will never fail until you stop trying"
|
|
|
|
|
Hie Friends,
I am having one console kind of applicaion , Want to debug it during run time. It should ask or through a dialog box whenever exception occures(Here I am directly running exe ..not thr MSDEV)..I think it's possible thr CRT library but don't know how?
|
|
|
|
|
_asm int 3
this shows the dialog box to select the debugger you want. Is this wot you are looking for ?
There is no spoon.
mail
|
|
|
|
|
Yes , IT works. thanx.
_CrtDbgBreak() also useful.
|
|
|
|
|
I want to send enter key to device.
What I use function ASCII 13 to char.
Please guide me
|
|
|
|
|
something like
char ch = 0x(char value in hex);
Bryce
---
To paraphrase Fred Dagg - the views expressed in this post are bloody good ones.
--
Publitor, making Pubmed easy.
http://www.sohocode.com/publitor
Our kids book :The Snot Goblin
|
|
|
|
|
I am looking for strategies for using tree controls. The goal is to extend the CTreeCtrl (or maybe even build a new custom CWnd descendant tree control) in a way that makes it easy to use, and that hides away most of the uggly struct and message tweeking needed.
At init I would want to add one single node, the root, to the tree control. And as user expands nodes, the tree would ask the node to list its children. For the tree to be able to ask nodes for children, we need some kind of "class ITreeNode" interface. Implementing this interface would enable an object to be represented as a node in the tree. And the object would itself be in charge of how it should be represented in the tree.
The tree this way visualizes the object structure in memory, which is a fair approach imo.
The treenode interface could look something like this...
class ITreeNode<br />
{<br />
virtual CString GetTreeLabel() { return "Default"; }<br />
virtual void GetTreeChildren( CTreeNodeList& L ) {}<br />
virtual int GetTreeImage() { return 0; }<br />
virtual int GetTreeImageSelected( return GetTreeImage(); }<br />
}
Did anyone experiment with anything like this?
|
|
|
|
|
Hi,
I have some problem with the tooltip control. I have enabled the tooltip control for my DialogBOx. I have drawn little boxes on to my Dialog Box. On each Box I have given different Tooltip Text in WM_MOUSEMOVE. Every thing is working fine but in some places Tooltip is blinking. I mean text is appearing and disappearing very fastly. But in other places on Dialog Box tool tip is stable. Can any one tell me What is happening ?
Thanks & Regards,
Deliver
If you have faith in the cause and
the means and in God, the hot
Sun will be cool for you.
|
|
|
|
|
Hi,
R u using the RelayEvent(pMsg) in the dialog's PreTranslateMessage, if so then check the rect size for that particular control which is blinking with the one which you would have used while creating the tooltip using the AddTool function. Have a look @ CPropertySheet::GetTabControl @ msdn, it does have an example on using the tooltip control
Sujan
|
|
|
|
|
Hi,
Here i am providing the steps
In Dialog's header add
CToolTipCtrl tooltip;
in Dialog's on initdialog add
tooltip.Create(this,TTS_ALWAYSTIP);
CWnd *pWnd = GetDlgItem(IDC_BUTTON_BC1);
tooltip.AddTool(pWnd,"Hello Testing ",NULL,NULL);
Add the PreTranslateMessage for the dialog and add the following code
tooltip.RelayEvent(pMsg);
This will work. I think you shouldn't you on mouse move
Sujan
|
|
|
|
|
Hai frens. . .
I am facing a prblm in SDI.
My SDI will be in maximized state initially. . .
So, i do like this. . ShowWindow(SW_MAXIMIZE).
After that i want that maximize button disabled so i remove the style WS_MAXIMIZEBOX. IF i do so the SDI will be maximized initially but it becomes MOVABLE. How to handle this. . .I need it to be immovable.
Plz help me with this prblm
Tanx
|
|
|
|
|
Hello,
You can simply take the handle of the SystemMenu using GetSystemMenu and remove the Move menu. The code goes like this...
void CMainFrame::DisableMoveWindow()
{
CMenu* pSysMenu = GetSystemMenu(FALSE);
if (pSysMenu != NULL)
{
pSysMenu->RemoveMenu(1, MF_BYPOSITION);
}
}
Call this function in the OnCreate of CMainFrame()
Vikram Kashyap
"You will never fail until you stop trying"
|
|
|
|