|
vikas amin wrote: Vikas Amin
EATON
PUNE
So left Embin?
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
Yes Sir
i have left embin & bombay
Can i know u ?
enjoy
Vikas Amin
EATON
PUNE
|
|
|
|
|
vikas amin wrote: Can i know u ?
We've met on CP before I think. I just remembered your previous signature when I read your name.. Vikas Amin, Embin Technologies, Bombay. Since it was different just asked you if you've shifted to a new location
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
I should admit that u have a good memory
Have a nice day
Vikas Amin
EATON
PUNE
|
|
|
|
|
Hi everyone,
I have a project in VC++ ,it is ClassLibrary project and it has a function that return jbyte *.
I would like to call this function in VB project ,how can I convert jbyte * to byte array ?
I would appreciated for any help .
If there is any document,sampe code or link for "type conversion between VC++ and VB.net "please inform me.
yours sincerely,
Orchid
|
|
|
|
|
ive been working in win32 console apps (c++) and mfc (c++) based stuff, and both of them have a type of dialog, but now how do i create a project that has no dialog interface what so ever, so like when i run it its only visible in the taskman?
i know i could set the console size or dialog size small etc, but none of that stuff.
any simple ways to do this?
/Johannes
|
|
|
|
|
|
Only try Windows Services if you want your program to run under a different session so it continues to run even when the user logs off. If that is what you want, services are the only way to go.
Otherwise, what about ditching MFC and creating a raw Win32 Project as a GUI application, and just declaring your own WinMain function. If you aren't displaying any windows whatsoever, you probably don't need a message loop.
I'm sure there's a way to do it with MFC, so you could keep using CString, etc., but since I have never used MFC I don't know.
Mike
|
|
|
|
|
I dont need it to run when logged off, just have no interface, and it doesnt have to be mfc either as im ok without it.
so from WinMain i clould make it seem like its creating a dialog, but it actualy doesnt, just runs without console or dialog in background?
sounds nice, how would i trick WinMain to have no dialogs?
/Johannes
|
|
|
|
|
You don't have to do anything special; just treat it like a main() function from a console application. It won't create any dialogs unless you tell it to via CreateDialog, CreateWindow, or the MFC equivalent.
So a simple program: (no guarantees this actually works; it is untested)
int WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR, int)
{
FILE *fp = fopen("C:\\test.txt", "wt");
fprintf(fp, "Hello, world!\n");
fclose(fp);
MessageBox(GetActiveWindow(), "Done!", "GUI-less Program", MB_OK);
}
|
|
|
|
|
How should i place that in MS visual c++ in a new win32 console project?
/Johannes
|
|
|
|
|
How should i place that in MS visual c++ in a new win32 console project?
thanks for teh help
/Johannes
|
|
|
|
|
Johpoke wrote: How should i place that in MS visual c++ in a new win32 console project?
You need to create a Win32 GUI project.
|
|
|
|
|
thanks a mil
/Johannes
|
|
|
|
|
In my program can i easily add mfc support?
/Johannes
|
|
|
|
|
hi, this is my first live project. i am naive to VC++. i have to implement AES. As per my knowledge it uses symetric key + cipher for encryption and decryption.i have done a lot of study and getting confused a bit. please guide me how to generate that symetric key of 128 bit length. Is there any API or any self made method for generating this key and what should be my approach ??.Thankx so much in advance.it wud be so kind of u if u plz send me answer at my e-mail id.i have very critical dead lines.plz help.
|
|
|
|
|
|
Detecting mouse buttons itself is quite easy, but there an equaly easy way to detect if the mouse button is being held down for a period of time?
My method is to launch my own message loop, but if an error occurs it would kinda mess up the whole program. Please take a look at my code and if you see any potential probems, please point them out.
do
{
if ( ! ::GetMessage( &msg, 0, 0, 0 ) )
break;
if ( ::CallMsgFilter( &msg, MSGF_SCROLLBAR ) )
continue;
pt = msg.pt;
::ScreenToClient(m_hWnd,&pt);
if (msg.message == WM_LBUTTONUP)
HandleMouseUp(pt);
else if (msg.message == WM_MOUSEMOVE)
HandleMouseMove(pt);
else if (msg.message == WM_TIMER)
{
if ( bFirstRun )
{
bFirstRun = false;
for ( int i=0; i<50; i++ )
{
::Sleep(10);
MSG peek;
if ( PeekMessage(&peek,m_hWnd,WM_LBUTTONUP,WM_LBUTTONUP,FALSE) )
break;
}
continue;
}
HandleMouseDown(pt);
}
else
{
::TranslateMessage( &msg );
::DispatchMessageW( &msg );
}
} while ( msg.message != WM_LBUTTONUP );
|
|
|
|
|
Every time I see the Sleep function in user-interface code I know there has to be a better way. You NEVER, except under most unusual circumstances, want to Sleep in a user-facing thread.
Kudos to you for using CallMsgFilter. Been reading Raymond Chen?
What I would suggest would be rewriting it: (pseudocode)
WM_LBUTTONDOWN:
set a timer for 500ms
WM_LBUTTONUP:
kill the timer
WM_TIMER:
kill the timer
post / send / call a OnMouseHold handler
Much simpler, no Sleep()s, and unless I missed something it should work.
Mike
|
|
|
|
|
Hello,
I'm a newbie in computer programming.
I'm looking for a program help me to change file attributes(Created time,Modified time and last access) like FileDate By T.YogaRamanan.
Here is link :
http://www.codeproject.com/file/FileDate.asp[^]
But I want to ignore its user interface.(No Dialog box , No Text box)
I want to choose file as coding and change file attribute as coding too.
I have tried to read source code of FileDate above.
I still can't do.
Can you help me ?
Thank you.
|
|
|
|
|
Welcome
SetFileAttributes for attributes
SetFileTime for set date and time(your purpose)
SetFileShortName for set shor name
|
|
|
|
|
Any one can code it for me ?
|
|
|
|
|
|
Sure !
I want something like that.
But I want to choose file by coding, not Dialog box.
And set time by coding, not text box.
Can you modify it for me ?
Thank you.
|
|
|
|
|
If you see inside that exmaple you understand how do you change it.See OnBtnApply and SetFileDateTime on that example
|
|
|
|