|
Hi all,
Does anybody know how image editors are made.I dont mean the image manipulation part ,but the canvas like thing we see in ms paint on which we draw ,erase .draw lines etc....I dont think it is a dilog.It would rather be a window , a paint window but how do we maintain it.say loading am image to a window is simple and i prefer the IPicture and IStream way of the win32 sdk.Once the image is loaded ,i even managed to draw on it ,like using moveto and line functions from the gdi.But the real trouble is how would i store the image temporarily.Say i have the image read from the file into the IStream and enclosed by IPicture .I render this from the IPicture to the window.Now i draw some lines over the image.Technically the dc is modified.Now how would i extract this modified dc into a buffer and latter on store it to a file.One suitable way is to Create a compatible dc and bitmap make a snapshot of this window,but it is not good,the image is not clear .How would i go around this situation.
Please help.
Vini
|
|
|
|
|
Hi,
How can I make a toolbar having buttons, which toggles their state from pressed to un pressed and vice versa like the toolbar of MS Paints?
|
|
|
|
|
Take a look at PressButton from CToolBarCtrl.
|
|
|
|
|
Hi,
I have a program which generates a 2D data and i want to plot it into a 3D surface Plot at the end of the execution of my program.
at present i am writing it into a text file and then i am importing it inot excel file to plot the 3D graph... i would like to have tht 3D graph to be viewed in my program itself....( my prorgam is a plain cpp file...and I am running it in VC++, i think i have to convert it into ActiveX file... but I am not familiar with it)
anyone plz help me on this....hhow to proceed
thanks in advance,
Suman
|
|
|
|
|
struct GroupConstant<br />
{<br />
CString** grpConst;<br />
};<br />
<br />
GroupConstant** m_pGrpConst;<br />
<br />
m_pGrpConst = new GroupConstant*[200];<br />
for(BYTE i=0 ; i<200 ; i++)<br />
m_pGrpConst[i] = new GroupConstant[50];<br />
<br />
CString** pstr = new CString*[4];<br />
for(BYTE i=0 ; i<4 ; i++)<br />
pstr[i] = new CString[2];<br />
<br />
<br />
GroupConstant** ppTemp = m_pGrpConst;<br />
GroupConstant* pTemp = (*m_pGrpConst);<br />
<br />
for(i=0 ; i<200 ; i++)<br />
{<br />
for(BYTE j=0 ; j<50 ; j++)<br />
{<br />
(*m_pGrpConst)->grpConst = pstr;<br />
(*m_pGrpConst)++;<br />
}<br />
(*m_pGrpConst) = pTemp;<br />
}<br />
m_pGrpConst = ppTemp;<br />
I have two double pointers. one is a content of the structure and other is pointer to the structure.
I initiate these double pointers as you see in the code. but now I have a problem with deleting these pointes.
how can I delete the double pointer included with structure and double pointer points to structur.
Thank you in advance.
|
|
|
|
|
hi all,
I have created MFC Program.But when I compilled it ,I got such a Error:-
"fatal error C1189: #error : include 'stdafx.h' before including this file for PCH"
Can anybody please tell me how to correct that Problem ??
Thanks in advance..
|
|
|
|
|
Put #include "stdafx.h" at the top of the .cpp file that causes the error.
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,
yes ..it is already in the top of the .Cpp file.But the Problem is appearing yet.
------This is the header file :------------------
// rtcsample.h : main header file for the RTCSAMPLE application
//
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include 'stdafx.h' before including this file for PCH
#endif
#include "resource.h" // main symbols
class CRtcsampleApp : public CWinApp
{
public:
CRtcsampleApp();
public:
virtual BOOL InitInstance();
};
This the .Cpp file-------------------------------------------
// rtcsample.cpp : Defines the entry point for the application.
include "stdafx.h"
// WinMain
//
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
HRESULT hr;
UNREFERENCED_PAR
//extra code here
}
Can you tell me how to correct it?
OR
Is there a Problem in "stdafx.h" File?
|
|
|
|
|
|
Hi,
In my project, I want to upgrade my application (there is a class named CUpgradeApplication in my project) by retrieving a file from web. And when the file was loading, I want to put a download progress but I don't know how to do.
Please help me.
Thank you very much.
|
|
|
|
|
|
see The api UrlFiletoDownload or see article by mr Micheal Dunn in internet section overe this api
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
Hello there,
I have been tracing a C++ code and I encountered a declaration statement like this:
const vector<int>& vars
Can anyone teach me what this is and how it is used? I tried searching for references on this and I was not able to find any.
Thanks so much!
-Rafferty
|
|
|
|
|
Rafferty Uy wrote:
const vector<int>& vars
This is a reference to a constant template vector class that has been specialised with int as its template parameter, ie. it's a reference to a constant variable-length array of int s.
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"
|
|
|
|
|
I see... could you give me an example on how to use this? or even a link to a reference will do. Sorry I really don't have an idea of this yet. I don't even know what a template in C++ is.
Thanks!
Rafferty
|
|
|
|
|
I don't know of any tutorials off the top of my head. I recommend you get a good C++ book that includes a section on templates, or google for a C++ template tutorial (or both )
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,
Can I rename/delete a file another process has open?
Thank you,
|
|
|
|
|
Anonymous wrote:
Can I rename/delete a file another process has open?
Simple answer: No
Complex answer: You can't while it's open. You can use MoveFileEx() to delay the rename/delete until the next reboot, and let Windows do it for you at startup.
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"
|
|
|
|
|
You should check if the file is open or not before trying these operations
Sudhir Mangla
http://Programmerworld.net
(Free books , articles and Source Code)
|
|
|
|
|
I was following some online examples on creating a
simple user form in visual c++, and I just came upon a
strange thing...that is, after putting in teh text
boxes and radio buttons etc, we go to put in a button
for the user to click, then according to the online
instructions, by double clicking on that button it
should take me to the code section where I can then
define what I want the form to do...but I just
noticed that in doing so, it takes me to the .h and
not .cpp file to define the code! That is kind of
strange..shouldn't I define my codes in the .cpp
file?
Also, when I try to put in additional logics, such as
declaring CString variables to do stuff with it, it
tells me CString is not declared...this is really
strange...
any assistance would be greatly
appreciated...
thank you!
|
|
|
|
|
You're using MFC, right ?
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Anonymous wrote:
simple user form in visual c++,
What version of VC++ did you use. I think You can`t do that in VC++ 6. Corect me if i`m wrong.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
I'm trying to disable the movement of the physical mouse, but still be able to set its position on my own, via SetCursorPos(). The only solution I could come up with is to get the current mouse sensitivity, set it to zero, then revert back to the original sensitivity when done. The promblem is that I have no idea how to do this, and could not find any information on MSDN or by searching online.
Alternatively, if anyone has a better method of achieving the same thing, I would greatly appreciate it.
|
|
|
|
|
Any way to force process to unload library????
I working on update component ( oracle ), it seems i can do LoadLibrary and FreeLibrary when needed just ok, except for dll's been locked by OS. I am aware of debug setting for that tells XP to unload every library it is not been used, but this is way to drastic.
Couple of other options comes to mind, but I don't want to reinvent the wheel and not even sure it would work.
1) From process A create process B, when done exit B hoping cleanup would unload DLL or may be just issue plain kill.
2) allocate memory, load dll (PE), do fixup entry table etc etc etc as long as darn LoadLibrary is not been used.
3) Call freelibrary until XP frees stupid library or I blow away my stack.
4) Other options?
Thanks,
Brian
|
|
|
|
|
Do what everyone else does.
You use MoveFileEx to get the files copied to the correct places during the system restart.
Prior to restarting, add a RunOnce program that will register the DLL while the system is starting up.
Tell user to reboot system.
This is the 'recommended way to repalce DLL that are in use.
Look at all the MS security udpates, constant reboots of machine, eh? Works for them.. should work for you!
|
|
|
|