|
thank u..... for ur kind help.......!!!!!!
|
|
|
|
|
why don't you try Code Project Desktop Environment Section? you will get very good examples.
All the best
|
|
|
|
|
|
I am new to visual C++ and now i am working in a project of assessment tool. I want to generate dynamic controls like text box, combo box, static text dynamically. Can any one help me out from this?
|
|
|
|
|
The API to do this is CreateWindow .
The first parameter is a class name.
The class name can be a user defined class name or predefined class names.
Predefined class names like EDIT, COMBOBOX, STATIC, BUTTON etc. exist to create the standard controls.
Please refer to the documentation of CreateWindow for more details.
«_Superman_»
|
|
|
|
|
karthik11k wrote: . I want to generate dynamic controls like text box, combo box, static text dynamically.
What kind of application is yours? (Dialog/SDI/MDI using MFC or simple Win32 App)
If you are using MFC, create a member variable of CEdit, CComboBox, CStatic, etc. And in the OnInitDialog (in dialog based) you can create them using Create().
In the case win32 app, you can use CreateWindow with specific class name.
See this[^]
- ns ami -
|
|
|
|
|
i am working in a project in mdi using mfc vc++ 2005
i want to create that controls dynamically according to end user's wish. for an example, when the end user need a text box, then dynamically a text box should come in that form
|
|
|
|
|
karthik11k wrote: project in mdi using mfc
So MFC classes CEdit, CComboBox, etc. can be used.
karthik11k wrote: want to create that controls dynamically according to end user's wish
You can think about a linked list to keep the control objects. Check the MFC's CPtrList class. You need to create the controls (using new) and keep them in the list. And once you finished using them "delete" it.
- ns ami -
|
|
|
|
|
I got that Tahnk you I try to implement it.
|
|
|
|
|
karthik11k wrote: I try to implement it.
Good luck...
- ns ami -
|
|
|
|
|
Hi everyone...
Is there any way to refresh the console output black screen....Since I am using multiple thread to update the output window, my output is not reflecting immediately after I call cout.....
Thanks in advance..
I am a learner Always
|
|
|
|
|
himangshuS wrote: my output is not reflecting immediately after I call cout
Use cout.flush()
- ns ami -
|
|
|
|
|
hi experts plese let me know what is th meaning of fallowing notation.
unsigned TouchScreen : 1;
kir_MFC
|
|
|
|
|
bit fields[^]
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
This means use only 1 bit for the variable TouchScreen, but this makes sense only in a structure where there are more variables.
It is used to save memory space.
«_Superman_»
|
|
|
|
|
I'm trying to add a context menu to a CTreeCtrl. Any clues on how to do this? I've created an IDR_MENU resource item but can't seem to combine it with a right-click.
The CTreeCtrl doesn't seem to be aware (that I'm aware of) of WM_CONTEXTMENU.
Will I have to create an OnRClick Event handler and build the menu dynamically?
|
|
|
|
|
Handle the NM_RCLICK notification sent by the tree, you can even handle it in the class of the tree itself with ON_REFLECT_NOTIFY if you like, load your menu using CMenu::LoadMenu, display it with TrackPopupMenu or TrackPopupMenuEx.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <
|
|
|
|
|
Thank you,
That's what I was beginning to think about the right click.
The TrackPopupMenu/Ex is the key - I was using SetMenu! LOL
|
|
|
|
|
|
Hello,
In VS2005, the hm file created doesn't have #define prefix like it used to in VS 6.0, and the prefix is needed to create the .chm help file.
1) Does anyone know if there is a setting that I can do to add the #define prefix to hm file? Any one with experience with this?
2) I am not too familiar with the hm file besides that its created using MAKEHM, I wanted to change My App.hm to My_App.hm without changing the exe name, Do you know where I can look to be able to do that, I couldn't find it anywhere in the project properties.
Thanks
|
|
|
|
|
The .hm file is by default set to create WinHelp type files. For HTMLHelp, you will need to edit your makehelp.bat file. You'll find commands in there beginning with makehm. You need to add a /h after the makehm for htmlhelp.
makehm /h ID_,HID_,0x10000 IDM_,HIDM_,0x10000 ..\src\resource.h >>"\hlp\MyProg.hm"
Hope that helps.
Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193
|
|
|
|
|
Thanks, but I read on MSDN that makehelp.bat is no longer used in the VS2005 and newer. As a matter of fact, I removed MakeHelp.bat from the project and still generated new .hm file when I recompiled.
Thanks
|
|
|
|
|
Hey Guys,
If I want to know the process ID of the window that currently has focus then I call GetForegroundProcessID()....
I am trying to think of the best way to capture a change in the focused window.
I could create a systemhook on WH_CALLWNDPROC and search for a WM_ACTIVATE or WM_FOCUS message and check the process to whom it's being sent.
or
I could poll every x seconds and check who the window in focus is.
Is there any option that I am not thinking of that won't hurt my perfomance like system hooks will?
|
|
|
|
|
If you're going to use a system hook, a WH_SHELL hook (look for a HSHELL_WINDOWACTIVATED notification) might be cheaper performance-wise?
Otherwise, your other solution seems a pretty cheap (performance-wise) alternative.
I don't know of other alternatives myself
|
|
|
|
|
Is there a way to create a window larger than your monitors resolution? I currently have a image of size 900x1440 pixels, which is displayed in a WS_POPUP window of the same size. This will eventually be displayed on a monitor with the same resolution, but i am developing the application on a normal 1280x1024 monitor. The problem i am having is that when i try to draw anything using GDI+ lower than 1024 pixels the drawing is clipped, is there anyway to overwrite this limit to let me develop this application on a normal monitor?
|
|
|
|