|
If your application needs to dynamically change pages in Wizard mode, then purge the resizer object contents for a page when you remove it. You may need to do this, for example, if user options on your Wizard start page determines which pages are to follow. Apparently, if a page is removed and added back later, the contents held by the Resizer object are from the previous object instance, and are invalid for the new instance.
Can we dynamically change pages in Wizard mode?
Thanks,
Sean Wang
Sean Wang
|
|
|
|
|
HI,
Shellexe (..,..,,) is to execute any exe.. what is
to clsor it means exit from it
actulay i want to execute it from my code to just load its dll s and then exit from it or close it
tell me plz
|
|
|
|
|
Try CreateProcess(...) instead.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
PLZ explain ,,,,
how to i use CreatProcess .....
it replace Shellexe or wt???
i want to close that exe. that i run by shellexe().
thanx
|
|
|
|
|
What CreateProcess provides over using ShellExec is a handle to the launched executables thread id.
Using this thread id you can then close the application (using EnumThreadWindows ) at a later time.
:
EnumThreadWindows(dwThreadId, CloseCallBack, 0);
:
BOOL CALLBACK CloseCallBack(HWND hWnd, LPARAM lParam)
{
ASSERT(hWnd != NULL);
HWND hOwner;
LONG_PTR hAncestor;
hAncestor = GetWindowLongPtr(hWnd,GWL_HWNDPARENT);
hOwner = GetParent(hWnd);
if( !hOwner && !hAncestor )
{
PostMessage(hWnd, WM_CLOSE, 0, 0);
ShowWindow(hWnd,SW_RESTORE);
return false;
}
return true;
}
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? - David Williams (Little Britain)
|
|
|
|
|
HI,
Can i access Video Camera Through COM port
if yes then HOW ?? any sample etc.
actualy firstly i access it by TV CARD and captured video....
But to start my application firtly RUN TV Card Software
and close it .. I think it loads its DLLs etc.
then i start my application it works fine..
if i not start TV Card Software after Booting System
n i start my application it not capture video from TV CARD ,,
i think firstly its DLL r need to load .. r they ???
so thats y i wana to access it by COM port/..
Plz tell me the way
Its Urgent ...... zahid_ash@hotmail.com
thanx
|
|
|
|
|
Hello
We have a toolbar in our app that has a button with the TBSTYLE_CHECK style. How can I change the colour used in the backgroud of the button when it is checked / unchecked
Thanks
Josh
|
|
|
|
|
In the toolbar's parent window (usually your main frame) handle NM_CUSTOMDRAW . The message sends along a NMTBCUSTOMDRAW struct which has a lot of members you can set to change the colors of various parts of the buttons.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
If my rhyme was a drug, I'd sell it by the gram.
|
|
|
|
|
Dear friends,
I wonder if anyone knows how to add and delete rows in a MSDataGrid without using the CRecordset class or setting up connection strings.
Many thanks
|
|
|
|
|
#include <iostream.h>
#define unsafe(i) \
( (i) >= 0 ? (i) : -(i) )
inline
int safe(int i)
{
return i >= 0 ? i : -i;
}
int f() {cout << "Called f()!" << endl; return 0;};
void userCode(int x)
{
int ans;
ans = unsafe(x++);
cout << "[1] "<< x << endl;
ans = unsafe(f());
cout << "[2] "<< x << endl;
ans = safe(x++);
cout << "[3] "<< x << endl;
ans = safe(f());
cout << "[4] "<< x << endl;
}
void main(void)
{
userCode(100);
}
I was doing a test code for inline functions comparison to macros. The original code was shown as above, things seemed normal as the result showed two times of f() calls. The result looked like:
[1] 102
Called f();
Called f();
[2] 102
[3] 103
Called f();
[4] 103
However, after I tried to call <big>ans = (f()) >= 0 ? (f()) : -(f()); </big> instead of <big>ans = unsafe(f());</big> , I got a result of calling f() FOUR times instead of TWO times as supposed. In this tread, I failed to attach a image of the result, which looked like:
[1] 102
Called f();
Called f();
Called f();
Called f();
[2] 102
[3] 103
Called f();
[4] 103
I ran the program twice both of times I got calling f() FOUR times, nevertheless, I could repeat the result after I re-compiled the program again with the original code.
Could this be a compiler bug?
DJ
|
|
|
|
|
|
Microsoft Compiler Ver 12.00.8168 from VC++ 6. I could not reproduce the problem either.
So I guess the chance would be high that I accidently uncommented both ans = (f()) >= 0 ? (f()) : -(f()); and ans = unsafe(f()); .
So far, I could not think out other reasons.
DJ
|
|
|
|
|
hi all,
I'm calling MoveWindow, passing my HWND from my dialog app, and I also do a GetClientRect before and after the MoveWindow. For some reason, my dialog is being shrinked (shrunk) by 6 pixels (width and height).
Does anyone know the reason for this? I've done some hunting around without any luck.
Thanx
Jubjub
|
|
|
|
|
In MSDN
The MoveWindow function sends the WM_GETMINMAXINFO message. Handling this message gives CWnd the opportunity to modify the default values for the largest and smallest possible windows. If the parameters to the MoveWindow member function exceed these values, the values can be replaced by the minimum or maximum values in the WM_GETMINMAXINFO handler.
Would it because your maximum window size has been exceeded?
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
hmm i don't think so. basically all i'm doing is a window that dodges the mouse. so if the mouse gets on the window as it is on the bottom left of the screen, then the window will move (via MoveWindow) to the top left of the screen.
so the window just moves from different corners of the screen. there is reason for my logic in this, but if i do a GetWindowRect and frmo that get the Width and Height of my window, when I call MoveWindow I pass in those values.
for some reason on moving the window, the window width and height decreases. I don't think my window size is exceeding it's limit as it should be staying the same.
|
|
|
|
|
Your previous codes uses GetClientRect.
Would it because in the process of calculation you have missed out nonclient area (including the title and scroll bars) if you are using GetClientRect?
And I noticed that CRect and RECT structure has slighly different data type members
typedef struct tagRECT {
LONG left;
LONG top;
LONG right;
LONG bottom;
} RECT;
If you use CRect function size(), width() and height(). It will return int instead of LONG which could cast the value away. (Although I don't think that will happen)
hope this helps.
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
I did think about the client area, but the my dialog has no title bar, and even if it did, it wouldn't be 6 pixels high. I now have a child dialog within a dialog, and this 6 pixel problem no longer exists. so for now everything is ok, as long as the window i'm resizing is a child window.
seems really bizarre. i've resized other dialogs before (for example when you have an "advanced/simple" button, and never had this problem.
thanx for your help Anthony
|
|
|
|
|
this has caught me so many times
from msdn on CWnd::MoveWindow......
For a top-level CWnd object, the x and y parameters are relative to the upper-left corner of the screen. For a child CWnd object, they are relative to the upper-left corner of the parent window’s client area.
Does the dialog have a parent? if not call ClientToScreen to get the coords relative to the top left of the window.
hope that helps
|
|
|
|
|
hello
I post this question yesterday,but nobody answer it,so I posted it again,Maybe it's little and simple to you,but I really need your help.
how can I change the color of status bar with vc6? I mean the bottom of the window.
Thanks a lot.
hi all
|
|
|
|
|
|
Or you can simply do this:
YourStatusBar.GetStatusBarCtrl().SetBkColor(Color);
|
|
|
|
|
I've written a ZIP archiving app which can display the files in the archive in a ListView, like WinZip. I want to be able to drag a file out of the ListView onto an app so the app opens the file. I can get it to work when I drop the file onto the Desktop, but not onto an app/Desktop icon, much the same as Windows Explorer.
WinZip allows you to DnD a file from an archive onto an App.
Why can I drop it onto the Desktop, but not the App ?
How do you do this ? Are there any articles/examples on CodeProject ?
|
|
|
|
|
There are plenty of these articles in codeproject, like this one below,
http://www.codeproject.com/miscctrl/rdragdropfiles.asp
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
|
I have a serrious problem.I've developed an application on VC6 that used to work fine. Now I have converted it on VC.NET 7.0 and builded in RELEASE configuration. The problem is that it only works on my computer. On other computers that don't have VC installed it just doesn't start. If started with depends.exe (XP Support Tools) it gives the following error:
Second chance exception 0xC00000005 (Access violation) occured in "NTDLL.DLL" at address 0x77F8243D
Exited "program" with code 128(0x80)
They have all the necesary dlls. What should I do? I'm disperate.
If there is an error in program why does it work on my computer fine, and on other computers without VC .NET installed crashes without any errors??
Contact: nemoprod@go.ro, www.nemoprod.go.ro .
|
|
|
|