|
The common windows interface controls are drawn using your current colour scheme settings. Everything from the background colour of your dialog, colour of your menus, desktop etc can be queried using the GetSysColor()[^] API.
I Dream of Absolute Zero
|
|
|
|
|
how can I switch input methods between Chinese and English in code(program) under Wince?
|
|
|
|
|
I need to show a FileDialog form the win32 application. Is there any SDK fuction to select the file form the dialog?
|
|
|
|
|
The CFileDialog class is only a wrapper to the windows API function GetOpenFileName()[^]. This should be want you want.
I Dream of Absolute Zero
|
|
|
|
|
|
When I use CreateWindow function to create a window,
I must assign a HINSTANCE to the function ,just as follows:
HWND ghApp;
HINSTANCE ghInst;
ghApp = CreateWindow(CLASSNAME, APPLICATIONNAME,
WS_OVERLAPPED | WS_CAPTION,
CW_USEDEFAULT, CW_USEDEFAULT,
CW_USEDEFAULT, CW_USEDEFAULT,
0, 0, ghInst, 0);
Now,can you tell me the relationship of ghApp and ghInst?
and the difference of the two?
|
|
|
|
|
As per the MSDN docs this parameter has been ignored since WinNT.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
I dont know exactly what it is as this is not ANSI pragma options , pragma options are used to control/modify/set linker and preprocessor.
asm and endasm seems to be the inline assembly code to be used as the startup function for the module.
I cant say anything about SYN_SFSLCT.
Does this code work in VC++ , I mean does it get compiled correctly ?
|
|
|
|
|
Hello Friends,
How can we maintain the size of an Edit control with respective to the Form View. In my Project I am using a Form View on which I am placing a Edit control. This edit control has to resize on its own at the run time if the Form view size is changed.
I am using the splitter window where in one part of the splitter window, I am using the Form View class.
Bye Techies.
Work Hard and a bit of LUCK is KEY to SUCCESS.
|
|
|
|
|
Hi,
In the Form View class add WM_SIZE message with classwizard and write this code to resize the edit control (IDC_EDIT1)
void CYourOwnFormView::OnSize(UINT nType, int cx, int cy)
{
CFormView::OnSize(nType, cx, cy);
CWnd* wnd = GetDlgItem(IDC_EDIT1);
if(wnd)
{
CRect rect,editrect;
GetWindowRect(&rect);
wnd->GetWindowRect(&editrect);
editrect.left = rect.left + 10;
editrect.right = rect.right - 10;
ScreenToClient(editrect);
wnd->MoveWindow(&editrect);
}
}
Ivan Cachicatari
www.latindevelopers.com
|
|
|
|
|
Please tell me the difference between
HWND and HINSTANCE!
thanks
|
|
|
|
|
Both are void pointers!
ARSALAN MALIK
|
|
|
|
|
the HWND is an opaque handle to an internal Windows data structure that corresponds to a window and consumes system resources when present. A Windows window is identified by a “window handle”
but where as HINSTANCE is Handle to an object for which memory is allocated
Neelesh Jain
|
|
|
|
|
HWND is a pointer to an insternal structure that contains the state information for a window.
HINSTANCE is a pointer to an internal structure that contains the executable module state information.
There is only one HINSTANCE, but there may be 0 or more HWND for a given program.
Note: There are also HMODULE, which is a pointer to an internal structure that contains the state information for a module - a module is a dll or exe ... which means that HINSTANCE can also be thought of as being a special type of HMODULE.
You use HWND to manipulate windows - move them, resize them, ...
You use HINSTANCE/HMODULE to access resources in the exe or dll - icons, bitmaps, strings, ...
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Hi everybody,
I want to add toolbar to a dialog base Vc++(6) programm.
can I do this?How?
Thanks for your help
|
|
|
|
|
|
I tried using context menu when receive WM_CONTEXTMENU, when working on CRichEditView and document container, like the MSDN Superpad, but it fails, where do i get wrong?
<italic>Work hard and a bit of luck is the key to success.
|
|
|
|
|
what do you do ?
TOXCCT >>> GEII power
|
|
|
|
|
Hi,
I have created a MDI using MFC Application.
The application is developed to process some input files and create an output file.
At the end of the process, after the output file is created, iam trying to open the same.
But its popping an error message saying
"A sharing violation occured while accessing C:\temp\output.txt"
And, iam not able to open it through any other application and the popping error message is "The document C:\temp\output.txt is being used by another application and cannot be accessed".
I have properly coded on file opening and file closing. But still, iam not able to understand on why the problem occurs.
Only, when i close my MFC application, iam able to access the created output file through any applicaton.
Could someone, please help me, to get out of this situation. I thank in advance.
Thanx
Mughi
Mughilan
|
|
|
|
|
What`s your code at your file closing. I think that`s where the problem is.
<italic>Work hard and a bit of luck is the key to success.
|
|
|
|
|
Hi,
Here is the code.
FILE *fp = fopen(this->output,"w");
fprintf(fp,"8\n");
for(rc=0;rc<9;rc++)
for(gc=0;gc<9;gc++)
for(bc=0;bc<9;bc++) {
lut[0][rc][gc][bc] = (lut[0][rc][gc][bc]>255)?255:lut[0][rc][gc][bc];
lut[1][rc][gc][bc] = (lut[1][rc][gc][bc]>255)?255:lut[1][rc][gc][bc];
lut[2][rc][gc][bc] = (lut[2][rc][gc][bc]>255)?255:lut[2][rc][gc][bc];
fprintf(fp,"%d %d %d\n",lut[0][rc][gc][bc],lut[1][rc][gc][bc],lut[2][rc][gc][bc]);
}
fclose(fp);
When my MFC application still runs, Iam able to open the file in dos prompt, but not in any of WIN32 application or in my own MFC application.
Am still not getting it. Could you please help me out, if you have the answers.
Thanx
Mughi
|
|
|
|
|
Hi,
The file was opened somewhere else (for other module) and was not closed. I had to track down the whole flow of the application and had the problem solved. Thats been a silly mistake and sorry for the inconvenience caused. Thanks for your support.
Thanx
Mughi
|
|
|
|
|
close the file before reopening it
TOXCCT >>> GEII power
|
|
|
|
|
I have a Pro*C application being developed on windows.
I have 2 functions, one which connects to the oracle database and the second function to update a table.
The first function connection()works fine (sucessfully connects to the DB).But when i try to update the table by calling the update() immediately after checking the success return value from the connect(), i get the error message
"ORA-01012: not logged on"
What is the problem?Is the session killed?
Please help.
Thanks
|
|
|
|
|
I'm working on an application that needs (mostly-sequential) access as fast as possible to a very large file (in excess of 1 GB, most likely in the range of 2-3 GB), so loading it to all to memory first is going to hurt more than it will help. I will be processing all of it, in a mostly (but not entirely - I may have to back-track a small amount on every iteration) sequetial manner, and performance is a key objective.
So my question is - am I better off writing (or finding) a file accessor class that explicitly caches the data to a buffer in (presumably) fixed amounts, or does the CFile (or underlying fread etc.) access functions take care of this situation in a reasonably efficient manner? (enough such that the overhead of secondary caching doesn't defeat the entire purpose?)
And if not, do you know of any already written libraries designed to handle this situation?
Thanks,
Tim
|
|
|
|